slapconfiguration recipe
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
context =
key slapparameter_dict slap-configuration:configuration
#instance-zope.cfg.in
{% set instance_index_list = range(slapparameter_dict['instance-count']) -%}
{% for i in instance_index_list -%}
{{ zope(
i,
next_port(),
) }}
{% endfor -%}
slapconfiguration recipe is used when an instance is built. It receives parameters entered by user from SlapOS Master. Thanks to this, user can change application environment dynamically via SlapOS Master.