instance-erp5.cfg.in 21 KB
Newer Older
1
{% import "root_common" as root_common with context -%}
2
{% import "caucase" as caucase with context %}
3
{% set frontend_dict = slapparameter_dict.get('frontend', {}) -%}
4 5
{% set has_frontend = frontend_dict.get('software-url', '') != '' -%}
{% set site_id = slapparameter_dict.get('site-id', 'erp5') -%}
6 7
{% set inituser_login = slapparameter_dict.get('inituser-login', 'zope') -%}
{% set publish_dict = {'site-id': site_id, 'inituser-login': inituser_login} -%}
8
{% set has_posftix = slapparameter_dict.get('smtp', {}).get('postmaster') -%}
9
{% set jupyter_dict = slapparameter_dict.get('jupyter', {}) -%}
10
{% set has_jupyter = jupyter_dict.get('enable', jupyter_enable_default.lower() in ('true', 'yes')) -%}
11
{% set jupyter_zope_family = jupyter_dict.get('zope-family', '') -%}
12 13 14 15 16 17 18 19 20 21
{% set test_runner_enabled = slapparameter_dict.get('test-runner', {}).get('enabled', True) -%}
{% set test_runner_node_count = slapparameter_dict.get('test-runner', {}).get('node-count', 3) -%}
{% set test_runner_extra_database_count = slapparameter_dict.get('test-runner', {}).get('extra-database-count', 3) -%}
{% set test_runner_total_database_count = test_runner_node_count * (1 + test_runner_extra_database_count) -%}
{# Backward compatibility for mariadb.test-database-amount #}
{% set mariadb_test_database_amount = slapparameter_dict.get('mariadb', {}).get('test-database-amount') -%}
{% if mariadb_test_database_amount is not none -%}
{%   set test_runner_total_database_count = mariadb_test_database_amount %}
{%   set test_runner_enabled = mariadb_test_database_amount > 0 %}
{% endif -%}
22
{% set monitor_base_url_dict = {} -%}
23
{% set monitor_dict = slapparameter_dict.get('monitor', {}) %}
24
{% set use_ipv6 = slapparameter_dict.get('use-ipv6', False) -%}
25 26 27 28 29 30 31 32
{% set partition_thread_count_list = [] -%}
{% set zope_partition_dict = slapparameter_dict.get('zope-partition-dict', {'1': {}}) -%}
{% for zope_parameter_dict in zope_partition_dict.values() -%}
{#   Apply some zope_parameter_dict default values, to avoid duplication. -#}
{%   do zope_parameter_dict.setdefault('thread-amount', 4) -%}
{%   do zope_parameter_dict.setdefault('instance-count', 1) -%}
{%   do partition_thread_count_list.append(zope_parameter_dict['thread-amount'] * zope_parameter_dict['instance-count']) -%}
{% endfor -%}
33
[request-common]
34
<= request-common-base
35
config-use-ipv6 = {{ dumps(slapparameter_dict.get('use-ipv6', False)) }}
36
config-computer-memory-percent-threshold = {{ dumps(monitor_dict.get('computer-memory-percent-threshold', 80)) }}
37
{% set caucase_url = slapparameter_dict.get('caucase', {}).pop('url', '') -%}
38

39
{% macro request(name, software_type, config_key, config, ret={'url': True}, key_config={}) -%}
40 41 42
{% do config.update(slapparameter_dict.get(config_key, {})) -%}
{% set section = 'request-' ~ name -%}
[{{ section }}]
43
<= request-common
44 45
name = {{ name }}
software-type = {{ software_type }}
46 47
return = {{ ' '.join(ret) }}
{% for ret, publish in ret.iteritems() -%}
48
{%   if publish -%}
49 50 51
{%     do publish_dict.__setitem__(name ~ '-' ~ ret, '${' ~ section ~ ':connection-' ~ ret ~ '}') %}
{%   endif -%}
{%   if ret == "monitor-base-url" -%}
52
{%     do monitor_base_url_dict.__setitem__(section, '${' ~ section ~ ':connection-' ~ ret ~ '}') -%}
53 54
{%   endif -%}
{% endfor -%}
55
{{ root_common.sla(name) }}
56 57
{% for k, v in config.iteritems() -%}
config-{{ k }} = {{ dumps(v) }}
58
{% endfor -%}
59 60 61
{% for k, v in key_config.iteritems() -%}
config-{{ k }} = {{ '${' ~ v ~ '}' }}
{% endfor -%}
62
config-name = {{ name }}
63
{% endmacro -%}
64

65 66
[directory]
recipe = slapos.cookbook:mkdirectory
67 68
bin = ${buildout:directory}/bin
service-on-watch = ${buildout:directory}/etc/service
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
srv = ${buildout:directory}/srv
backup-caucased = ${:srv}/backup/caucased

{% set caucase_dict = slapparameter_dict.get('caucase', {}) -%}
{% set caucase_url = caucase_dict.get('url') -%}
{% if not caucase_url -%}
{%   if use_ipv6 -%}
{%     set caucase_host = '[' ~ (ipv6_set | list)[0] ~ ']' %}
{%-  else -%}
{%     set caucase_host = (ipv4_set | list)[0] %}
{%-  endif %}
{%   set caucase_port = caucase_dict.get('base-port', 8890) -%}
{%   set caucase_netloc = caucase_host ~ ':' ~ caucase_port -%}
{%   set caucase_url = 'http://' ~ caucase_netloc -%}
{{   caucase.caucased(
       prefix='caucased',
       buildout_bin_directory=bin_directory,
       caucased_path='${directory:service-on-watch}/caucased',
       backup_dir='${directory:backup-caucased}',
       data_dir='${directory:srv}/caucased',
       netloc=caucase_netloc,
       service_auto_approve_count=caucase_dict.get('service-auto-approve-amount', 1),
       user_auto_approve_count=caucase_dict.get('user-auto-approve-amount', 0),
       key_len=caucase_dict.get('key-length', 2048),
)}}
{% do root_common.section('caucased') -%}
{% do root_common.section('caucased-promise') -%}
{% endif -%}
{% do publish_dict.__setitem__('caucase-http-url', caucase_url) -%}
{% set balancer_dict = slapparameter_dict.get('balancer', {}) -%}
{% do balancer_dict.setdefault('ssl', {}).setdefault('caucase-url', caucase_url) -%}

101 102
{{ request('memcached-persistent', 'kumofs', 'kumofs', {'tcpv4-port': 2000}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
{{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64}, {'url': True, 'monitor-base-url': False}, key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
103 104 105 106 107 108 109
{# Notes on max-connection-count: On a standard ERP5, each transaction
   can have 4 connections to mariadb: activities, catalog, deferred and
   transactionless. Count 5 to have some headroom. Multiply by the total
   number of zope threads for all processes from all partitions to get the
   expected number of connections. Add 50 for have some more zope-independent
   headroom (automated probes, replication, ...).
-#}
110 111 112 113 114 115
{{ request('mariadb', 'mariadb', 'mariadb',
  {
    'tcpv4-port': 2099,
    'max-slowqueries-threshold': monitor_dict.get('max-slowqueries-threshold', 1000),
    'slowest-query-threshold': monitor_dict.get('slowest-query-threshold', ''),
    'test-database-amount': test_runner_total_database_count,
116
    'max-connection-count': sum(partition_thread_count_list) * 5 + 50,
117 118 119 120 121 122 123 124
  },
  {
    'database-list': True,
    'test-database-list': True,
    'monitor-base-url': False,
  },
  key_config={'monitor-passwd': 'monitor-htpasswd:passwd'},
) }}
125
{% if has_posftix -%}
126
{{   request('smtp', 'postfix', 'smtp', {'tcpv4-port': 2025, 'smtpd-sasl-user': 'erp5@nowhere'}, key_config={'smtpd-sasl-password': 'publish-early:smtpd-sasl-password', 'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
127 128 129 130 131
{%- else %}
[request-smtp]
# Placeholder smtp service URL
connection-url = smtp://127.0.0.2:0/
{%- endif %}
132 133 134 135 136 137 138 139

{# ZODB -#}
{% set zodb_dict = {} -%}
{% set storage_dict = {} -%}
{% set mountpoints = set() -%}
{% for zodb in slapparameter_dict.get('zodb') or ({'type': 'zeo', 'server': {}},) -%}
{%   do mountpoints.add(zodb.setdefault('mount-point', '/')) -%}
{%   set name = zodb.pop('name', 'root') -%}
140
{%   do assert(name not in zodb_dict, name, zodb_dict) -%}
141 142 143 144 145
{%   do zodb_dict.__setitem__(name, zodb) -%}
{%   if 'server' in zodb -%}
{%     do storage_dict.setdefault(zodb['type'], {}).__setitem__(name, zodb.pop('server')) -%}
{%   endif -%}
{% endfor -%}
146 147
{% do assert(len(mountpoints) == len(zodb_dict)) -%}
{% set neo = [] -%}
148
{% for server_type, server_dict in storage_dict.iteritems() -%}
149 150
{%   if server_type == 'neo' -%}
{%     set ((name, server_dict),) = server_dict.items() -%}
151
{%     do neo.append(server_dict.get('cluster')) -%}
152
{%     do server_dict.update(cluster='${publish-early:neo-cluster}') -%}
Julien Muchembled's avatar
Julien Muchembled committed
153
{{     root_common.request_neo(server_dict, 'zodb-neo', 'neo-', monitor_base_url_dict) }}
154 155 156 157
{%     set client_dict = zodb_dict[name].setdefault('storage-dict', {}) -%}
{%     for k in 'ssl', '_ca', '_cert', '_key' -%}
{%       do k in server_dict and client_dict.setdefault(k, server_dict[k]) -%}
{%     endfor -%}
158 159
{%   else -%}
{{     assert(server_type == 'zeo', server_type) -}}
160
{# BBB: for compatibility, keep 'zodb' as partition_reference for ZEO -#}
161
{{     request('zodb', 'zodb-' ~ server_type, 'zodb-' ~ server_type, {'tcpv4-port': 2100, 'zodb-dict': server_dict}, dict.fromkeys(('storage-dict', 'tidstorage-ip', 'tidstorage-port', 'monitor-base-url')), key_config={'monitor-passwd': 'monitor-htpasswd:passwd'}) }}
162
{%   endif -%}
163
{% endfor -%}
164

165

166 167 168
{% set zope_address_list_id_dict = {} -%}
{% if zope_partition_dict -%}

169
[request-zope-base]
170
<= request-common
171 172
return =
  zope-address-list
173
  hosts-dict
174
  monitor-base-url
175
  software-release-url
176 177 178
{%- if test_runner_enabled %}
  test-runner-address-list
{% endif %}
179 180 181 182 183 184
{% set bt5_default_list = [
  'erp5_full_text_mroonga_catalog',
  'erp5_configurator_standard',
  'erp5_configurator_maxma_demo',
  'erp5_configurator_run_my_doc',
] -%}
185
{% if has_jupyter -%}
186
{%   do bt5_default_list.append('erp5_data_notebook') -%}
187
{% endif -%}
188
config-bt5 = {{ dumps(slapparameter_dict.get('bt5', ' '.join(bt5_default_list))) }}
189
config-bt5-repository-url = {{ dumps(slapparameter_dict.get('bt5-repository-url', local_bt5_repository)) }}
190
config-cloudooo-url = {{ dumps(slapparameter_dict.get('cloudooo-url', default_cloudooo_url)) }}
191
config-caucase-url = {{ dumps(caucase_url) }}
192
config-deadlock-debugger-password = ${publish-early:deadlock-debugger-password}
193
config-developer-list = {{ dumps(slapparameter_dict.get('developer-list', [inituser_login])) }}
194
config-selenium-server-configuration-dict = {{ dumps(slapparameter_dict.get('selenium-server-configuration-dict', {})) }}
195
config-hosts-dict = {{ dumps(slapparameter_dict.get('hosts-dict', {})) }}
196
config-hostalias-dict = {{ dumps(slapparameter_dict.get('hostalias-dict', {})) }}
197
config-id-store-interval = {{ dumps(slapparameter_dict.get('id-store-interval')) }}
198 199
config-zope-longrequest-logger-error-threshold = {{ dumps(monitor_dict.get('zope-longrequest-logger-error-threshold', 20)) }}
config-zope-longrequest-logger-maximum-delay = {{ dumps(monitor_dict.get('zope-longrequest-logger-maximum-delay', 0)) }}
200
config-inituser-login = {{ dumps(inituser_login) }}
201
config-inituser-password = ${publish-early:inituser-password}
202 203
config-kumofs-url = ${request-memcached-persistent:connection-url}
config-memcached-url = ${request-memcached-volatile:connection-url}
204
config-monitor-passwd = ${monitor-htpasswd:passwd}
205 206 207
config-mysql-test-url-list = ${request-mariadb:connection-test-database-list}
config-mysql-url-list = ${request-mariadb:connection-database-list}
config-site-id = {{ dumps(site_id) }}
208
config-smtp-url = ${request-smtp:connection-url}
209
config-timezone = {{ dumps(slapparameter_dict.get('timezone', 'UTC')) }}
210
config-cloudooo-retry-count = {{ slapparameter_dict.get('cloudooo-retry-count', 2) }}
211
config-wendelin-core-zblk-fmt = {{ dumps(slapparameter_dict.get('wendelin-core-zblk-fmt', '')) }}
212
config-wsgi = {{ dumps(slapparameter_dict.get('wsgi', True)) }}
213
config-zodb-dict = {{ dumps(zodb_dict) }}
214
config-test-runner-enabled = {{ dumps(test_runner_enabled) }}
215
config-test-runner-node-count = {{ dumps(test_runner_node_count) }}
216 217
{% for server_type, server_dict in storage_dict.iteritems() -%}
{%   if server_type == 'neo' -%}
218
config-neo-cluster = ${publish-early:neo-cluster}
219
config-neo-name = {{ server_dict.keys()[0] }}
220
config-neo-masters = ${publish-early:neo-masters}
221
{%   else -%}
222
config-zodb-zeo = ${request-zodb:connection-storage-dict}
223 224
config-tidstorage-ip = ${request-zodb:connection-tidstorage-ip}
config-tidstorage-port = ${request-zodb:connection-tidstorage-port}
225 226
{%   endif -%}
{% endfor -%}
227
software-type = zope
228 229

{% set zope_family_dict = {} -%}
230
{% set zope_family_name_list = [] -%}
231 232
{% set zope_backend_path_dict = {} -%}
{% set ssl_authentication_dict = {} -%}
233
{% set jupyter_zope_family_default = [] -%}
234
{% for custom_name, zope_parameter_dict in zope_partition_dict.items() -%}
235 236
{%   set partition_name = 'zope-' ~ custom_name -%}
{%   set section_name = 'request-' ~ partition_name -%}
237
{%   set promise_software_url_section_name = 'promise-software-url' ~ partition_name -%}
238
{%   set zope_family = zope_parameter_dict.get('family', 'default') -%}
239
{%   do zope_family_name_list.append(zope_family) %}
240
{%   set backend_path = zope_parameter_dict.get('backend-path', '') % {'site-id': site_id} %}
241 242 243 244 245 246
{#   # default jupyter zope family is first zope family. -#}
{#   # use list.append() to update it, because in jinja2 set changes only local scope. -#}
{%   if not jupyter_zope_family_default -%}
{%     do jupyter_zope_family_default.append(zope_family) -%}
{%   endif -%}
{%   do zope_family_dict.setdefault(zope_family, []).append(section_name) -%}
247 248
{%   do zope_backend_path_dict.__setitem__(zope_family, backend_path) -%}
{%   do ssl_authentication_dict.__setitem__(zope_family, zope_parameter_dict.get('ssl-authentication', False)) -%}
249
[{{ section_name }}]
250
<= request-zope-base
251
name = {{ partition_name }}
252
{% do monitor_base_url_dict.__setitem__(section_name, '${' ~ section_name ~ ':connection-monitor-base-url}') -%}
253
{{ root_common.sla(partition_name) }}
254
config-name = {{ dumps(custom_name) }}
255
config-instance-count = {{ dumps(zope_parameter_dict['instance-count']) }}
256
config-private-dev-shm = {{ zope_parameter_dict.get('private-dev-shm', '') }}
257
config-thread-amount = {{ dumps(zope_parameter_dict['thread-amount']) }}
258 259 260
config-timerserver-interval = {{ dumps(zope_parameter_dict.get('timerserver-interval', 5)) }}
config-longrequest-logger-interval = {{ dumps(zope_parameter_dict.get('longrequest-logger-interval', -1)) }}
config-longrequest-logger-timeout = {{ dumps(zope_parameter_dict.get('longrequest-logger-timeout', 1)) }}
261
config-large-file-threshold = {{ dumps(zope_parameter_dict.get('large-file-threshold', "10MB")) }}
262
config-port-base = {{ dumps(zope_parameter_dict.get('port-base', 2200)) }}
263
config-webdav = {{ dumps(zope_parameter_dict.get('webdav', False)) }}
264
{%   if test_runner_enabled -%}
265
config-test-runner-apache-url-list = ${publish-early:{{ zope_family }}-test-runner-url-list}
266 267 268 269 270 271 272 273 274 275 276 277

[{{ promise_software_url_section_name }}]
# Promise to wait for zope partition to use the expected software URL,
# used on upgrades.
recipe = slapos.cookbook:check_parameter
value = {{ '${' ~ section_name ~ ':connection-software-release-url}' }}
expected-not-value =
expected-value = ${slap-connection:software-release-url}
path = ${directory:bin}/${:_buildout_section_name_}

{% do root_common.section(promise_software_url_section_name) -%}

278
{%   endif -%}
279 280
{% endfor -%}

281 282 283 284 285 286
{# if not explicitly configured, connect jupyter to first zope family, which  -#}
{# will be 'default' if zope families are not configured also -#}
{% if not jupyter_zope_family and jupyter_zope_family_default -%}
{%   set jupyter_zope_family = jupyter_zope_family_default[0] -%}
{% endif -%}

287 288 289 290 291 292 293 294 295 296
{# We need to concatenate lists that we cannot read as lists, so this gets hairy. -#}
{% set zope_family_parameter_dict = {} -%}
{% for family_name, zope_section_id_list in zope_family_dict.items() -%}
{%   for zope_section_id in zope_section_id_list -%}
{%     set parameter_name = 'zope-family-entry-' ~ zope_section_id -%}
{%     do zope_address_list_id_dict.__setitem__(zope_section_id, parameter_name) -%}
{%     do zope_family_parameter_dict.setdefault(family_name, []).append(parameter_name) -%}
{%   endfor -%}
{%   if has_frontend -%}
{%     set frontend_name = 'frontend-' ~ family_name -%}
297
{%     do publish_dict.__setitem__('family-' ~ family_name, '${' ~ frontend_name ~ ':connection-site_url}' ) -%}
298
[{{ frontend_name }}]
299
<= request-frontend-base
300
name = {{ frontend_name }}
301
config-url = ${request-balancer:connection-{{ family_name }}-v6}
302
{%   else -%}
303 304
{%     do publish_dict.__setitem__('family-' ~ family_name, '${request-balancer:connection-' ~ family_name ~ '}' ) -%}
{%     do publish_dict.__setitem__('family-' ~ family_name ~ '-v6', '${request-balancer:connection-' ~ family_name ~ '-v6}' ) -%}
305 306 307
{%   endif -%}
{% endfor -%}

308 309 310 311 312 313 314 315 316 317 318 319 320 321
{% if has_jupyter -%}
{# request jupyter connected to balancer of proper zope family -#}
{{   request('jupyter', 'jupyter', 'jupyter', {}, key_config={'erp5-url': 'request-balancer:connection-' ~ jupyter_zope_family}) }}

{%   if has_frontend -%}
[frontend-jupyter]
<= request-frontend-base
name = frontend-jupyter
config-url = ${request-jupyter:connection-url}
{#     # override jupyter-url in publish_dict with frontend address -#}
{%     do publish_dict.__setitem__('jupyter-url', '${frontend-jupyter:connection-site_url}') -%}
{%   endif -%}
{%- endif %}

322
[request-balancer]
323
<= request-common
324 325
name = balancer
software-type = balancer
326
{{ root_common.sla('balancer') }}
327
return =
328
  monitor-base-url
329 330 331
{%- for family in zope_family_dict %}
  {{ family }}
  {{ family }}-v6
332 333 334
  {% if test_runner_enabled %}
  {{ family }}-test-runner-url-list
  {% endif %}
335
{% endfor -%}
336
{% do monitor_base_url_dict.__setitem__('request-balancer', '${' ~ 'request-balancer' ~ ':connection-monitor-base-url}') -%}
337
config-zope-family-dict = {{ dumps(zope_family_parameter_dict) }}
338
config-tcpv4-port = {{ dumps(balancer_dict.get('tcpv4-port', 2150)) }}
339 340
{% for zope_section_id, name in zope_address_list_id_dict.items() -%}
config-{{ name }} = {{ ' ${' ~ zope_section_id ~ ':connection-zope-address-list}' }}
341 342 343
{%   if test_runner_enabled -%}
config-{{ name }}-test-runner-address-list = {{ ' ${' ~ zope_section_id ~ ':connection-test-runner-address-list}' }}
{%   endif -%}
344 345
{% endfor -%}
# XXX: should those really be same for all families ?
346
config-haproxy-server-check-path = {{ dumps(balancer_dict.get('haproxy-server-check-path', '/') % {'site-id': site_id}) }}
347
config-monitor-passwd = ${monitor-htpasswd:passwd}
348
config-ssl = {{ dumps(balancer_dict['ssl']) }}
349
config-name = ${:name}
350 351
config-backend-path-dict = {{ dumps(zope_backend_path_dict) }}
config-ssl-authentication-dict = {{ dumps(ssl_authentication_dict) }}
352 353
config-apachedex-promise-threshold = {{ dumps(monitor_dict.get('apachedex-promise-threshold', 70)) }}
config-apachedex-configuration = {{ dumps(monitor_dict.get('apachedex-configuration',
354
'--erp5-base +erp5 .*/VirtualHostRoot/erp5(/|\\?|$) --base +other / --skip-user-agent Zabbix --error-detail --js-embed --quiet')) }}
355

356 357
[request-frontend-base]
{% if has_frontend -%}
358
<= request-common
Roque's avatar
Roque committed
359
recipe = slapos.cookbook:request
360 361
software-url = {{ dumps(frontend_dict['software-url']) }}
software-type = {{ dumps(frontend_dict.get('software-type', 'RootSoftwareInstance')) }}
362
{{ root_common.sla('frontend', True) }}
363 364 365 366 367 368 369
slave = true
{% set config_dict = {
  'type': 'zope',
} -%}
{%   if frontend_dict.get('domain') -%}
{%     do config_dict.__setitem__('custom_domain', frontend_dict['domain']) -%}
{%   endif -%}
370 371 372 373 374 375
{%   if frontend_dict.get('virtualhostroot-http-port') -%}
{%     do config_dict.__setitem__('virtualhostroot-http-port', frontend_dict['virtualhostroot-http-port']) -%}
{%   endif -%}
{%   if frontend_dict.get('virtualhostroot-https-port') -%}
{%     do config_dict.__setitem__('virtualhostroot-https-port', frontend_dict['virtualhostroot-https-port']) -%}
{%   endif -%}
376 377 378 379 380
{%   for name, value in config_dict.items() -%}
config-{{ name }} = {{ value }}
{%   endfor -%}
return = site_url
{% endif -%}
381

382 383
{% endif -%}{# if zope_partition_dict -#}

384
[publish]
385
<= monitor-publish
386
recipe = slapos.cookbook:publish.serialised
387
-extends = publish-early
388
{% if zope_address_list_id_dict -%}
389 390 391 392 393
{#
Pick any published hosts-dict, they are expected to be identical - and there is
no way to check here.
-#}
hosts-dict = {{ '${' ~ zope_address_list_id_dict.keys()[0] ~ ':connection-hosts-dict}' }}
394
{% endif -%}
395
{% for name, value in publish_dict.items() -%}
396
{{   name }} = {{ value }}
397
{% endfor -%}
398 399
{% if test_runner_enabled -%}
{%   for zope_family_name in zope_family_name_list -%}
400
{{ zope_family_name }}-test-runner-url-list = ${request-balancer:connection-{{ zope_family_name }}-test-runner-url-list}
401 402
{%   endfor -%}
{% endif -%}
403 404 405 406 407 408 409 410 411

[publish-early]
recipe = slapos.cookbook:publish-early
-init =
  inituser-password gen-password:passwd
  deadlock-debugger-password gen-deadlock-debugger-password:passwd
{%- if has_posftix %}
  smtpd-sasl-password gen-smtpd-sasl-password:passwd
{%- endif %}
412 413
{%- if test_runner_enabled %}
{%-   for zope_family_name in zope_family_name_list %}
414
  {{ zope_family_name }}-test-runner-url-list default-balancer-test-runner-url-list:{{ zope_family_name }}
415 416
{%-   endfor %}
{%- endif %}
417 418
{%- if neo %}
  neo-cluster gen-neo-cluster:name
419 420
  neo-admins neo-cluster:admins
  neo-masters neo-cluster:masters
421 422 423 424 425 426 427 428 429 430 431
{%-  if neo[0] %}
neo-cluster = {{ dumps(neo[0]) }}
{%-  endif %}
{%- endif %}
{%- set inituser_password = slapparameter_dict.get('inituser-password') %}
{%- if inituser_password %}
inituser-password = {{ dumps(inituser_password) }}
{%- endif %}
{%- set deadlock_debugger_password = slapparameter_dict.get('deadlock-debugger-password') -%}
{%- if deadlock_debugger_password %}
deadlock-debugger-password = {{ dumps(deadlock_debugger_password) }}
432
{% endif %}
433

434
{%- if test_runner_enabled %}
435 436
[default-balancer-test-runner-url-list]
recipe =
437 438 439 440
{%-   for zope_family_name in zope_family_name_list %}
{{ zope_family_name }} = not-ready
{%-   endfor %}
{%- endif %}
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456

[gen-password]
recipe = slapos.cookbook:generate.password
storage-path =

[gen-deadlock-debugger-password]
<= gen-password

[gen-neo-cluster-base]
<= gen-password

[gen-neo-cluster]
name = neo-${gen-neo-cluster-base:passwd}

[gen-smtpd-sasl-password]
< = gen-password
457

458
{{ root_common.common_section() }}
459 460

[monitor-conf-parameters]
461
monitor-title = ERP5
462 463 464 465 466 467
password = ${monitor-htpasswd:passwd}

[monitor-base-url-dict]
{% for key, value in monitor_base_url_dict.items() -%}
{{ key }} = {{ value }}
{% endfor %}