instance.cfg 1.82 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
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
33
default = $${dynamic-template-apache-replicate:rendered}
34
RootSoftwareInstance = $${dynamic-template-apache-replicate:rendered}
35 36 37
custom-personal = $${dynamic-template-apache-replicate:rendered}
single-default = ${template-apache-frontend:output}
single-custom-personal = ${template-apache-frontend:output}
38
replicate = $${dynamic-template-apache-replicate:rendered}
39

40
[dynamic-template-apache-replicate]
41
< = jinja2-template-base
42 43
template = ${template-apache-replicate:target}
filename = instance-apache-replicate.cfg
44 45
extensions = jinja2.ext.do
extra-context =
46 47
    raw template_publish_slave_information ${template-replicate-publish-slave-information:target}
# Must match the key id in [switch-softwaretype] which uses this section.
48
    raw software_type RootSoftwareInstance-default-custom-personal-replicate
49 50
    raw template_monitor ${monitor2-template:rendered}