instance.cfg.in 7.33 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
extends = ${template-resilient-templates:output}

10
[switch_softwaretype]
11
recipe = slapos.cookbook:switch-softwaretype
12
default = $${:kvm}
13 14 15
kvm-cluster = dynamic-template-kvm-cluster:rendered
kvm = dynamic-template-kvm:rendered
nbd = dynamic-template-nbd:rendered
16

17 18 19
kvm-resilient = dynamic-template-kvm-resilient:rendered
kvm-import = dynamic-template-kvm-import:rendered
kvm-export = dynamic-template-kvm-export:rendered
20

21 22 23 24 25
frozen = instance-frozen:rendered
pull-backup = template-pull-backup:rendered

# BBB
RootSoftwareInstance = $${:default}
26

27 28
# XXX - If this configuration is not generated by slapgrid, use empty values
[storage-configuration]
29 30
storage-home =

31
[network-information]
32
global-ipv4-network =
33

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

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

[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
  raw logrotate_cfg ${template-logrotate-base:rendered}
70
  raw template_content ${template-content:location}/${template-content:filename}
71
  raw template_httpd_cfg ${template-httpd:rendered}
72
  raw template_monitor ${monitor2-template:rendered}
73

74
[dynamic-template-kvm]
75
<= jinja2-template-base
76
template = ${template-kvm:location}/instance-kvm.cfg.jinja2
77 78
filename = template-kvm.cfg
extra-context =
79
  section slap_configuration slap-configuration
80 81 82
  raw ansible_promise_tpl ${template-ansible-promise:location}/${template-ansible-promise:filename}
  raw curl_executable_location ${curl:location}/bin/curl
  raw dash_executable_location ${dash:location}/bin/dash
83
  raw dnsresolver_executable ${buildout:bin-directory}/dnsresolver
84 85
  raw dcron_executable_location ${dcron:location}/sbin/crond
  raw debian_amd64_netinst_location ${debian-amd64-netinst.iso:location}/${debian-amd64-netinst.iso:filename}
86 87
  raw whitelist_domains_default ${whitelist-domains-default:location}/${whitelist-domains-default:filename}
  raw whitelist_firewall_download_controller ${whitelist-firewall-download-controller:target}
88 89
  raw image_download_controller ${image-download-controller:target}
  raw image_download_config_creator ${image-download-config-creator:target}
90 91 92 93
  raw logrotate_cfg ${template-logrotate-base:rendered}
  raw novnc_location ${noVNC:location}
  raw netcat_bin ${netcat:location}/bin/netcat
  raw python_executable ${buildout:executable}
94
  raw python_eggs_executable ${buildout:bin-directory}/${python-with-eggs:interpreter}
Julien Muchembled's avatar
Julien Muchembled committed
95 96
  raw qemu_executable_location ${qemu:location}/bin/qemu-system-x86_64
  raw qemu_img_executable_location ${qemu:location}/bin/qemu-img
97 98 99 100 101 102 103 104 105
  raw qemu_start_promise_tpl ${template-qemu-ready:location}/${template-qemu-ready:filename}
  raw sixtunnel_executable_location ${6tunnel:location}/bin/6tunnel
  raw template_httpd_cfg ${template-httpd:rendered}
  raw template_content ${template-content:location}/${template-content:filename}
  raw template_kvm_controller_run ${template-kvm-controller:location}/${template-kvm-controller:filename}
  raw template_kvm_run ${template-kvm-run:location}/${template-kvm-run:filename}
  raw template_monitor ${monitor2-template:rendered}
  raw websockify_executable_location ${buildout:directory}/bin/websockify
  raw wipe_disk_wrapper ${buildout:directory}/bin/securedelete
106 107
template-parts-destination = ${template-parts:target}
template-replicated-destination = ${template-replicated:target}
108 109 110
import-list = file parts :template-parts-destination
              file replicated :template-replicated-destination

111 112
[dynamic-template-kvm-resilient]
recipe = slapos.recipe.template:jinja2
113
template = ${template-kvm-resilient:location}/instance-kvm-resilient.cfg.jinja2
114
rendered = $${buildout:directory}/template-kvm-resilient.cfg
115
extensions = jinja2.ext.do
116 117 118 119
context =
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
    key slapparameter_dict slap-configuration:configuration
120
    raw curl_executable_location ${curl:location}/bin/curl
121
    raw template_monitor ${monitor2-template:rendered}
122 123
template-parts-destination = ${template-parts:target}
template-replicated-destination = ${template-replicated:target}
124 125 126 127
import-list = file parts :template-parts-destination
              file replicated :template-replicated-destination
mode = 0644

128 129 130 131 132 133 134 135 136 137
[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}
138
    key pbsready_export_template template-pbsready-export:rendered
139
    raw gzip_binary ${gzip:location}/bin/gzip
140 141 142 143 144
    key slapparameter_dict slap-configuration:configuration
mode = 0644

[dynamic-template-kvm-import]
recipe = slapos.recipe.template:jinja2
145
template = ${template-kvm-import:location}/instance-kvm-import.cfg.jinja2.in
146 147 148 149 150
rendered = $${buildout:directory}/template-kvm-import.cfg
extensions = jinja2.ext.do
context =
    key develop_eggs_directory buildout:develop-eggs-directory
    key eggs_directory buildout:eggs-directory
Julien Muchembled's avatar
Julien Muchembled committed
151
    raw qemu_location ${qemu:location}
152
    raw template_kvm_import ${template-kvm-import-script:location}/${template-kvm-import-script:filename}
153
    key pbsready_import_template template-pbsready-import:rendered
154 155 156
    key slapparameter_dict slap-configuration:configuration
    raw zcat_binary ${gzip:location}/bin/zcat
    raw gzip_binary ${gzip:location}/bin/gzip
157 158
mode = 0644

159 160 161 162 163 164 165 166 167
[dynamic-template-nbd]
<= jinja2-template-base
template = ${template-nbd:location}/instance-nbd.cfg.jinja2
filename = template-nbd.cfg
context =
  section slap_configuration slap-configuration
  key slapparameter_dict slap-configuration:configuration
  key eggs_directory buildout:eggs-directory
  key develop_eggs_directory buildout:develop-eggs-directory
Julien Muchembled's avatar
Julien Muchembled committed
168
  raw qemu_nbd_executable_location ${qemu:location}/bin/qemu-nbd
169 170 171
  raw dash_executable_location ${dash:location}/bin/dash
  raw onetimeupload_executable_location ${buildout:bin-directory}/onetimeupload
  raw template_monitor ${monitor2-template:rendered}