blob: 44132d006be1f696f9a66cd4b2b6c2ad93d85063 [file] [log] [blame]
Victor Ryzhenkina95d1732017-11-16 19:02:19 +04001# This environment requires 50.5 GB of RAM and 270GB of Storage. Run with caution.
2{% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %}
3
4{% import 'k8s-ha-contrail/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
5{% import 'k8s-ha-contrail/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
6{% import 'k8s-ha-contrail/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA_1604 with context %}
7{% import 'k8s-ha-contrail/underlay--user-data1404.yaml' as CLOUDINIT_USER_DATA_1404 with context %}
8
9---
10aliases:
11 - &interface_model {{ os_env('INTERFACE_MODEL', 'virtio') }}
12 - &cloudinit_meta_data {{ CLOUDINIT_META_DATA }}
13 - &cloudinit_user_data_cfg01 {{ CLOUDINIT_USER_DATA_CFG01 }}
14 - &cloudinit_user_data_1604 {{ CLOUDINIT_USER_DATA_1604 }}
15 - &cloudinit_user_data_1404 {{ CLOUDINIT_USER_DATA_1404 }}
16
17{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME', 'k8s-ha-contrail') %}
18{% set DOMAIN_NAME = os_env('DOMAIN_NAME', LAB_CONFIG_NAME) + '.local' %}
19{% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01.' + DOMAIN_NAME) %}
20{% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %}
21{% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %}
22{% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %}
23{% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp0.' + DOMAIN_NAME) %}
24{% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp1.' + DOMAIN_NAME) %}
25{% set HOSTNAME_NTW01 = os_env('HOSTNAME_NTW01', 'ntw01.' + DOMAIN_NAME) %}
26{% set HOSTNAME_NTW02 = os_env('HOSTNAME_NTW02', 'ntw02.' + DOMAIN_NAME) %}
27{% set HOSTNAME_NTW03 = os_env('HOSTNAME_NTW03', 'ntw03.' + DOMAIN_NAME) %}
28{% set HOSTNAME_VSRX01 = os_env('HOSTNAME_VSRX01', 'vsrx01.' + DOMAIN_NAME) %}
29
30template:
31 devops_settings:
32 env_name: {{ os_env('ENV_NAME', 'k8s-ha-contrail_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }}
33
34 address_pools:
35
36 private-pool01:
37 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '172.16.10.0/24:24') }}
38 params:
39 ip_reserved:
40 gateway: +1
41 l2_network_device: +1
42 default_{{ HOSTNAME_CFG01 }}: +100
43 default_{{ HOSTNAME_CTL01 }}: +101
44 default_{{ HOSTNAME_CTL02 }}: +102
45 default_{{ HOSTNAME_CTL03 }}: +103
46 default_{{ HOSTNAME_CMP01 }}: +105
47 default_{{ HOSTNAME_CMP02 }}: +106
48 default_{{ HOSTNAME_NTW01 }}: +110
49 default_{{ HOSTNAME_NTW02 }}: +111
50 default_{{ HOSTNAME_NTW03 }}: +112
51 default_{{ HOSTNAME_VSRX01 }}: +90
52 ip_ranges:
53 dhcp: [+90, -10]
54
55 public-pool01:
56 net: {{ os_env('PUBLIC_ADDRESS_POOL01', '192.168.10.0/24:24') }}
57 params:
58 ip_reserved:
59 gateway: +1
60 l2_network_device: +1
61 default_{{ HOSTNAME_CFG01 }}: +100
62 default_{{ HOSTNAME_CTL01 }}: +101
63 default_{{ HOSTNAME_CTL02 }}: +102
64 default_{{ HOSTNAME_CTL03 }}: +103
65 default_{{ HOSTNAME_CMP01 }}: +105
66 default_{{ HOSTNAME_CMP02 }}: +106
67 default_{{ HOSTNAME_NTW01 }}: +110
68 default_{{ HOSTNAME_NTW02 }}: +111
69 default_{{ HOSTNAME_NTW03 }}: +112
70 default_{{ HOSTNAME_VSRX01 }}: +90
71 ip_ranges:
72 dhcp: [+90, -10]
73
74 admin-pool01:
75 net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.0.0/24:24') }}
76 params:
77 ip_reserved:
78 gateway: +1
79 l2_network_device: +1
80 default_{{ HOSTNAME_CFG01 }}: +15
81 default_{{ HOSTNAME_CTL01 }}: +101
82 default_{{ HOSTNAME_CTL02 }}: +102
83 default_{{ HOSTNAME_CTL03 }}: +103
84 default_{{ HOSTNAME_CMP01 }}: +105
85 default_{{ HOSTNAME_CMP02 }}: +106
86 default_{{ HOSTNAME_NTW01 }}: +110
87 default_{{ HOSTNAME_NTW02 }}: +111
88 default_{{ HOSTNAME_NTW03 }}: +112
89 default_{{ HOSTNAME_VSRX01 }}: +90
90 ip_ranges:
91 dhcp: [+10, -10]
92
93 groups:
94 - name: default
95 driver:
96 name: devops.driver.libvirt
97 params:
98 connection_string: !os_env CONNECTION_STRING, qemu:///system
99 storage_pool_name: !os_env STORAGE_POOL_NAME, default
100 stp: True
101 hpet: False
102 enable_acpi: true
103 use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true
104 use_hugepages: !os_env DRIVER_USE_HUGEPAGES, false
105
106 network_pools:
107 private: private-pool01
108 public: public-pool01
109 admin: admin-pool01
110
111 l2_network_devices:
112 private:
113 address_pool: private-pool01
114 dhcp: true
115
116 public:
117 address_pool: public-pool01
118 dhcp: true
119 forward:
120 mode: nat
121
122 admin:
123 address_pool: admin-pool01
124 dhcp: true
125
126 group_volumes:
127 - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes.
128 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
129 format: qcow2
130
131 - name: cloudimage1404
132 source_image: !os_env IMAGE_PATH1404
133 format: qcow2
134
135 - name: vsrx_image
136 source_image: !os_env IMAGE_VSRX
137 format: qcow2
138
139 nodes:
140 - name: {{ HOSTNAME_CFG01 }}
141 role: salt_master
142 params:
143 vcpu: !os_env SLAVE_NODE_CPU, 2
144 memory: !os_env SLAVE_NODE_MEMORY, 4096
145 boot:
146 - hd
147 cloud_init_volume_name: iso
148 cloud_init_iface_up: ens3
149 volumes:
150 - name: system
151 capacity: !os_env NODE_VOLUME_SIZE, 20
152 backing_store: cloudimage1604
153 format: qcow2
154 - name: iso # Volume with name 'iso' will be used
155 # for store image with cloud-init metadata.
156 capacity: 1
157 format: raw
158 device: cdrom
159 bus: ide
160 cloudinit_meta_data: *cloudinit_meta_data
161 cloudinit_user_data: *cloudinit_user_data_cfg01
162
163 interfaces:
164 - label: ens3
165 l2_network_device: public
166 interface_model: *interface_model
167 - label: ens4
168 l2_network_device: private
169 interface_model: *interface_model
170 - label: ens5
171 l2_network_device: admin
172 interface_model: *interface_model
173
174 network_config:
175 ens3:
176 networks:
177 - public
178 ens4:
179 networks:
180 - private
181 ens5:
182 networks:
183 - admin
184
185 - name: {{ HOSTNAME_CTL01 }}
186 role: k8s_controller
187 params:
188 vcpu: !os_env SLAVE_NODE_CPU, 2
189 memory: !os_env SLAVE_NODE_MEMORY, 4096
190 boot:
191 - hd
192 cloud_init_volume_name: iso
193 cloud_init_iface_up: ens3
194 volumes:
195 - name: system
196 capacity: !os_env NODE_VOLUME_SIZE, 20
197 backing_store: cloudimage1604
198 format: qcow2
199 - name: cinder
200 capacity: 50
201 format: qcow2
202 - name: iso # Volume with name 'iso' will be used
203 # for store image with cloud-init metadata.
204 capacity: 1
205 format: raw
206 device: cdrom
207 bus: ide
208 cloudinit_meta_data: *cloudinit_meta_data
209 cloudinit_user_data: *cloudinit_user_data_1604
210
211 interfaces: &interfaces
212 - label: ens3
213 l2_network_device: public
214 interface_model: *interface_model
215 - label: ens4
216 l2_network_device: private
217 interface_model: *interface_model
218 - label: ens5
219 l2_network_device: admin
220 interface_model: *interface_model
221 network_config: &network_config
222 ens3:
223 networks:
224 - public
225 ens4:
226 networks:
227 - private
228 ens5:
229 networks:
230 - admin
231
232 - name: {{ HOSTNAME_CTL02 }}
233 role: salt_minion
234 params:
235 vcpu: !os_env SLAVE_NODE_CPU, 2
236 memory: !os_env SLAVE_NODE_MEMORY, 4096
237 boot:
238 - hd
239 cloud_init_volume_name: iso
240 cloud_init_iface_up: ens3
241 volumes:
242 - name: system
243 capacity: !os_env NODE_VOLUME_SIZE, 20
244 backing_store: cloudimage1604
245 format: qcow2
246 - name: cinder
247 capacity: 50
248 format: qcow2
249 - name: iso # Volume with name 'iso' will be used
250 # for store image with cloud-init metadata.
251 capacity: 1
252 format: raw
253 device: cdrom
254 bus: ide
255 cloudinit_meta_data: *cloudinit_meta_data
256 cloudinit_user_data: *cloudinit_user_data_1604
257
258 interfaces: *interfaces
259 network_config: *network_config
260
261 - name: {{ HOSTNAME_CTL03 }}
262 role: salt_minion
263 params:
264 vcpu: !os_env SLAVE_NODE_CPU, 2
265 memory: !os_env SLAVE_NODE_MEMORY, 4096
266 boot:
267 - hd
268 cloud_init_volume_name: iso
269 cloud_init_iface_up: ens3
270 volumes:
271 - name: system
272 capacity: !os_env NODE_VOLUME_SIZE, 20
273 backing_store: cloudimage1604
274 format: qcow2
275 - name: cinder
276 capacity: 50
277 format: qcow2
278 - name: iso # Volume with name 'iso' will be used
279 # for store image with cloud-init metadata.
280 capacity: 1
281 format: raw
282 device: cdrom
283 bus: ide
284 cloudinit_meta_data: *cloudinit_meta_data
285 cloudinit_user_data: *cloudinit_user_data_1604
286
287 interfaces: *interfaces
288 network_config: *network_config
289
290 - name: {{ HOSTNAME_CMP01 }}
291 role: salt_minion
292 params:
293 vcpu: !os_env SLAVE_NODE_CPU, 2
294 memory: !os_env SLAVE_NODE_MEMORY, 4096
295 boot:
296 - hd
297 cloud_init_volume_name: iso
298 cloud_init_iface_up: ens3
299 volumes:
300 - name: system
301 capacity: !os_env NODE_VOLUME_SIZE, 20
302 backing_store: cloudimage1604
303 format: qcow2
304 - name: iso # Volume with name 'iso' will be used
305 # for store image with cloud-init metadata.
306 capacity: 1
307 format: raw
308 device: cdrom
309 bus: ide
310 cloudinit_meta_data: *cloudinit_meta_data
311 cloudinit_user_data: *cloudinit_user_data_1604
312
313 interfaces: *interfaces
314 network_config: *network_config
315
316 - name: {{ HOSTNAME_CMP02 }}
317 role: salt_minion
318 params:
319 vcpu: !os_env SLAVE_NODE_CPU, 2
320 memory: !os_env SLAVE_NODE_MEMORY, 4096
321 boot:
322 - hd
323 cloud_init_volume_name: iso
324 cloud_init_iface_up: ens3
325 volumes:
326 - name: system
327 capacity: !os_env NODE_VOLUME_SIZE, 20
328 backing_store: cloudimage1604
329 format: qcow2
330 - name: iso # Volume with name 'iso' will be used
331 # for store image with cloud-init metadata.
332 capacity: 1
333 format: raw
334 device: cdrom
335 bus: ide
336 cloudinit_meta_data: *cloudinit_meta_data
337 cloudinit_user_data: *cloudinit_user_data_1604
338
339 interfaces: *interfaces
340 network_config: *network_config
341
342 - name: {{ HOSTNAME_NTW01 }}
343 role: salt_minion
344 params:
345 vcpu: !os_env SLAVE_NODE_CPU, 2
346 memory: !os_env SLAVE_NODE_MEMORY, 8192
347 boot:
348 - hd
349 cloud_init_volume_name: iso
350 cloud_init_iface_up: ens3
351 volumes:
352 - name: system
353 capacity: !os_env NODE_VOLUME_SIZE, 20
354 backing_store: cloudimage1404
355 format: qcow2
356 - name: iso # Volume with name 'iso' will be used
357 # for store image with cloud-init metadata.
358 capacity: 1
359 format: raw
360 device: cdrom
361 bus: ide
362 cloudinit_meta_data: *cloudinit_meta_data
363 cloudinit_user_data: *cloudinit_user_data_1404
364
365 interfaces: *interfaces
366 network_config: *network_config
367
368 - name: {{ HOSTNAME_NTW02 }}
369 role: salt_minion
370 params:
371 vcpu: !os_env SLAVE_NODE_CPU, 2
372 memory: !os_env SLAVE_NODE_MEMORY, 8192
373 boot:
374 - hd
375 cloud_init_volume_name: iso
376 cloud_init_iface_up: ens3
377 volumes:
378 - name: system
379 capacity: !os_env NODE_VOLUME_SIZE, 20
380 backing_store: cloudimage1404
381 format: qcow2
382 - name: iso # Volume with name 'iso' will be used
383 # for store image with cloud-init metadata.
384 capacity: 1
385 format: raw
386 device: cdrom
387 bus: ide
388 cloudinit_meta_data: *cloudinit_meta_data
389 cloudinit_user_data: *cloudinit_user_data_1404
390
391 interfaces: *interfaces
392 network_config: *network_config
393
394 - name: {{ HOSTNAME_NTW03 }}
395 role: salt_minion
396 params:
397 vcpu: !os_env SLAVE_NODE_CPU, 2
398 memory: !os_env SLAVE_NODE_MEMORY, 8192
399 boot:
400 - hd
401 cloud_init_volume_name: iso
402 cloud_init_iface_up: ens3
403 volumes:
404 - name: system
405 capacity: !os_env NODE_VOLUME_SIZE, 20
406 backing_store: cloudimage1404
407 format: qcow2
408 - name: iso # Volume with name 'iso' will be used
409 # for store image with cloud-init metadata.
410 capacity: 1
411 format: raw
412 device: cdrom
413 bus: ide
414 cloudinit_meta_data: *cloudinit_meta_data
415 cloudinit_user_data: *cloudinit_user_data_1404
416
417 interfaces: *interfaces
418 network_config: *network_config
419
420 - name: {{ HOSTNAME_VSRX01 }}
421 role: vsrx
422 params:
423 vcpu: !os_env SLAVE_NODE_CPU, 2
424 memory: !os_env SLAVE_NODE_MEMORY, 512
425 boot:
426 - hd
427 volumes:
428 - name: system
429 capacity: !os_env NODE_VOLUME_SIZE, 10
430 backing_store: vsrx_image
431 format: qcow2
432 #- name: iso
433 #- capacity: 1
434 #- format: raw
435 #- device: cdrom
436 #- bus: ide
437 #- cloudinit_user_data: !include juniper.conf
438
439 interfaces:
440 - label: ge-0/0/0
441 l2_network_device: private
442 interface_model: *interface_model
443 mac_address: 52:54:00:4e:b4:36
444 - label: ge-0/0/1
445 l2_network_device: public
446 interface_model: *interface_model
447 mac_address: 52:54:00:e1:44:9d
448 - label: ge-0/0/2
449 l2_network_device: admin
450 interface_model: *interface_model
451 mac_address: 52:54:00:72:08:77