pdftk removed from erp5
[slapos.git] / stack / erp5 / instance-zope.cfg.in
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   promise-zope
16   promise-apache-zope-backend
17
18 eggs-directory = {{ eggs_directory }}
19 develop-eggs-directory = {{ develop_eggs_directory }}
20 offline = true
21
22 {% if 'frontend-software-url' in slapparameter_dict -%}
23 [request-slave-frontend]
24 recipe = slapos.cookbook:request
25 software-url = {{ slapparameter_dict['frontend-software-url'] }}
26 software-type = {{ slapparameter_dict.get('frontend-software-type', 'RootSoftwareInstance') }}
27 sla = instance_guid
28 sla-instance_guid = {{ slapparameter_dict['frontend-instance-guid'] }}
29 server-url = ${slap-connection:server-url}
30 key-file = ${slap-connection:key-file}
31 cert-file = ${slap-connection:cert-file}
32 computer-id = ${slap-connection:computer-id}
33 partition-id = ${slap-connection:partition-id}
34 name = SlaveFrontend
35 slave = true
36 {% set config_dict = {
37   'url': '${apache-zope-backend-instance:scheme}://[${apache-zope-backend-instance:ip}]:${apache-zope-backend-instance:port}',
38   'type': 'zope',
39 } -%}
40 {% if 'frontend-domain' in slapparameter_dict -%}
41 {%   do config_dict.__setitem__('custom_domain', slapparameter_dict['frontend-domain']) -%}
42 {% endif -%}
43 config = {{ config_dict.keys() | join(' ') }}
44 {% for name, value in config_dict.items() -%}
45 config-{{ name }} = {{ value }}
46 {% endfor -%}
47 return = site_url
48
49 [publish-apache-zope-backend-connection-string]
50 recipe = slapos.cookbook:publish
51 url = ${request-slave-frontend:connection-site_url}
52 login = ${zope-instance:user}
53 password = ${zope-instance:password}
54 url-deadlock = ${:url}/${zope-instance:deadlock-path}?${zope-instance:deadlock-password}
55 {% else %}
56 [publish-apache-zope-backend-connection-string]
57 recipe = slapos.cookbook:publish
58 url = https://${zope-instance:user}:${zope-instance:password}@[${apache-zope-backend-instance:ip}]:${apache-zope-backend-instance:port}
59 url-deadlock = ${:url}/${zope-instance:deadlock-path}?${zope-instance:deadlock-password}
60 {% endif %}
61
62 [apache-zope-backend-instance]
63 recipe = slapos.cookbook:apache.zope.backend
64 backend = http://${zope-instance:ip}:${zope-instance:port}/
65 ip = ${slap-network-information:global-ipv6}
66 port = 16001
67 wrapper = ${rootdirectory:bin}/apache
68 key-file = ${directory:apache-conf}/apache.key
69 cert-file = ${directory:apache-conf}/apache.crt
70 configuration-file = ${directory:apache-conf}/apache.conf
71 {# By default, if no white list is specified, backend allows access to everyone -#}
72 access-control-string = {{ slapparameter_dict.get('access-control-string', 'all') }}
73 pid-file = ${basedirectory:run}/apache.pid
74 lock-file = ${basedirectory:run}/apache.lock
75 ssl-session-cache = ${basedirectory:log}/apache-ssl-session-cache
76 error-log = ${basedirectory:log}/apache-error.log
77 access-log = ${basedirectory:log}/apache-access.log
78 apache-binary = {{ apache_location }}/bin/httpd
79 scheme = https
80
81 [ca-apache-zope-backend]
82 <= certificate-authority
83 recipe = slapos.cookbook:certificate_authority.request
84 key-file = ${apache-zope-backend-instance:key-file}
85 cert-file = ${apache-zope-backend-instance:cert-file}
86 executable = ${apache-zope-backend-instance:wrapper}
87 wrapper = ${basedirectory:services}/apache
88
89 [zope-instance]
90 recipe = slapos.cookbook:generic.zope
91
92 # Options
93 user = zope
94 port = 12001
95 ip = ${slap-network-information:local-ipv4}
96 zodb-cache-size = 5000
97 thread-amount = 4
98 zodb-path = ${directory:zodb}/main.fs
99 deadlock-path = /manage_debug_threads
100
101 # Paths
102 wrapper = ${basedirectory:services}/zope-development
103 instance-path = ${directory:instance}
104 instance-etc = ${directory:instance-etc}
105 instance-products = ${directory:instance-products}
106 bt5-repository = ${rootdirectory:var}/bt5_repository
107 tmp-path = ${rootdirectory:tmp}
108 bin-path = ${rootdirectory:bin}
109 site-zcml = ${:instance-etc}/site.zcml
110 logrotate-post = ${rootdirectory:bin}/zope-post-logrotate
111 pid-file = ${basedirectory:run}/zope.pid
112 lock-file = ${basedirectory:run}/zope.lock
113 event-log = ${basedirectory:log}/zope-event.log
114 z2-log = ${basedirectory:log}/zope-Z2.log
115 configuration-file = ${rootdirectory:etc}/zope.conf
116 inituser = ${:instance-path}/inituser
117 # Binary information
118 runzope-binary = {{ bin_directory }}/runzope
119
120 # Defaults
121 bt5-repository-list =
122
123 [logrotate]
124 recipe = slapos.cookbook:logrotate
125 # Binaries
126 logrotate-binary = {{ logrotate_location }}/usr/sbin/logrotate
127 gzip-binary = {{ gzip_location }}/bin/gzip
128 gunzip-binary = {{ gzip_location }}/bin/gunzip
129 # Directories
130 wrapper = ${rootdirectory:bin}/logrotate
131 conf = ${rootdirectory:etc}/logrotate.conf
132 logrotate-entries = ${directory:logrotate-entries}
133 backup = ${directory:logrotate-backup}
134 state-file = ${rootdirectory:srv}/logrotate.status
135
136 [logrotate-entry-zope]
137 <= logrotate
138 recipe = slapos.cookbook:logrotate.d
139 name = zope
140 log = ${zope-instance:event-log} ${zope-instance:z2-log}
141 frequency = daily
142 rotate-num = 30
143 post = {{ bin_directory }}/killpidfromfile ${zope-instance:pid-file} SIGUSR2
144 sharedscripts = true
145 notifempty = true
146 create = true
147
148 [logrotate-entry-apache-zope-backend]
149 <= logrotate
150 recipe = slapos.cookbook:logrotate.d
151 name = zope
152 log = ${apache-zope-backend-instance:error-log} ${apache-zope-backend-instance:access-log}
153 frequency = daily
154 rotate-num = 30
155 post = {{ bin_directory }}/killpidfromfile ${apache-zope-backend-instance:pid-file} SIGUSR1
156 sharedscripts = true
157 notifempty = true
158 create = true
159
160 [cron]
161 recipe = slapos.cookbook:cron
162 dcrond-binary = {{ dcron_location }}/sbin/crond
163 cron-entries = ${directory:cron-entries}
164 crontabs = ${directory:crontabs}
165 cronstamps = ${directory:cronstamps}
166 catcher = ${cron-simplelogger:wrapper}
167 binary = ${basedirectory:services}/crond
168
169 [cron-simplelogger]
170 recipe = slapos.cookbook:simplelogger
171 wrapper = ${rootdirectory:bin}/cron_simplelogger
172 log = ${basedirectory:log}/cron.log
173
174 [cron-entry-logrotate]
175 <= cron
176 recipe = slapos.cookbook:cron.d
177 name = logrotate
178 frequency = 0 0 * * *
179 command = ${logrotate:wrapper}
180
181 [binary-link]
182 recipe = slapos.cookbook:symbolic.link
183 target-directory = ${rootdirectory:bin}
184 link-binary =
185   {{ coreutils_location }}/bin/basename
186   {{ coreutils_location }}/bin/cat
187   {{ coreutils_location }}/bin/cp
188   {{ coreutils_location }}/bin/ls
189   {{ coreutils_location }}/bin/tr
190   {{ coreutils_location }}/bin/uname
191   {{ git_location }}/bin/git
192   {{ graphviz_location }}/bin/dot
193   {{ grep_location }}/bin/grep
194   {{ imagemagick_location }}/bin/convert
195   {{ imagemagick_location }}/bin/identify
196   {{ librsvg_location }}/bin/rsvg-convert
197   {{ mariadb_location }}/bin/mysql
198   {{ mariadb_location }}/bin/mysqldump
199   {{ sed_location }}/bin/sed
200   {{ tesseract_location }}/bin/tesseract
201   {{ w3m_location }}/bin/w3m
202   {{ openssl_location }}/bin/openssl
203   {{ poppler_location }}/bin/pdfinfo
204   {{ poppler_location }}/bin/pdfseparate
205   {{ poppler_location }}/bin/pdftotext
206   {{ poppler_location }}/bin/pdftohtml
207   {{ poppler_location }}/bin/pdfunite
208   {{ dmtx_utils_location }}/bin/dmtxwrite
209   {{ aspell_location }}/bin/aspell
210 [certificate-authority]
211 recipe = slapos.cookbook:certificate_authority
212 openssl-binary = {{ openssl_location }}/bin/openssl
213 ca-dir = ${directory:ca-dir}
214 requests-directory = ${cadirectory:requests}
215 wrapper = ${basedirectory:services}/ca
216 ca-private = ${cadirectory:private}
217 ca-certs = ${cadirectory:certs}
218 ca-newcerts = ${cadirectory:newcerts}
219 ca-crl = ${cadirectory:crl}
220
221 [bt5-erp5-link]
222 recipe = slapos.cookbook:symbolic.link
223 target-directory = ${basedirectory:bt5-erp5}
224 link-binary =
225   {{ erp5_location }}/product/ERP5/bootstrap
226   {{ erp5_location }}/bt5
227
228 [cadirectory]
229 recipe = slapos.cookbook:mkdirectory
230 requests = ${directory:ca-dir}/requests
231 private = ${directory:ca-dir}/private
232 certs = ${directory:ca-dir}/certs
233 newcerts = ${directory:ca-dir}/newcerts
234 crl = ${directory:ca-dir}/crl
235
236 [rootdirectory]
237 recipe = slapos.cookbook:mkdirectory
238 etc = ${buildout:directory}/etc
239 var = ${buildout:directory}/var
240 srv = ${buildout:directory}/srv
241 bin = ${buildout:directory}/bin
242 tmp = ${buildout:directory}/tmp
243
244 [basedirectory]
245 recipe = slapos.cookbook:mkdirectory
246 log = ${rootdirectory:var}/log
247 services = ${rootdirectory:etc}/run
248 promises = ${rootdirectory:etc}/promise/
249 run = ${rootdirectory:var}/run
250 backup = ${rootdirectory:srv}/backup
251 bt5-erp5 = ${rootdirectory:var}/bt5_erp5
252
253 [erp5-certificate-authority]
254 recipe = slapos.cookbook:certificate_authority
255 openssl-binary = {{ openssl_location }}/bin/openssl
256 ca-dir = ${directory:erp5-ca-dir}
257 requests-directory = ${erp5-cadirectory:requests}
258 wrapper = ${basedirectory:services}/erp5-ca
259 ca-private = ${erp5-cadirectory:private}
260 ca-certs = ${erp5-cadirectory:certs}
261 ca-newcerts = ${erp5-cadirectory:newcerts}
262 ca-crl = ${erp5-cadirectory:crl}
263
264 [erp5-cadirectory]
265 recipe = slapos.cookbook:mkdirectory
266 requests = ${directory:erp5-ca-dir}/requests
267 private = ${directory:erp5-ca-dir}/private
268 certs = ${directory:erp5-ca-dir}/certs
269 newcerts = ${directory:erp5-ca-dir}/newcerts
270 crl = ${directory:erp5-ca-dir}/crl
271
272 [directory]
273 recipe = slapos.cookbook:mkdirectory
274 zodb = ${rootdirectory:srv}/zodb
275 instance = ${rootdirectory:srv}/erp5shared
276 instance-etc = ${:instance}/etc
277 apache-conf = ${rootdirectory:etc}/apache
278 instance-etc-package-include = ${:instance}/etc/package-include
279 # because of bug in slapos.recipe.template keys are lowercased
280 instance-document = ${:instance}/Document
281 instance-propertysheet = ${:instance}/PropertySheet
282 instance-products = ${:instance}/Products
283 instance-extensions = ${:instance}/Extensions
284 instance-constraint = ${:instance}/Constraint
285 instance-import = ${:instance}/import
286 instance-lib = ${:instance}/lib
287 instance-tests = ${:instance}/tests
288 erp5-ca-dir = ${rootdirectory:srv}/erp5-ca
289 ca-dir = ${rootdirectory:srv}/ssl
290 cron-entries = ${rootdirectory:etc}/cron.d
291 crontabs = ${rootdirectory:etc}/crontabs
292 cronstamps = ${rootdirectory:etc}/cronstamps
293 logrotate-backup = ${basedirectory:backup}/logrotate
294 logrotate-entries = ${rootdirectory:etc}/logrotate.d
295
296 # Deploy zope promises scripts
297 [promise-zope]
298 recipe = slapos.cookbook:check_port_listening
299 path = ${basedirectory:promises}/zope
300 hostname = ${zope-instance:ip}
301 port = ${zope-instance:port}
302
303 [promise-apache-zope-backend]
304 recipe = slapos.cookbook:check_port_listening
305 path = ${basedirectory:promises}/apache-backend
306 hostname = ${apache-zope-backend-instance:ip}
307 port = ${apache-zope-backend-instance:port}
308