instance.cfg.in 5.56 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
default = $${:kvm}
11
kvm-cluster = $${dynamic-template-kvm-cluster:rendered}
12
kvm = $${dynamic-template-kvm:rendered}
13 14
nbd = ${template-nbd:output}
frontend = ${template-frontend:output}
15

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

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

23 24
frozen = ${instance-frozen:output}
pull-backup = ${template-pull-backup:output}
25

26 27 28
# XXX - If this configuration is not generated by slapgrid, use empty values
[storage-configuration]
storage-home = 
29 30 31
  
[network-information]
global-ipv4-network = 
32

33 34 35 36 37 38 39
[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}
40
storage-home = $${storage-configuration:storage-home}
41

42 43 44 45 46 47 48 49 50 51 52
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/$${:filename}
extensions = jinja2.ext.do
mode = 0644
extra-context =
context =
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key ipv4 slap-configuration:ipv4
    key ipv6 slap-configuration:ipv6
53
    key global_ipv4_prefix network-information:global-ipv4-network
54 55
    key tap_network_dict slap-configuration:tap-network-information-dict
    key storage_dict slap-configuration:storage-dict
56 57 58 59 60 61 62 63 64 65 66 67 68
    key slapparameter_dict slap-configuration:configuration
    key computer_id slap-configuration:computer
    $${:extra-context}

[dynamic-template-kvm-cluster-parameters]

[dynamic-template-kvm-cluster]
<= jinja2-template-base
template = ${template-kvm-cluster:location}/instance-kvm-cluster.cfg.jinja2.in
filename = template-kvm-cluster.cfg
extra-context =
  section parameter_dict dynamic-template-kvm-cluster-parameters

69 70 71 72 73 74 75 76
[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
77
    key global_ipv4_prefix network-information:global-ipv4-network
78
    key slapparameter_dict slap-configuration:configuration
79 80
    key storage_dict slap-configuration:storage-dict
    key tap_network_dict slap-configuration:tap-network-information-dict
81 82 83 84 85
    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}
86
    raw netcat_bin ${netcat:location}/bin/netcat
87 88 89 90
    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
91
    raw template_httpd_cfg ${template-httpd:rendered}
92 93 94 95 96 97 98
    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

99 100
[dynamic-template-kvm-resilient]
recipe = slapos.recipe.template:jinja2
101
template = ${template-kvm-resilient:location}/instance-kvm-resilient.cfg.jinja2
102
rendered = $${buildout:directory}/template-kvm-resilient.cfg
103
extensions = jinja2.ext.do
104 105 106 107
context =
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key slapparameter_dict slap-configuration:configuration
108
    raw curl_executable_location ${curl:location}/bin/curl
109 110 111 112 113 114
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

115 116 117 118 119 120 121 122 123 124 125
[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}
126
    raw gzip_binary ${gzip:location}/bin/gzip
127 128
mode = 0644

129 130 131 132 133 134 135 136
[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
137
    raw bin_directory ${buildout:bin-directory}
138
mode = 0644