instance.cfg 2.58 KB
Newer Older
1 2
[buildout]
parts =
3
  switch_softwaretype
4 5 6 7

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}

8 9
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
10
default = $${instance-base-runner:rendered}
11
resilient = $${instance-resilient:rendered}
12
test = $${instance-resilient-test:rendered}
13
runner = $${instance-base-runner:rendered}
14 15 16 17 18
runner-import = ${instance-runner-import:output}
runner-export = ${instance-runner-export:output}

frozen = ${instance-frozen:output}
pull-backup = ${template-pull-backup:output}
19

20
[instance-base-runner]
21 22 23 24 25 26 27 28 29 30 31 32 33
recipe = slapos.recipe.template:jinja2
template = ${template-runner:output}
rendered = $${buildout:directory}/template-runner.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
          raw curl_executable_location ${curl:location}/bin/curl
          raw dash_executable_location ${dash:location}/bin/dash
          raw dcron_executable_location ${dcron:location}/sbin/crond
mode = 0644

34 35
[instance-resilient]
recipe = slapos.recipe.template:jinja2
36
template = ${template-resilient:target}
37 38 39 40 41
rendered = $${buildout:directory}/instance-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
42
          key slapparameter_dict slap-configuration:configuration
43 44 45 46
template-parts-destination = ${template-parts:destination}
template-replicated-destination = ${template-replicated:destination}
import-list = file parts :template-parts-destination
              file replicated :template-replicated-destination
47
mode = 0644
48

49 50 51 52 53 54 55 56 57 58
[instance-resilient-test]
recipe = slapos.recipe.template:jinja2
template = ${template-resilient-test:location}/instance-resilient-test.cfg.jinja2
rendered = $${buildout:directory}/template-resilient-test.cfg
bin-directory = ${buildout:bin-directory}
context =
    key bin_directory instance-resilient-test:bin-directory
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key slapparameter_dict slap-configuration:configuration
59 60
mode = 0644

61 62
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
63 64 65 66
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
67
cert = $${slap-connection:cert-file}