instance-apacheperl.cfg 3.52 KB
Newer Older
1 2
[buildout]
parts =
Viktor Horvath's avatar
Viktor Horvath committed
3
  postgres-urlparse
4
#  apacheperl-promise
5
  mioga-instance
6
  cron-entry-crawler
7
  publish-connection-information
8 9 10 11 12 13 14

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true

[rootdirectory]
recipe = slapos.cookbook:mkdirectory
15
bin = $${buildout:directory}/bin
16 17 18
etc = $${buildout:directory}/etc
srv = $${buildout:directory}/srv
log = $${buildout:directory}/log
19
var = $${buildout:directory}/var
20 21 22 23 24 25

[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
promises = $${rootdirectory:etc}/promise
htdocs = $${rootdirectory:srv}/htdocs
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
cronstamps = $${rootdirectory:etc}/cronstamps/
cron-entries = $${rootdirectory:etc}/cron.d/
crontabs = $${rootdirectory:etc}/crontabs/

[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${rootdirectory:log}/crond.log

[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
cronstamps = $${basedirectory:cronstamps}
cron-entries = $${basedirectory:cron-entries}
crontabs = $${basedirectory:crontabs}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond

[cron-entry-crawler]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 23 50 * * *
command = $${mioga-instance:bin_dir}/crawl.sh
50 51 52 53 54 55 56 57 58

[apacheperl-promise]
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/httpd_promise
hostname = $${apacheperl-instance:ip}
port = $${apacheperl-instance:port}

[publish-connection-information]
recipe = slapos.cookbook:publish
59
apacheperl_url = http://[$${slap-network-information:global-ipv6}]:$${mioga-instance:public_ipv6_port}
Viktor Horvath's avatar
Viktor Horvath committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

# Request Postgres instance and parse its URL
[request-postgres]
<= slap-connection
recipe = slapos.cookbook:request
name = Postgres
software-url = $${slap-connection:software-release-url}
software-type = postgres
return = url
sla = computer_guid
sla-computer_guid = $${slap-connection:computer-id}

[postgres-urlparse]
recipe = slapos.cookbook:urlparse
url = $${request-postgres:connection-url}

[symlinks]
recipe = cns.recipe.symlink
symlink_target = $${rootdirectory:bin}
symlink_base = ${postgresql:location}/bin

81 82 83 84 85 86 87
[mioga-instance]
recipe = slapos.cookbook:mioga.instantiate
mioga_compile_dir = ${template-apacheperl:compile-directory}
# Pity that the following line does not work. Or does it?
# mioga_compile_env = ${mioga:environment}
mioga_add_to_path = ${libxslt:location}/bin:${libxml2:location}/bin
var_directory = $${rootdirectory:var}
88 89 90
instance_root = $${buildout:directory}
perl_bin = ${perl:location}/bin
postgres_bin = ${postgresql:location}/bin
91 92 93 94 95 96
htdocs = $${apacheperl-instance:htdocs}
db_host = $${postgres-urlparse:host}
db_port = $${postgres-urlparse:port}
db_dbname = $${postgres-urlparse:path}
db_username = $${postgres-urlparse:username}
db_password = $${postgres-urlparse:password}
97 98 99 100 101 102 103 104 105
public_ipv6 = $${slap-network-information:global-ipv6}
public_ipv6_port = 8080
private_ipv4 = $${slap-network-information:local-ipv4}
httpd_binary = ${apache-2.2:location}/bin/httpd
path = $${basedirectory:services}/apacheperl
htdocs = $${basedirectory:htdocs}
httpd_conf = $${rootdirectory:etc}/httpd.conf
pid_file = $${basedirectory:services}/apache.pid
lock_file = $${basedirectory:services}/apache.lock
Viktor Horvath's avatar
Viktor Horvath committed
106
dav_locks = $${rootdirectory:var}/dav_locks
107
services_dir = $${basedirectory:services}
108 109
error_log = $${rootdirectory:log}/error.log
access_log = $${rootdirectory:log}/access.log
110 111 112
bin_dir = $${rootdirectory:bin}
log_dir = $${rootdirectory:log}
site_perl = ${perl:siteprefix}