Tentative to write lamp-generic in jinja.

parent 086b605c
# This instance will request other instances of lamp-generic depending on a
# list of countries.
[buildout]
parts =
request-edge
publish-connection-information
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
{% for country in country_list %}
[request-{{country}}]
recipe = request
software-url = ${slap-connection:software-release-url}
software-type = default
name = {{country}}
config = application-location
config-application-location = ${slap-parameter:application-location}
return = url backend-url
{% endfor %}
# XXX-Cedric: aggregate and send parameters
[publish-connection-information]
recipe = slapos.cookbook:publish
{% for country in country_list %}
{{ country }}-url = ${request-{{ country }}:connection_url}
{{ country }}-backend-url = ${request-{{ country }}:connection-backend_url}
{% endfor %}
......@@ -7,6 +7,35 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[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}
[dynamic-template-cloudooo]
template = ${template-edge:target}
filename = instance-edge.cfg
extra-context =
key country_list slap-configuration:country-list
# section parameter_dict dynamic-template-cloudooo-parameters
# import json_module json
# Must match the key id in [switch-softwaretype] which uses this section.
# raw software_type edge
context =
key ipv4_set slap-configuration:ipv4
key ipv6_set slap-configuration:ipv6
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key slap_software_type slap-configuration:slap-software-type
key slapparameter_dict slap-configuration:configuration
key computer_id slap-configuration:computer
${:extra-context}
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${instance-apache-php:output}
......
......@@ -15,9 +15,9 @@ md5sum = 10c316c7a1c18ea1d26bf319b5dffed1
url = ${:_profile_base_location_}/instance-apache-php.cfg.in
md5sum = 1ae55eb527eb0057e4ea798f96f0aa90
[instance-edge]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-edge.cfg.in
output = ${buildout:directory}/instance.cfg
md5sum = 6b7a6caf44e3a94bed7f89c04003a171
mode = 0644
[template-edge]
# XXX-Cedric: use h.r.download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-edge.cfg.jinja2
#md5sum = 53492e520be57f4c6a9eacd107c8d446
mode = 640
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment