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