instance.cfg 1.56 KB
Newer Older
1 2
[buildout]
parts =
3
  dynamic-template-apache-replicate
4
  switch-softwaretype
5 6 7

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
8
offline = true
9

10 11 12 13 14 15 16
[slap-parameters]
recipe = slapos.cookbook:slapconfiguration
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}
17 18 19 20 21 22

[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/$${:filename}
extra-context =
context =
23
    import json_module json
24 25
    key eggs_directory buildout:eggs-directory
    key develop_eggs_directory buildout:develop-eggs-directory
26 27 28
    key slap_software_type slap-parameters:slap-software-type
    key slapparameter_dict slap-parameters:configuration
    key slave_instance_list slap-parameters:slave-instance-list
29 30
    $${:extra-context}

31 32 33 34 35 36
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${template-apache-frontend:output}
custom-personal = ${template-apache-frontend:output}
custom-group = ${template-apache-frontend:output}
replicate = $${dynamic-template-apache-replicate:rendered}
37

38
[dynamic-template-apache-replicate]
39
< = jinja2-template-base
40 41
template = ${template-apache-replicate:target}
filename = instance-apache-replicate.cfg
42 43
extensions = jinja2.ext.do
extra-context =
44 45 46
    raw template_publish_slave_information ${template-replicate-publish-slave-information:target}
# Must match the key id in [switch-softwaretype] which uses this section.
    raw software_type replicate