stack.erp5: Stop using slapos.cookbook:generic.zope.zeo.client .
Such complex recipes prevent evolution. Split it into individual components already covered by existing recipes.
... | @@ -162,20 +162,6 @@ template = inline: {{ ' | ... | @@ -162,20 +162,6 @@ template = inline: {{ ' |
rendered = ${directory:etc}/hosts | rendered = ${directory:etc}/hosts | ||
context = key host_dict hosts-parameter:host-dict | context = key host_dict hosts-parameter:host-dict | ||
[preload-userhosts-runzope-parameter] | |||
runzope-binary = {{ bin_directory }}/runzope | |||
userhosts = {{ parameter_dict['userhosts'] }} | |||
shell-path = {{ parameter_dict['dash'] }}/bin/dash | |||
hosts = ${hosts:rendered} | |||
hostaliases = ${hostaliases:rendered} | |||
[preload-userhosts-runzope] | |||
recipe = slapos.recipe.template:jinja2 | |||
rendered = ${directory:bin}/runzope_userhosts_preloaded | |||
context = section parameter_dict preload-userhosts-runzope-parameter | |||
template = {{ parameter_dict['runzope-userhosts-preloaded-template'] }} | |||
mode = 755 | |||
{# Hack to deploy SSL certs via instance parameters -#} | {# Hack to deploy SSL certs via instance parameters -#} | ||
{% for zodb in zodb_dict.itervalues() -%} | {% for zodb in zodb_dict.itervalues() -%} | ||
{% set storage_dict = zodb.setdefault('storage-dict', {}) -%} | {% set storage_dict = zodb.setdefault('storage-dict', {}) -%} | ||
... | @@ -197,19 +183,31 @@ pem = {{dumps(storage_dict.pop(k))}} | ... | @@ -197,19 +183,31 @@ pem = {{dumps(storage_dict.pop(k))}} |
{% endfor -%} | {% endfor -%} | ||
{# endhack -#} | {# endhack -#} | ||
[zope-base] | [runzope-base] | ||
recipe = slapos.cookbook:generic.zope.zeo.client | recipe = slapos.cookbook:wrapper | ||
inituser = ${directory:instance}/inituser | environment = | ||
user = {{ dumps(slapparameter_dict['inituser-login']) }} | HOSTALIASES=${hostaliases:rendered} | ||
password = {{ dumps(slapparameter_dict['inituser-password']) }} | HOSTS=${hosts:rendered} | ||
timezone = {{ dumps(slapparameter_dict['timezone']) }} | TMP=${directory:tmp} | ||
tmp-path = ${directory:tmp} | TMPDIR=${directory:tmp} | ||
instancehome-path = ${directory:instance} | HOME=${buildout:directory} | ||
home-path = ${buildout:directory} | PATH=${directory:bin}:{{ parameter_dict['coreutils'] }}/bin | ||
bin-path = ${directory:bin}:{{ parameter_dict['coreutils'] }}/bin | TZ={{ slapparameter_dict['timezone'] }} | ||
site-zcml = ${directory:instance-etc}/site.zcml | INSTANCE_HOME=${directory:instance} | ||
runzope-binary = ${preload-userhosts-runzope:rendered} | parameters-extra = true | ||
bt5-repository = | command-line = '{{ parameter_dict['userhosts'] }}' '{{ bin_directory }}/runzope' -C '${:configuration-file}' | ||
[{{ section('zcml') }}] | |||
recipe = slapos.cookbook:symbolic.link | |||
target-directory = ${directory:instance-etc} | |||
link-binary = {{ parameter_dict['site-zcml'] }} | |||
|
|||
[{{ section('zope-inituser') }}] | |||
recipe = slapos.recipe.template:jinja2 | |||
rendered = ${directory:instance}/inituser | |||
template = inline:{{ slapparameter_dict['inituser-login'] }}:{SHA}{{ hashlib.sha1(slapparameter_dict['inituser-password']).digest().encode('base64').rstrip() }} | |||
mode = 600 | |||
once = ${:rendered}_done | |||
[zope-conf-parameter-base] | [zope-conf-parameter-base] | ||
ip = {{ ipv4 }} | ip = {{ ipv4 }} | ||
... | @@ -309,8 +307,8 @@ context = | ... | @@ -309,8 +307,8 @@ context = |
section parameter_dict {{ conf_parameter_name }} | section parameter_dict {{ conf_parameter_name }} | ||
[{{ section(name) }}] | [{{ section(name) }}] | ||
< = zope-base | < = runzope-base | ||
wrapper = ${directory:service-on-watch}/{{ name }} | wrapper-path = ${directory:service-on-watch}/{{ name }} | ||
configuration-file = {{ '${' ~ conf_name ~ ':rendered}' }} | configuration-file = {{ '${' ~ conf_name ~ ':rendered}' }} | ||
[{{ section("promise-" ~ name) }}] | [{{ section("promise-" ~ name) }}] | ||
... | ... |