kvm: set additional route to reach global ipv4 network
[slapos.git] / software / kvm / instance.cfg.in
1 [buildout]
2 parts =
3   switch-softwaretype
4
5 eggs-directory = ${buildout:eggs-directory}
6 develop-eggs-directory = ${buildout:develop-eggs-directory}
7
8 [switch-softwaretype]
9 recipe = slapos.cookbook:softwaretype
10 default = $${:kvm}
11 kvm-cluster = $${dynamic-template-kvm-cluster:rendered}
12 kvm = $${dynamic-template-kvm:rendered}
13 nbd = ${template-nbd:output}
14 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 frozen = ${instance-frozen:output}
24 pull-backup = ${template-pull-backup:output}
25
26 # XXX - If this configuration is not generated by slapgrid, use empty values
27 [storage-configuration]
28 storage-home = 
29   
30 [network-information]
31 global-ipv4-network = 
32
33 [slap-configuration]
34 recipe = slapos.cookbook:slapconfiguration.serialised
35 computer = $${slap-connection:computer-id}
36 partition = $${slap-connection:partition-id}
37 url = $${slap-connection:server-url}
38 key = $${slap-connection:key-file}
39 cert = $${slap-connection:cert-file}
40 storage-home = $${storage-configuration:storage-home}
41
42 [jinja2-template-base]
43 recipe = slapos.recipe.template:jinja2
44 rendered = $${buildout:directory}/$${:filename}
45 extensions = jinja2.ext.do
46 mode = 0644
47 extra-context =
48 context =
49     key develop_eggs_directory buildout:develop-eggs-directory
50     key eggs_directory buildout:eggs-directory
51     key ipv4 slap-configuration:ipv4
52     key ipv6 slap-configuration:ipv6
53     key global_ipv4_prefix network-information:global-ipv4-network
54     key tap_network_dict slap-configuration:tap-network-information-dict
55     key storage_dict slap-configuration:storage-dict
56     key slapparameter_dict slap-configuration:configuration
57     key computer_id slap-configuration:computer
58     $${:extra-context}
59
60 [dynamic-template-kvm-cluster-parameters]
61
62 [dynamic-template-kvm-cluster]
63 <= jinja2-template-base
64 template = ${template-kvm-cluster:location}/instance-kvm-cluster.cfg.jinja2.in
65 filename = template-kvm-cluster.cfg
66 extra-context =
67   section parameter_dict dynamic-template-kvm-cluster-parameters
68
69 [dynamic-template-kvm]
70 recipe = slapos.recipe.template:jinja2
71 template = ${template-kvm:location}/instance-kvm.cfg.jinja2
72 rendered = $${buildout:directory}/template-kvm.cfg
73 extensions = jinja2.ext.do
74 context =
75     key develop_eggs_directory buildout:develop-eggs-directory
76     key eggs_directory buildout:eggs-directory
77     key global_ipv4_prefix network-information:global-ipv4-network
78     key slapparameter_dict slap-configuration:configuration
79     key storage_dict slap-configuration:storage-dict
80     key tap_network_dict slap-configuration:tap-network-information-dict
81     raw curl_executable_location ${curl:location}/bin/curl
82     raw dash_executable_location ${dash:location}/bin/dash
83     raw dcron_executable_location ${dcron:location}/sbin/crond
84     raw debian_amd64_netinst_location ${debian-amd64-netinst.iso:location}/${debian-amd64-netinst.iso:filename}
85     raw novnc_location ${noVNC:location}
86     raw openssl_executable_location ${openssl:location}/bin/openssl
87     raw qemu_executable_location ${kvm:location}/bin/qemu-system-x86_64
88     raw qemu_img_executable_location ${kvm:location}/bin/qemu-img
89     raw sixtunnel_executable_location ${6tunnel:location}/bin/6tunnel
90     raw websockify_executable_location ${buildout:directory}/bin/websockify
91 template-parts-destination = ${template-parts:destination}
92 template-replicated-destination = ${template-replicated:destination}
93 import-list = file parts :template-parts-destination
94               file replicated :template-replicated-destination
95 mode = 0644
96
97 [dynamic-template-kvm-resilient]
98 recipe = slapos.recipe.template:jinja2
99 template = ${template-kvm-resilient:location}/instance-kvm-resilient.cfg.jinja2
100 rendered = $${buildout:directory}/template-kvm-resilient.cfg
101 extensions = jinja2.ext.do
102 context =
103     key develop_eggs_directory buildout:develop-eggs-directory
104     key eggs_directory buildout:eggs-directory
105     key slapparameter_dict slap-configuration:configuration
106     raw curl_executable_location ${curl:location}/bin/curl
107 template-parts-destination = ${template-parts:destination}
108 template-replicated-destination = ${template-replicated:destination}
109 import-list = file parts :template-parts-destination
110               file replicated :template-replicated-destination
111 mode = 0644
112
113 [dynamic-template-kvm-export]
114 recipe = slapos.recipe.template:jinja2
115 template = ${template-kvm-export:location}/instance-kvm-export.cfg.jinja2
116 rendered = $${buildout:directory}/template-kvm-export.cfg
117 extensions = jinja2.ext.do
118 context =
119     key develop_eggs_directory buildout:develop-eggs-directory
120     key eggs_directory buildout:eggs-directory
121     raw kvm_template $${dynamic-template-kvm:rendered}
122     raw template_kvm_export ${template-kvm-export-script:location}/${template-kvm-export-script:filename}
123     raw pbsready_export_template ${pbsready-export:output}
124     raw gzip_binary ${gzip:location}/bin/gzip
125 mode = 0644
126
127 [dynamic-template-kvm-resilient-test]
128 recipe = slapos.recipe.template:jinja2
129 template = ${template-kvm-resilient-test:location}/instance-kvm-resilient-test.cfg.jinja2
130 rendered = $${buildout:directory}/template-kvm-resilient-test.cfg
131 context =
132     key develop_eggs_directory buildout:develop-eggs-directory
133     key eggs_directory buildout:eggs-directory
134     key slapparameter_dict slap-configuration:configuration
135     raw bin_directory ${buildout:bin-directory}
136 mode = 0644