instance.cfg.in 4.04 KB
Newer Older
1 2
[buildout]
parts =
3
  switch-softwaretype
4 5

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

8 9
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
10 11
default = $${:kvm}
kvm = $${dynamic-template-kvm:rendered}
12 13
nbd = ${template-nbd:output}
frontend = ${template-frontend:output}
14

15
kvm-resilient = $${dynamic-template-kvm-resilient:rendered}
16
kvm-import = ${template-kvm-import:output}
17
kvm-export = $${dynamic-template-kvm-export:rendered}
18

19
# Used for the test of resiliency. The system wants a "test" software_type.
20
test = $${dynamic-template-kvm-resilient-test:rendered}
21

22 23
frozen = ${instance-frozen:output}
pull-backup = ${template-pull-backup:output}
24 25 26 27 28 29 30 31 32

[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}

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
[dynamic-template-kvm]
recipe = slapos.recipe.template:jinja2
template = ${template-kvm:location}/instance-kvm.cfg.jinja2
rendered = $${buildout:directory}/template-kvm.cfg
extensions = jinja2.ext.do
context =
    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
    raw debian_amd64_netinst_location ${debian-amd64-netinst.iso:location}/${debian-amd64-netinst.iso:filename}
    raw novnc_location ${noVNC:location}
    raw openssl_executable_location ${openssl:location}/bin/openssl
    raw qemu_executable_location ${kvm:location}/bin/qemu-system-x86_64
    raw qemu_img_executable_location ${kvm:location}/bin/qemu-img
    raw sixtunnel_executable_location ${6tunnel:location}/bin/6tunnel
    raw websockify_executable_location ${buildout:directory}/bin/websockify
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

58 59
[dynamic-template-kvm-resilient]
recipe = slapos.recipe.template:jinja2
60
template = ${template-kvm-resilient:location}/instance-kvm-resilient.cfg.jinja2
61
rendered = $${buildout:directory}/template-kvm-resilient.cfg
62
extensions = jinja2.ext.do
63 64 65 66
context =
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key slapparameter_dict slap-configuration:configuration
67
    raw curl_executable_location ${curl:location}/bin/curl
68 69 70 71 72 73
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

74 75 76 77 78 79 80 81 82 83 84
[dynamic-template-kvm-export]
recipe = slapos.recipe.template:jinja2
template = ${template-kvm-export:location}/instance-kvm-export.cfg.jinja2
rendered = $${buildout:directory}/template-kvm-export.cfg
extensions = jinja2.ext.do
context =
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    raw kvm_template $${dynamic-template-kvm:rendered}
    raw template_kvm_export ${template-kvm-export-script:location}/${template-kvm-export-script:filename}
    raw pbsready_export_template ${pbsready-export:output}
85
    raw gzip_binary ${gzip:location}/bin/gzip
86 87
mode = 0644

88 89 90 91 92 93 94 95
[dynamic-template-kvm-resilient-test]
recipe = slapos.recipe.template:jinja2
template = ${template-kvm-resilient-test:location}/instance-kvm-resilient-test.cfg.jinja2
rendered = $${buildout:directory}/template-kvm-resilient-test.cfg
context =
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key slapparameter_dict slap-configuration:configuration
96
    raw bin_directory ${buildout:bin-directory}
97
mode = 0644