Commit 4b4f9b3d authored by Marco Mariani's avatar Marco Mariani

resdemo: render resilient template within the instance, with SLA

parent ae35b01a
# vim: set ft=cfg: # vim: set ft=cfg:
{% import 'parts' as parts %} {% import 'parts' as parts %}
{% import 'replicated' as replicated %} {% import 'replicated' as replicated with context %}
[buildout] [buildout]
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
......
...@@ -10,7 +10,7 @@ offline = true ...@@ -10,7 +10,7 @@ offline = true
[switch_softwaretype] [switch_softwaretype]
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
default = ${instance-apache-php:output} default = ${instance-apache-php:output}
resilient = ${instance-resilient:rendered} resilient = $${dynamic-template-resilient:rendered}
apache-import = ${instance-apache-import:output} apache-import = ${instance-apache-import:output}
apache-export = ${instance-apache-export:rendered} apache-export = ${instance-apache-export:rendered}
...@@ -19,3 +19,27 @@ apache-export = ${instance-apache-export:rendered} ...@@ -19,3 +19,27 @@ apache-export = ${instance-apache-export:rendered}
frozen = ${instance-frozen:output} frozen = ${instance-frozen:output}
pull-backup = ${template-pull-backup:output} pull-backup = ${template-pull-backup:output}
[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-resilient]
recipe = slapos.recipe.template:jinja2
template = ${template-resilient:location}/instance-resilient.cfg.jinja2
rendered = $${buildout:directory}/template-resilient.cfg
extensions = jinja2.ext.do
context =
key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
key slapparameter_dict slap-configuration:configuration
template-parts-destination = ${template-parts:destination}
template-replicated-destination = ${template-replicated:destination}
import-list = file parts :template-parts-destination
file replicated :template-replicated-destination
mode = 0644
...@@ -97,7 +97,7 @@ strip-top-level-dir = true ...@@ -97,7 +97,7 @@ strip-top-level-dir = true
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
md5sum = 7c43cd86aace6a0df1375ae1f68c2fb6 md5sum = 81a98c2d479287361b068a43060ae5f1
mode = 0644 mode = 0644
[instance-apache-php] [instance-apache-php]
...@@ -129,21 +129,13 @@ import-list = file parts template-parts:destination ...@@ -129,21 +129,13 @@ import-list = file parts template-parts:destination
md5sum = 0df9f940fcdb50d9697a9e59cdee566c md5sum = 0df9f940fcdb50d9697a9e59cdee566c
mode = 0644 mode = 0644
[instance-resilient] [template-resilient]
recipe = slapos.recipe.template:jinja2 recipe = hexagonit.recipe.download
template = ${:_profile_base_location_}/instance-resilient.cfg.jinja2 url = ${:_profile_base_location_}/instance-resilient.cfg.jinja2
rendered = ${buildout:directory}/instance-resilient.cfg mode = 644
extensions = jinja2.ext.do md5sum = 79ff4b0959dc00461c5a4e02550423d9
download-only = true
context = key buildout buildout:bin-directory on-update = true
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
import-list = file parts template-parts:destination
file replicated template-replicated:destination
md5sum = 6ff8c4b87c32b919e35147926925d030
mode = 0644
#---------------- #----------------
......
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