Accelerate repozo by loosening checks.
[slapos.git] / stack / erp5 / instance-tidstorage.cfg.in
1 {% if software_type == slap_software_type -%}
2 {#
3 Note: all port counters are pre-incremented. No idea why base port is skipped.
4 -#}
5 {% set current_zeo_port = zeo_port_base | int -%}
6 {% set zope_port_base = zope_port_base | int -%}
7 {% set zope_dummy_list = [] -%}
8 {% set current_apache_port = apache_port_base | int -%}
9 {% set current_haproxy_port = haproxy_port_base | int -%}
10 {% set json = json_module.loads(slapparameter_dict['json']) -%}
11 {% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
12 {#
13 XXX: This template only supports exactly one IPv4 and one IPv6 per
14 partition. No more (undefined result), no less (IndexError).
15 -#}
16 {% set ipv4 = (ipv4_set | list)[0] -%}
17 {% set ipv6 = (ipv6_set | list)[0] -%}
18 {#
19 BBB: erp5-ca['state'] has been configured as string by mistake. Keep this for
20 backward compatibility with existing automatically setup CAs.
21 -#}
22 {% set erp5_ca = json.get('erp5-ca', {
23   'country-code': 'ZZ',
24   'email': 'nobody@example.com',
25   'state': "('State',)",
26   'city': 'City',
27   'company': 'Company',
28 }) -%}
29 {% set site_id = json['site-id'] -%}
30 {% set part_list = [] -%}
31 {% set known_tid_storage_identifier_dict = {} -%}
32 {% set zodb_connection_list = [] -%}
33 {% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
34 {% macro zope(
35   name,
36   thread_amount=1,
37   timerserver_interval=0,
38   longrequest_logger_file='',
39   longrequest_logger_timeout='',
40   longrequest_logger_interval=''
41 ) -%}
42 {% set conf_name = name ~ '-conf' -%}
43 {% set conf_parameter_name = conf_name ~ '-param' -%}
44 [{{ conf_parameter_name }}]
45 < = zope-conf-parameter-base
46 pid-file = ${directory:run}/{{ name }}.pid
47 lock-file = ${directory:run}/{{ name }}.lock
48 {% do zope_dummy_list.append(None) -%}
49 {% set offset = zope_dummy_list | length -%}
50 port = {{ zope_port_base + offset }}
51 thread-amount = {{ thread_amount }}
52 {% if timerserver_interval -%}
53 timerserver-interval = {{ timerserver_interval }}
54 {% endif -%}
55 event-log = ${directory:log}/{{ name }}-event.log
56 z2-log = ${directory:log}/{{ name }}-Z2.log
57
58 [{{ conf_name }}]
59 < = zope-conf-base
60 rendered = ${directory:etc}/{{ name }}.conf
61 extra-context =
62   section parameter_dict {{ conf_parameter_name }}
63
64 [{{ section(name) }}]
65 < = zope-base
66 longrequest-logger-file = {{ longrequest_logger_file }}
67 longrequest-logger-timeout = {{ longrequest_logger_timeout }}
68 longrequest-logger-interval = {{ longrequest_logger_interval }}
69 wrapper = ${directory:services}/{{ name }}
70 configuration-file = {{ '${' ~ conf_name ~ ':rendered}' }}
71 port = {{ '${' ~ conf_parameter_name ~ ':port}' }}
72
73 [{{ section('logrotate-entry-' ~ name) }}]
74 < = logrotate-base
75 recipe = slapos.cookbook:logrotate.d
76 name = {{ name }}
77 log = {{ '${' ~ conf_parameter_name ~ ':event-log}' }} {{ '${' ~ conf_parameter_name ~ ':z2-log}' }}
78 post = {{ bin_directory }}/killpidfromfile {{ '${' ~ conf_parameter_name ~ ':pid-file}' }} SIGUSR2
79 {% endmacro -%}
80 #############################
81 # Directory creation
82 #############################
83 [directory]
84 recipe = slapos.cookbook:mkdirectory
85 apache-conf = ${:etc}/apache
86 backup = ${:srv}/backup
87 bin = ${buildout:directory}/bin
88 ca-dir = ${:srv}/ssl
89 cron-entries = ${:etc}/cron.d
90 cronstamps = ${:etc}/cronstamps
91 crontabs = ${:etc}/crontabs
92 erp5-ca-dir = ${:srv}/erp5-ssl
93 etc = ${buildout:directory}/etc
94 instance = ${:srv}/erp5shared
95 instance-constraint = ${:instance}/Constraint
96 instance-document = ${:instance}/Document
97 instance-etc = ${:instance}/etc
98 instance-etc-package-include = ${:instance}/etc/package-include
99 instance-extensions = ${:instance}/Extensions
100 instance-import = ${:instance}/import
101 instance-lib = ${:instance}/lib
102 instance-products = ${:instance}/Products
103 instance-propertysheet = ${:instance}/PropertySheet
104 instance-tests = ${:instance}/tests
105 log = ${:var}/log
106 logrotate-backup = ${:backup}/logrotate
107 logrotate-entries = ${:etc}/logrotate.d
108 run = ${:var}/run
109 services = ${:etc}/run
110 srv = ${buildout:directory}/srv
111 tidstorage = ${:srv}/tidstorage
112 tmp = ${buildout:directory}/tmp
113 var = ${buildout:directory}/var
114 zodb = ${:srv}/zodb
115 zodb-backup = ${:backup}/zodb
116
117 #############################
118 # Binary symlinking
119 #############################
120 [binary-link]
121 recipe = slapos.cookbook:symbolic.link
122 target-directory = ${directory:bin}
123 link-binary =
124   {{ parameter_dict['coreutils'] }}/bin/basename
125   {{ parameter_dict['coreutils'] }}/bin/cat
126   {{ parameter_dict['coreutils'] }}/bin/cp
127   {{ parameter_dict['coreutils'] }}/bin/ls
128   {{ parameter_dict['coreutils'] }}/bin/tr
129   {{ parameter_dict['coreutils'] }}/bin/uname
130   {{ parameter_dict['git'] }}/bin/git
131   {{ parameter_dict['graphviz'] }}/bin/dot
132   {{ parameter_dict['grep'] }}/bin/grep
133   {{ parameter_dict['imagemagick'] }}/bin/convert
134   {{ parameter_dict['imagemagick'] }}/bin/identify
135   {{ parameter_dict['mariadb'] }}/bin/mysql
136   {{ parameter_dict['mariadb'] }}/bin/mysqldump
137   {{ parameter_dict['sed'] }}/bin/sed
138   {{ parameter_dict['tesseract'] }}/bin/tesseract
139   {{ parameter_dict['w3m'] }}/bin/w3m
140   {{ parameter_dict['openssl'] }}/bin/openssl
141   {{ parameter_dict['poppler'] }}/bin/pdfinfo
142   {{ parameter_dict['poppler'] }}/bin/pdfseparate
143   {{ parameter_dict['poppler'] }}/bin/pdftotext
144   {{ parameter_dict['poppler'] }}/bin/pdftohtml
145   {{ parameter_dict['poppler'] }}/bin/pdfunite
146   {{ parameter_dict['dmtx-utils'] }}/bin/dmtxwrite
147
148 #############################
149 # CA
150 #############################
151 [cadirectory]
152 recipe = slapos.cookbook:mkdirectory
153 requests = ${directory:ca-dir}/requests
154 private = ${directory:ca-dir}/private
155 certs = ${directory:ca-dir}/certs
156 newcerts = ${directory:ca-dir}/newcerts
157 crl = ${directory:ca-dir}/crl
158
159 [certificate-authority]
160 recipe = slapos.cookbook:certificate_authority
161 openssl-binary = {{ parameter_dict['openssl'] }}/bin/openssl
162 ca-dir = ${directory:ca-dir}
163 requests-directory = ${cadirectory:requests}
164 wrapper = ${directory:services}/ca
165 ca-private = ${cadirectory:private}
166 ca-certs = ${cadirectory:certs}
167 ca-newcerts = ${cadirectory:newcerts}
168 ca-crl = ${cadirectory:crl}
169
170 #############################
171 # ERP5 CA
172 #############################
173 [erp5-cadirectory]
174 recipe = slapos.cookbook:mkdirectory
175 requests = ${directory:erp5-ca-dir}/requests
176 private = ${directory:erp5-ca-dir}/private
177 certs = ${directory:erp5-ca-dir}/certs
178 newcerts = ${directory:erp5-ca-dir}/newcerts
179 crl = ${directory:erp5-ca-dir}/crl
180
181 [erp5-certificate-authority]
182 recipe = slapos.cookbook:certificate_authority
183 openssl-binary = {{ parameter_dict['openssl'] }}/bin/openssl
184 ca-dir = ${directory:erp5-ca-dir}
185 requests-directory = ${erp5-cadirectory:requests}
186 wrapper = ${directory:services}/erp5-ca
187 ca-private = ${erp5-cadirectory:private}
188 ca-certs = ${erp5-cadirectory:certs}
189 ca-newcerts = ${erp5-cadirectory:newcerts}
190 ca-crl = ${erp5-cadirectory:crl}
191 country-code = {{ erp5_ca['country-code'] }}
192 email = {{ erp5_ca['email'] }}
193 state = {{ erp5_ca['state'] }}
194 city = {{ erp5_ca['city'] }}
195 company = {{ erp5_ca['company'] }}
196
197 #############################
198 # CRON
199 #############################
200 [cron-base]
201 cron-entries = ${directory:cron-entries}
202
203 [cron]
204 < = cron-base
205 recipe = slapos.cookbook:cron
206 dcrond-binary = {{ parameter_dict['dcron'] }}/sbin/crond
207 crontabs = ${directory:crontabs}
208 cronstamps = ${directory:cronstamps}
209 catcher = ${cron-simplelogger:wrapper}
210 binary = ${directory:services}/crond
211
212 [cron-simplelogger]
213 recipe = slapos.cookbook:simplelogger
214 wrapper = ${directory:bin}/cron_simplelogger
215 log = ${directory:log}/cron.log
216
217 #############################
218 # Logrotate
219 #############################
220 [logrotate-base]
221 logrotate-entries = ${directory:logrotate-entries}
222 backup = ${directory:logrotate-backup}
223
224 [logrotate]
225 < = logrotate-base
226 recipe = slapos.cookbook:logrotate
227 # Binaries
228 logrotate-binary = {{ parameter_dict['logrotate'] }}/usr/sbin/logrotate
229 gzip-binary = {{ parameter_dict['gzip'] }}/bin/gzip
230 gunzip-binary = {{ parameter_dict['gzip'] }}/bin/gunzip
231 # Directories
232 wrapper = ${directory:bin}/logrotate
233 conf = ${directory:etc}/logrotate.conf
234 state-file = ${directory:srv}/logrotate.status
235
236 [cron-entry-logrotate]
237 < = cron-base
238 recipe = slapos.cookbook:cron.d
239 name = logrotate
240 frequency = 0 0 * * *
241 command = ${logrotate:wrapper}
242
243 #############################
244 # ERP5 bootstrap
245 #############################
246 [erp5-bootstrap]
247 recipe = slapos.cookbook:erp5.bootstrap
248 runner-path = ${directory:services}/erp5-bootstrap
249 mysql-url = {{ slapparameter_dict['mysql-url'] }}
250 zope-url = http://${zope-admin:user}:${zope-admin:password}@${zope-admin:ip}:${zope-admin:port}/{{ site_id }}
251
252 #############################
253 # ERP5 promise
254 #############################
255 [erp5-promise]
256 recipe = slapos.cookbook:erp5.promise
257 promise-path = ${directory:etc}/erp5promise.cfg
258 kumofs-url = {{ slapparameter_dict['kumofs-url'] }}
259 memcached-url = {{ slapparameter_dict['memcached-url'] }}
260 cloudooo-url = {{ slapparameter_dict['cloudooo-url'] }}
261 smtp-url = ${slap-parameter:smtp-url}
262 bt5 = ${slap-parameter:bt5}
263 bt5-repository-url = ${slap-parameter:bt5-repository-url}
264
265 #############################
266 # ZEO
267 #############################
268 [zeo-instance-entry-common]
269 recipe = slapos.cookbook:zeo
270 ip = {{ ipv4 }}
271 binary-path = {{ bin_directory }}/runzeo
272
273 {% for zeo_id, zeo_configuration_list in json['zeo'].iteritems() -%}
274 {%   set current_zeo_port = current_zeo_port + 1 -%}
275 {%   set storage_list = [] -%}
276 {%   for zeo_slave in zeo_configuration_list -%}
277 {%     do zodb_connection_list.append((
278          zeo_slave['storage-name'],
279          zeo_slave['mount-point'] % {'site-id': site_id},
280          zeo_slave['zope-cache-size'],
281          'zeoclient',
282          {
283            'cache-size': zeo_slave['zeo-cache-size'],
284            'server': ipv4 ~ ':' ~ current_zeo_port,
285            'storage': zeo_slave['storage-name'],
286            'name': zeo_slave['storage-name'],
287          },
288        )) -%}
289 {%     set zodb_path = '${directory:zodb}/' ~ zeo_slave['storage-name'] ~ '.fs' -%}
290 {%     do storage_list.append('storage-name=%(storage-name)s zodb-path=%(zodb-path)s' % {'zodb-path': zodb_path, 'storage-name': zeo_slave['storage-name']}) -%}
291 {%     do known_tid_storage_identifier_dict.__setitem__("((('${zeo-instance-%(zeo_id)s:ip}', ${zeo-instance-%(zeo_id)s:port}),), '%(storage_name)s')" % {
292          'zeo_id': zeo_id,
293          'storage_name': zeo_slave['storage-name']
294        }, (zodb_path, '${directory:zodb-backup}/%s/' % zeo_slave['storage-name'], zeo_slave['serialize-path'] % {'site-id': site_id})) -%}
295 {%   endfor -%}
296 [{{ section('zeo-instance-%s' % zeo_id) }}]
297 < = zeo-instance-entry-common
298 log-path = ${directory:log}/zeo-{{ zeo_id }}.log
299 pid-path = ${directory:run}/zeo-{{ zeo_id }}.pid
300 conf-path = ${directory:etc}/zeo-{{ zeo_id }}.conf
301 port = {{ current_zeo_port }}
302 storage =
303   {{ storage_list | join('\n  ') }}
304 wrapper-path = ${directory:services}/zeo-{{ zeo_id }}
305
306 [{{ section('logrotate-entry-zeo-%s' % zeo_id) }}]
307 < = logrotate-base
308 recipe = slapos.cookbook:logrotate.d
309 name = zeo-{{ zeo_id }}
310 log = ${zeo-instance-{{ zeo_id }}:log-path}
311 post = {{ bin_directory }}/killpidfromfile ${zeo-instance-{{ zeo_id }}:pid-path} SIGUSR2
312
313 {% endfor -%}
314 #############################
315 # Zope
316 #############################
317 [zope-base]
318 recipe = slapos.cookbook:generic.zope.zeo.client
319 user = zope
320 ip = {{ ipv4 }}
321 timezone = {{ json['timezone'] }}
322 tidstorage-ip = ${tidstorage:ip}
323 tidstorage-port = ${tidstorage:port}
324 instance-etc = ${directory:instance-etc}
325 bt5-repository = ${directory:var}/bt5_repository
326 tmp-path = ${directory:tmp}
327 bin-path = ${directory:bin}
328 site-zcml = ${:instance-etc}/site.zcml
329 inituser = ${directory:instance}/inituser
330 runzope-binary = {{ bin_directory }}/runzope
331 bt5-repository-list =
332
333 [deadlock-debugger-password]
334 recipe = slapos.cookbook:pwgen.stable
335
336 [zope-conf-parameter-base]
337 ip = {{ ipv4 }}
338 site-id = {{ site_id }}
339 zodb-list = {{ dumps(zodb_connection_list) }}
340
341 [zope-conf-base]
342 recipe = slapos.recipe.template:jinja2
343 template = {{ parameter_dict['zope-conf-template'] }}
344 extra-context =
345 context =
346   key instance directory:instance
347   key instance_products directory:instance-products
348   raw deadlock_path /manage_debug_threads
349   key deadlock_debugger_password deadlock-debugger-password:password
350   key tidstorage_ip tidstorage:ip
351   key tidstorage_port tidstorage:port
352   key promise_path erp5-promise:promise-path
353   ${:extra-context}
354
355 # Distribution node
356 {{ zope('zope-distribution', timerserver_interval=1) }}
357 # Admin node
358 {{ zope('zope-admin') }}
359 # Activity nodes
360 {% for q in range(1, json['activity']['zopecount'] + 1) -%}
361 {{   zope('zope-activity-%s' % q, timerserver_interval=1) }}
362 {%- endfor %}
363 # Other zopes, apaches and haproxies
364 {% set publish_url_list =  [] -%}
365 {% for backend_name, backend_configuration in json['backend'].iteritems() -%}
366 {%   set haproxy_backend_list = [] -%}
367 {%   set longrequest_logger = backend_configuration.get('longrequest-logger') -%}
368 {%   for q in range(1, backend_configuration['zopecount'] + 1) -%}
369 {%     set part_name = 'zope-%s-%s' % (backend_name, q) -%}
370 {%     if longrequest_logger != None -%}
371 {%       set longrequest_logger_file = '${directory:log}/%s-longrequest.log' % (part_name, ) -%}
372 {%       set longrequest_logger_timeout = longrequest_logger.get('timeout', '4') -%}
373 {%       set longrequest_logger_interval = longrequest_logger.get('interval', '2') -%}
374 {%     else -%}
375 {%       set longrequest_logger_file = '' -%}
376 {%       set longrequest_logger_timeout = '' -%}
377 {%       set longrequest_logger_interval = '' -%}
378 {%     endif -%}
379 {{     zope(
380          part_name,
381          thread_amount=backend_configuration['thread-amount'],
382          longrequest_logger_file=longrequest_logger_file,
383          longrequest_logger_timeout=longrequest_logger_timeout,
384          longrequest_logger_interval=longrequest_logger_interval,
385        ) }}
386 {%     do haproxy_backend_list.append('${%(part_name)s:ip}:${%(part_name)s:port}' % {'part_name': part_name}) -%}
387 {%  endfor -%}
388 {%   set scheme = backend_configuration.get('scheme', ['https']) -%}
389 {%   set current_apache_port = current_apache_port + 2 -%}
390 {%   set current_haproxy_port = current_haproxy_port + 1 -%}
391 {%   if 'http' in scheme -%}
392 {%     set section_name = 'apache-public-' ~ backend_name -%}
393 {%     do publish_url_list.append(
394          'url-public-%(backend_name)s = http://[${%(section_name)s:ip}]:${%(section_name)s:port}' % {
395          'backend_name': backend_name,
396          'section_name': section_name,
397        }) -%}
398 [{{ section(section_name) }}]
399 recipe = slapos.cookbook:apache.zope.backend
400 backend = http://${haproxy-{{ backend_name }}:ip}:${haproxy-{{ backend_name }}:port}
401 ip = {{ ipv6 }}
402 port = {{ current_apache_port }}
403 scheme = http
404 wrapper = ${directory:services}/apache-public-{{ backend_name }}
405 configuration-file = ${directory:apache-conf}/apache-public-{{ backend_name }}.conf
406 access-control-string = {{ backend_configuration['access-control-string'] }}
407 pid-file = ${directory:run}/apache-public-{{ backend_name }}.pid
408 lock-file = ${directory:run}/apache-public-{{ backend_name }}.lock
409 error-log = ${directory:log}/apache-public-{{ backend_name }}-error.log
410 access-log = ${directory:log}/apache-public-{{ backend_name }}-access.log
411 apache-binary = {{ parameter_dict['apache'] }}/bin/httpd
412
413 [{{ section('logrotate-entry-apache-public-' ~ backend_name) }}]
414 < = logrotate-base
415 recipe = slapos.cookbook:logrotate.d
416 name = apache-public-{{ backend_name }}
417 log = ${apache-public-{{ backend_name }}:error-log} ${apache-public-{{ backend_name }}:access-log}
418 post = {{ bin_directory }}/killpidfromfile ${apache-public-{{ backend_name }}:pid-file} SIGUSR1
419 {%   endif -%}
420 {%   if 'https' in scheme -%}
421 {%     set section_name = 'apache-' ~ backend_name -%}
422 {%     do publish_url_list.append(
423          'url-%(backend_name)s = https://[${%(section_name)s:ip}]:${%(section_name)s:port}' % {
424          'backend_name': backend_name,
425          'section_name': section_name,
426        }) -%}
427 [{{ section(section_name) }}]
428 recipe = slapos.cookbook:apache.zope.backend
429 backend = http://${haproxy-{{ backend_name }}:ip}:${haproxy-{{ backend_name }}:port}
430 ip = {{ ipv6 }}
431 port = {{ current_apache_port - 1 }}
432 wrapper = ${directory:bin}/apache-{{ backend_name }}
433 scheme = https
434 key-file = ${directory:apache-conf}/apache-{{ backend_name }}.key
435 cert-file = ${directory:apache-conf}/apache-{{ backend_name }}.crt
436 configuration-file = ${directory:apache-conf}/apache-{{ backend_name }}.conf
437 access-control-string = {{ backend_configuration['access-control-string'] }}
438 pid-file = ${directory:run}/apache-{{ backend_name }}.pid
439 lock-file = ${directory:run}/apache-{{ backend_name }}.lock
440 ssl-session-cache = $${directory:log}/apache-ssl-session-cache
441 error-log = ${directory:log}/apache-{{ backend_name }}-error.log
442 access-log = ${directory:log}/apache-{{ backend_name }}-access.log
443 apache-binary = {{ parameter_dict['apache'] }}/bin/httpd
444 ssl-authentication = {{ backend_configuration.get('ssl-authentication', False) }}
445 backend-path = {{ backend_configuration.get('backend-path', '/') % {'site-id': site_id} }}
446 # Note: Without erp5-certificate-authority main certificate have to be hardcoded
447 ssl-authentication-certificate = ${erp5-certificate-authority:ca-dir}/cacert.pem
448 ssl-authentication-crl = ${erp5-certificate-authority:ca-crl}
449
450 [{{ section('ca-apache-' ~ backend_name) }}]
451 < = certificate-authority
452 recipe = slapos.cookbook:certificate_authority.request
453 key-file = ${apache-{{ backend_name }}:key-file}
454 cert-file = ${apache-{{ backend_name }}:cert-file}
455 executable = ${apache-{{ backend_name }}:wrapper}
456 wrapper = ${directory:services}/apache-{{ backend_name }}
457
458 [{{ section('logrotate-entry-apache-' ~ backend_name) }}]
459 < = logrotate-base
460 recipe = slapos.cookbook:logrotate.d
461 name = apache-{{ backend_name }}
462 log = ${apache-{{ backend_name }}:error-log} ${apache-{{ backend_name }}:access-log}
463 post = {{ bin_directory }}/killpidfromfile ${apache-{{ backend_name }}:pid-file} SIGUSR1
464
465 [{{ section('haproxy-' ~ backend_name) }}]
466 recipe = slapos.cookbook:haproxy
467 name = {{ backend_name }}
468 conf-path = ${directory:etc}/haproxy-{{ backend_name }}.cfg
469 socket-path = ${directory:run}/haproxy-{{ backend_name }}.sock
470 ip = {{ ipv4 }}
471 port = {{ current_haproxy_port }}
472 maxconn = {{ backend_configuration['maxconn'] }}
473 server-check-path = /{{ site_id }}/getId
474 wrapper-path = ${directory:services}/haproxy-{{ backend_name }}
475 binary-path = {{ parameter_dict['haproxy'] }}/sbin/haproxy
476 ctl-path = ${directory:bin}/haproxy-{{ backend_name }}-ctl
477 backend-list = {{ haproxy_backend_list | join(' ')}}
478 {%-  endif %}
479 {% endfor -%}
480 [{{ section('publish-apache-backend-list') }}]
481 recipe = slapos.cookbook:publish
482 {{ publish_url_list | join('\n') }}
483
484 #############################
485 # tidstorage
486 #############################
487 [tidstorage]
488 recipe = slapos.cookbook:tidstorage
489 known-tid-storage-identifier-dict = {{ known_tid_storage_identifier_dict }}
490 configuration-path = ${directory:etc}/tidstorage.py
491 ip = {{ ipv4 }}
492 port = 6001
493 timestamp-file-path = ${directory:tidstorage}/repozo_tidstorage_timestamp.log
494 logfile-name = ${directory:log}/tidstorage.log
495 pidfile-name = ${directory:run}/tidstorage.pid
496 status-file = ${directory:tidstorage}/tidstorage.tid
497 tidstorage-repozo-binary = {{ bin_directory }}/tidstorage_repozo
498 tidstoraged-binary = {{ bin_directory }}/tidstoraged
499 repozo-binary = {{ bin_directory }}/repozo
500 tidstorage-wrapper = ${directory:services}/tidstoraged
501 repozo-wrapper = ${buildout:bin-directory}/tidstorage-repozo
502
503 [cron-entry-tidstorage-backup]
504 < = cron-base
505 recipe = slapos.cookbook:cron.d
506 name = tidstorage
507 frequency = 0 0 * * *
508 command = ${tidstorage:repozo-wrapper}
509
510 [logrotate-entry-tidstorage]
511 < = logrotate-base
512 recipe = slapos.cookbook:logrotate.d
513 name = tidstorage
514 log = ${tidstorage:logfile-name}
515 post = {{ bin_directory }}/killpidfromfile ${tidstorage:pidfile-name} SIGHUP
516
517 #############################
518 # buildout main section
519 #############################
520 [buildout]
521 parts =
522   logrotate
523   cron
524   cron-entry-logrotate
525   certificate-authority
526   erp5-certificate-authority
527   tidstorage
528   cron-entry-tidstorage-backup
529   logrotate-entry-tidstorage
530   binary-link
531   erp5-promise
532   erp5-bootstrap
533   {{ part_list | join('\n  ') }}
534
535 eggs-directory = {{ eggs_directory }}
536 develop-eggs-directory = {{ develop_eggs_directory }}
537 offline = true
538 {%- endif %}