Provide executable shell
[slapos.git] / software / erp5 / instance-zope.cfg
1 [buildout]
2 parts =
3   certificate-authority
4   publish-apache-zope-backend-connection-string
5   zope-instance
6   apache-zope-backend-instance
7   ca-apache-zope-backend
8   logrotate
9   erp5-certificate-authority
10   logrotate-entry-zope
11   cron
12   cron-entry-logrotate
13   binary-link
14   bt5-erp5-link
15
16 eggs-directory = ${buildout:eggs-directory}
17 develop-eggs-directory = ${buildout:develop-eggs-directory}
18 offline = true
19
20 [slap-parameter]
21 # By default backend disallows the access
22 access-control-string = none
23
24 [publish-apache-zope-backend-connection-string]
25 recipe = slapos.cookbook:publish
26 url = https://$${zope-instance:user}:$${zope-instance:password}@[$${apache-zope-backend-instance:ip}]:$${apache-zope-backend-instance:port}
27 url-deadlock = $${:url}/$${zope-instance:deadlock-path}?$${zope-instance:deadlock-password}
28
29 [apache-zope-backend-instance]
30 recipe = slapos.cookbook:apache.zope.backend
31 backend = http://$${zope-instance:ip}:$${zope-instance:port}/
32 ip = $${slap-network-information:global-ipv6}
33 port = 16001
34 wrapper = $${rootdirectory:bin}/apache
35 key-file = $${directory:apache-conf}/apache.key
36 cert-file = $${directory:apache-conf}/apache.crt
37 configuration-file = $${directory:apache-conf}/apache.conf
38 access-control-string = $${slap-parameter:access-control-string}
39 pid-file = $${basedirectory:run}/apache.pid
40 lock-file = $${basedirectory:run}/apache.lock
41 error-log = $${basedirectory:log}/apache-error.log
42 access-log = $${basedirectory:log}/apache-access.log
43 apache-binary = ${apache:location}/bin/httpd
44
45 [ca-apache-zope-backend]
46 <= certificate-authority
47 recipe = slapos.cookbook:certificate_authority.request
48 key-file = $${apache-zope-backend-instance:key-file}
49 cert-file = $${apache-zope-backend-instance:cert-file}
50 executable = $${apache-zope-backend-instance:wrapper}
51 wrapper = $${basedirectory:services}/apache
52
53 [zope-instance]
54 recipe = slapos.cookbook:generic.zope
55
56 # XXX: products won't be needed as soon as all ERP5 (and products-deps)
57 # products will be eggified so then it will be possible to use them thanks to
58 # availability in software's eggs
59 products = ${products:list}
60
61 # Options
62 user = zope
63 port = 12001
64 ip = $${slap-network-information:local-ipv4}
65 zodb-cache-size = 5000
66 thread-amount = 4
67 zodb-path = $${directory:zodb}/main.fs
68 deadlock-path = /manage_debug_threads
69
70 # Paths
71 wrapper = $${basedirectory:services}/zope-development
72 instance-path = $${directory:instance}
73 instance-etc = $${directory:instance-etc}
74 instance-products = $${directory:instance-products}
75 bt5-repository = $${rootdirectory:var}/bt5_repository
76 tmp-path = $${rootdirectory:tmp}
77 bin-path = $${rootdirectory:bin}
78 site-zcml = $${:instance-etc}/site.zcml
79 logrotate-post = $${rootdirectory:bin}/zope-post-logrotate
80 pid-file = $${basedirectory:run}/zope.pid
81 lock-file = $${basedirectory:run}/zope.lock
82 event-log = $${basedirectory:log}/zope-event.log
83 z2-log = $${basedirectory:log}/zope-Z2.log
84 configuration-file = $${rootdirectory:etc}/zope.conf
85 inituser = $${:instance-path}/inituser
86 # Binary information
87 runzope-binary = ${buildout:bin-directory}/runzope
88
89 # Defaults
90 bt5-repository-list =
91
92 [logrotate]
93 recipe = slapos.cookbook:logrotate
94 # Binaries
95 logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
96 gzip-binary = ${gzip:location}/bin/gzip
97 gunzip-binary = ${gzip:location}/bin/gunzip
98 # Directories
99 wrapper = $${rootdirectory:bin}/logrotate
100 conf = $${rootdirectory:etc}/logrotate.conf
101 logrotate-entries = $${directory:logrotate-entries}
102 backup = $${directory:logrotate-backup}
103 state-file = $${rootdirectory:srv}/logrotate.status
104
105 [logrotate-entry-zope]
106 <= logrotate
107 recipe = slapos.cookbook:logrotate.d
108 name = zope
109 log = $${zope-instance:event-log} $${zope-instance:z2-log}
110 frequency = daily
111 rotate-num = 30
112 post = ${buildout:bin-directory}/killpidfromfile $${zope-instance:pid-file} SIGUSR2
113 sharedscripts = true
114 notifempty = true
115 create = true
116
117 [logrotate-entry-apache-zope-backend]
118 <= logrotate
119 recipe = slapos.cookbook:logrotate.d
120 name = zope
121 log = $${apache-zope-backend-instance:error-log} $${apache-zope-backend-instance:access-log}
122 frequency = daily
123 rotate-num = 30
124 post = ${buildout:bin-directory}/killpidfromfile $${apache-zope-backend-instance:pid-file} SIGUSR1
125 sharedscripts = true
126 notifempty = true
127 create = true
128
129 [cron]
130 recipe = slapos.cookbook:cron
131 dcrond-binary = ${dcron:location}/sbin/crond
132 cron-entries = $${directory:cron-entries}
133 crontabs = $${directory:crontabs}
134 cronstamps = $${directory:cronstamps}
135 catcher = $${cron-simplelogger:binary}
136 binary = $${basedirectory:services}/crond
137
138 [cron-simplelogger]
139 recipe = slapos.cookbook:simplelogger
140 binary = $${rootdirectory:bin}/cron_simplelogger
141 output = $${directory:cronoutput}
142
143 [cron-entry-logrotate]
144 <= cron
145 recipe = slapos.cookbook:cron.d
146 name = logrotate
147 frequency = 0 0 * * *
148 command = $${logrotate:wrapper}
149
150 [binary-link]
151 recipe = slapos.cookbook:symbolic.link
152 target-directory = $${rootdirectory:bin}
153 link-binary = 
154   ${coreutils:location}/bin/basename
155   ${coreutils:location}/bin/cat
156   ${coreutils:location}/bin/cp
157   ${coreutils:location}/bin/ls
158   ${coreutils:location}/bin/tr
159   ${coreutils:location}/bin/uname
160   ${git:location}/bin/git
161   ${graphviz:location}/bin/dot
162   ${grep:location}/bin/grep
163   ${imagemagick:location}/bin/convert
164   ${imagemagick:location}/bin/identify
165   ${mariadb:location}/bin/mysql
166   ${mariadb:location}/bin/mysqldump
167   ${pdftk:location}/bin/pdftk
168   ${sed:location}/bin/sed
169   ${tesseract:location}/bin/tesseract
170   ${w3m:location}/bin/w3m
171   ${poppler:location}/bin/pdfinfo
172   ${poppler:location}/bin/pdftotext
173   ${poppler:location}/bin/pdftohtml
174 [certificate-authority]
175 recipe = slapos.cookbook:certificate_authority
176 openssl-binary = ${openssl:location}/bin/openssl
177 ca-dir = $${directory:ca-dir}
178 requests-directory = $${cadirectory:requests}
179 wrapper = $${basedirectory:services}/ca
180 ca-private = $${cadirectory:private}
181 ca-certs = $${cadirectory:certs}
182 ca-newcerts = $${cadirectory:newcerts}
183 ca-crl = $${cadirectory:crl}
184
185 [bt5-erp5-link]
186 recipe = slapos.cookbook:symbolic.link
187 target-directory = $${basedirectory:bt5-erp5}
188 link-binary =
189   ${erp5:location}/product/ERP5/bootstrap
190   ${erp5:location}/bt5
191
192 [cadirectory]
193 recipe = slapos.cookbook:mkdirectory
194 requests = $${directory:ca-dir}/requests
195 private = $${directory:ca-dir}/private
196 certs = $${directory:ca-dir}/certs
197 newcerts = $${directory:ca-dir}/newcerts
198 crl = $${directory:ca-dir}/crl
199
200 [rootdirectory]
201 recipe = slapos.cookbook:mkdirectory
202 etc = $${buildout:directory}/etc
203 var = $${buildout:directory}/var
204 srv = $${buildout:directory}/srv
205 bin = $${buildout:directory}/bin
206 tmp = $${buildout:directory}/tmp
207
208 [basedirectory]
209 recipe = slapos.cookbook:mkdirectory
210 log = $${rootdirectory:var}/log
211 services = $${rootdirectory:etc}/run
212 run = $${rootdirectory:var}/run
213 backup = $${rootdirectory:srv}/backup
214 bt5-erp5 = $${rootdirectory:var}/bt5_erp5
215
216 [erp5-certificate-authority]
217 recipe = slapos.cookbook:certificate_authority
218 openssl-binary = ${openssl:location}/bin/openssl
219 ca-dir = $${directory:erp5-ca-dir}
220 requests-directory = $${erp5-cadirectory:requests}
221 wrapper = $${basedirectory:services}/erp5-ca
222 ca-private = $${erp5-cadirectory:private}
223 ca-certs = $${erp5-cadirectory:certs}
224 ca-newcerts = $${erp5-cadirectory:newcerts}
225 ca-crl = $${erp5-cadirectory:crl}
226
227 [erp5-cadirectory]
228 recipe = slapos.cookbook:mkdirectory
229 requests = $${directory:erp5-ca-dir}/requests/
230 private = $${directory:erp5-ca-dir}/private/
231 certs = $${directory:erp5-ca-dir}/certs/
232 newcerts = $${directory:erp5-ca-dir}/newcerts/
233 crl = $${directory:erp5-ca-dir}/crl/
234
235 [directory]
236 recipe = slapos.cookbook:mkdirectory
237 zodb = $${rootdirectory:srv}/zodb
238 instance = $${rootdirectory:srv}/erp5shared
239 instance-etc = $${:instance}/etc
240 apache-conf = $${rootdirectory:etc}/apache
241 instance-etc-package-include = $${:instance}/etc/package-include
242 # because of bug in slapos.recipe.template keys are lowercased
243 instance-document = $${:instance}/Document
244 instance-propertysheet = $${:instance}/PropertySheet
245 instance-products = $${:instance}/Products
246 instance-extensions = $${:instance}/Extensions
247 instance-constraint = $${:instance}/Constraint
248 instance-import = $${:instance}/import
249 instance-lib = $${:instance}/lib
250 instance-tests = $${:instance}/tests
251 erp5-ca-dir = $${rootdirectory:srv}/erp5-ca/
252 ca-dir = $${rootdirectory:srv}/ssl
253 cron-entries = $${rootdirectory:etc}/cron.d
254 crontabs = $${rootdirectory:etc}/crontabs
255 cronstamps = $${rootdirectory:etc}/cronstamps
256 cronoutput = $${basedirectory:log}/cron
257 logrotate-backup = $${basedirectory:backup}/logrotate
258 logrotate-entries = $${rootdirectory:etc}/logrotate.d