Merge branch 'master' into erp5-component
[slapos.git] / stack / erp5 / instance-kumofs.cfg.in
1 [buildout]
2 parts =
3   publish-kumofs-connection-information
4   kumofs-instance
5   logrotate
6   logrotate-entry-kumofs
7   cron
8   cron-entry-logrotate
9   promise-kumofs-server
10   promise-kumofs-server-listen
11   promise-kumofs-gateway
12   promise-kumofs-manager
13
14 eggs-directory = {{ eggs_directory }}
15 develop-eggs-directory = {{ develop_eggs_directory }}
16 offline = true
17
18 [publish-kumofs-connection-information]
19 recipe = slapos.cookbook:publishurl
20 url = memcached://${kumofs-instance:ip}:${kumofs-instance:gateway-port}/
21
22 [kumofs-instance]
23 recipe = slapos.cookbook:generic.kumofs
24
25 # Network options
26 ip = ${slap-network-information:local-ipv4}
27 manager-port = 13101
28 server-port = 13201
29 server-listen-port = 13202
30 gateway-port = 13301
31
32 # Paths: Running wrappers
33 gateway-wrapper = ${basedirectory:services}/kumofs_gateway
34 manager-wrapper = ${basedirectory:services}/kumofs_manager
35 server-wrapper = ${basedirectory:services}/kumofs_server
36
37 # Paths: Data
38 data-directory = ${directory:kumofs-data}
39
40 # Paths: Logs
41 kumo-gateway-log = ${basedirectory:log}/kumo-gateway.log
42 kumo-manager-log = ${basedirectory:log}/kumo-manager.log
43 kumo-server-log = ${basedirectory:log}/kumo-server.log
44
45 # Binary information
46 kumo-gateway-binary = {{ kumo_location }}/bin/kumo-gateway
47 kumo-manager-binary = {{ kumo_location }}/bin/kumo-manager
48 kumo-server-binary = {{ kumo_location }}/bin/kumo-server
49 shell-path = {{ dash_location }}/bin/dash
50
51 [logrotate-entry-kumofs]
52 <= logrotate
53 recipe = slapos.cookbook:logrotate.d
54 name = kumofs
55 log = ${kumofs-instance:kumo-gateway-log} ${kumofs-instance:kumo-manager-log}
56   ${kumofs-instance:kumo-server-log}
57
58 # rest of parts are candidates for some generic stuff
59
60 [logrotate]
61 recipe = slapos.cookbook:logrotate
62 # Binaries
63 logrotate-binary = {{ logrotate_location }}/usr/sbin/logrotate
64 gzip-binary = {{ gzip_location }}/bin/gzip
65 gunzip-binary = {{ gzip_location }}/bin/gunzip
66 # Directories
67 wrapper = ${rootdirectory:bin}/logrotate
68 conf = ${rootdirectory:etc}/logrotate.conf
69 logrotate-entries = ${directory:logrotate-entries}
70 backup = ${directory:logrotate-backup}
71 state-file = ${rootdirectory:srv}/logrotate.status
72
73 [basedirectory]
74 recipe = slapos.cookbook:mkdirectory
75 log = ${rootdirectory:var}/log
76 services = ${rootdirectory:etc}/run
77 promise = ${rootdirectory:etc}/promise
78 run = ${rootdirectory:var}/run
79 backup = ${rootdirectory:srv}/backup
80
81 [directory]
82 recipe = slapos.cookbook:mkdirectory
83 cron-entries = ${rootdirectory:etc}/cron.d
84 crontabs = ${rootdirectory:etc}/crontabs
85 cronstamps = ${rootdirectory:etc}/cronstamps
86 logrotate-backup = ${basedirectory:backup}/logrotate
87 logrotate-entries = ${rootdirectory:etc}/logrotate.d
88 kumofs-data = ${rootdirectory:srv}/kumofs
89
90 [rootdirectory]
91 recipe = slapos.cookbook:mkdirectory
92 etc = ${buildout:directory}/etc
93 var = ${buildout:directory}/var
94 srv = ${buildout:directory}/srv
95 bin = ${buildout:directory}/bin
96
97 [cron]
98 recipe = slapos.cookbook:cron
99 dcrond-binary = {{ dcron_location }}/sbin/crond
100 cron-entries = ${directory:cron-entries}
101 crontabs = ${directory:crontabs}
102 cronstamps = ${directory:cronstamps}
103 catcher = ${cron-simplelogger:wrapper}
104 binary = ${basedirectory:services}/crond
105
106 [cron-simplelogger]
107 recipe = slapos.cookbook:simplelogger
108 wrapper = ${rootdirectory:bin}/cron_simplelogger
109 log = ${basedirectory:log}/cron.log
110
111 [cron-entry-logrotate]
112 <= cron
113 recipe = slapos.cookbook:cron.d
114 name = logrotate
115 frequency = 0 0 * * *
116 command = ${logrotate:wrapper}
117
118 # Deploy zope promises scripts
119 [promise-template]
120 recipe = slapos.cookbook:check_port_listening
121 hostname = ${kumofs-instance:ip}
122 port = ${kumofs-instance:server-listen-port}
123
124 [promise-kumofs-server]
125 <= promise-template
126 path = ${basedirectory:promise}/kumofs-server
127 port = ${kumofs-instance:server-port}
128
129 [promise-kumofs-server-listen]
130 <= promise-template
131 path = ${basedirectory:promise}/kumofs-server-listen
132 port = ${kumofs-instance:server-listen-port}
133
134 [promise-kumofs-gateway]
135 <= promise-template
136 path = ${basedirectory:promise}/kumofs-gateway
137 port = ${kumofs-instance:gateway-port}
138
139 [promise-kumofs-manager]
140 <= promise-template
141 path = ${basedirectory:promise}/kumofs-manager
142 port = ${kumofs-instance:manager-port}