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

18
kvm-resilient = $${dynamic-template-kvm-resilient:rendered}
19
kvm-import = $${dynamic-template-kvm-import:rendered}
20
kvm-export = $${dynamic-template-kvm-export:rendered}
21 22 23

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

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

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

41 42 43 44 45 46 47
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = $${buildout:directory}/$${:filename}
extensions = jinja2.ext.do
mode = 0644
extra-context =
context =
48 49 50 51 52 53 54 55 56 57
  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}
58 59 60 61 62 63 64 65 66

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

72
[dynamic-template-kvm]
73
<= jinja2-template-base
74
template = ${template-kvm:location}/instance-kvm.cfg.jinja2
75 76
filename = template-kvm.cfg
extra-context =
77
  section slap_configuration slap-configuration
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
  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
  raw dcron_executable_location ${dcron:location}/sbin/crond
  raw debian_amd64_netinst_location ${debian-amd64-netinst.iso:location}/${debian-amd64-netinst.iso:filename}
  raw file_download_script ${file-download-script:location}/${file-download-script:filename}
  raw logrotate_cfg ${template-logrotate-base:rendered}
  raw novnc_location ${noVNC:location}
  raw netcat_bin ${netcat:location}/bin/netcat
  raw python_executable ${buildout:executable}
  raw python_eggs_executable ${buildout:bin-directory}/${eggs:interpreter}
  raw qemu_executable_location ${kvm:location}/bin/qemu-system-x86_64
  raw qemu_img_executable_location ${kvm:location}/bin/qemu-img
  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
100 101
template-parts-destination = ${template-parts:target}
template-replicated-destination = ${template-replicated:target}
102 103 104
import-list = file parts :template-parts-destination
              file replicated :template-replicated-destination

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

122 123 124 125 126 127 128 129 130 131
[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}
132
    key pbsready_export_template template-pbsready-export:rendered
133
    raw gzip_binary ${gzip:location}/bin/gzip
134 135 136 137 138
    key slapparameter_dict slap-configuration:configuration
mode = 0644

[dynamic-template-kvm-import]
recipe = slapos.recipe.template:jinja2
139
template = ${template-kvm-import:location}/instance-kvm-import.cfg.jinja2.in
140 141 142 143 144
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
145
    raw qemu_location ${kvm:location}
146 147 148 149 150
    raw template_kvm_import ${template-kvm-import-script:location}/${template-kvm-import-script:filename}
    raw pbsready_import_template ${pbsready-import:output}
    key slapparameter_dict slap-configuration:configuration
    raw zcat_binary ${gzip:location}/bin/zcat
    raw gzip_binary ${gzip:location}/bin/gzip
151 152
mode = 0644