blob: bda254b831886d21a27c2384420a92e328840f43 [file] [log] [blame]
Dennis Dmitriev26b94a22018-07-19 16:12:22 +03001# Set the repository suite, one of the: 'nightly', 'testing', 'stable', or any other required
2{% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %}
3
4{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME', 'cookied-cicd-k8s-genie') %}
5{% set DOMAIN_NAME = os_env('DOMAIN_NAME', LAB_CONFIG_NAME + '.local') %}
6{% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01') %}
7{% set HOSTNAME_CID01 = os_env('HOSTNAME_CID01', 'cid01') %}
8{% set HOSTNAME_CID02 = os_env('HOSTNAME_CID02', 'cid02') %}
9{% set HOSTNAME_CID03 = os_env('HOSTNAME_CID03', 'cid03') %}
10
11{% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01') %}
12{% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02') %}
13{% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03') %}
14{% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp001') %}
15{% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp002') %}
Dennis Dmitrieveb50ce12018-09-27 13:34:32 +030016{% set HOSTNAME_CMP03 = os_env('HOSTNAME_CMP03', 'cmp003') %}
17{% set HOSTNAME_CMP04 = os_env('HOSTNAME_CMP04', 'cmp004') %}
Dennis Dmitriev26b94a22018-07-19 16:12:22 +030018{% set HOSTNAME_KVM01 = os_env('HOSTNAME_KVM01', 'kvm01') %}
19{% set HOSTNAME_KVM02 = os_env('HOSTNAME_KVM02', 'kvm02') %}
20{% set HOSTNAME_KVM03 = os_env('HOSTNAME_KVM03', 'kvm03') %}
21
22{% import 'cookied-cicd-k8s-genie/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
Dennis Dmitriev26b94a22018-07-19 16:12:22 +030023{% import 'cookied-cicd-k8s-genie/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA_1604 with context %}
24{% import 'cookied-cicd-k8s-genie/underlay--user-data1604-swp.yaml' as CLOUDINIT_USER_DATA_1604_SWP with context %}
25
26---
27aliases:
28 - &interface_model {{ os_env('INTERFACE_MODEL', 'virtio') }}
29 - &cloudinit_meta_data {{ CLOUDINIT_META_DATA }}
Dennis Dmitriev26b94a22018-07-19 16:12:22 +030030 - &cloudinit_user_data_1604 {{ CLOUDINIT_USER_DATA_1604 }}
31 - &cloudinit_user_data_1604_swp {{ CLOUDINIT_USER_DATA_1604_SWP }}
32
33template:
34 devops_settings:
35 env_name: {{ os_env('ENV_NAME', LAB_CONFIG_NAME + '_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }}
36
37 address_pools:
38 private-pool01:
39 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }}
40 params:
41 ip_reserved:
42 gateway: +1
43 l2_network_device: +1
44 default_{{ HOSTNAME_CFG01 }}: +15
45
46 default_{{ HOSTNAME_CID }}: +90
47 default_{{ HOSTNAME_CID01 }}: +91
48 default_{{ HOSTNAME_CID02 }}: +92
49 default_{{ HOSTNAME_CID03 }}: +93
50
51 ip_ranges:
52 dhcp: [+90, -10]
53
54 admin-pool01:
55 net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.0.0/16:24') }}
56 params:
57 ip_reserved:
58 gateway: +1
59 l2_network_device: +1
60 default_{{ HOSTNAME_CFG01 }}: +15
61
62 default_{{ HOSTNAME_CID }}: +90
63 default_{{ HOSTNAME_CID01 }}: +91
64 default_{{ HOSTNAME_CID02 }}: +92
65 default_{{ HOSTNAME_CID03 }}: +93
66
67 default_{{ HOSTNAME_CTL }}: +10
68 default_{{ HOSTNAME_CTL01 }}: +11
69 default_{{ HOSTNAME_CTL02 }}: +12
70 default_{{ HOSTNAME_CTL03 }}: +13
71 default_{{ HOSTNAME_CMP01 }}: +101
72 default_{{ HOSTNAME_CMP02 }}: +102
Dennis Dmitrieveb50ce12018-09-27 13:34:32 +030073 default_{{ HOSTNAME_CMP03 }}: +103
74 default_{{ HOSTNAME_CMP04 }}: +104
Dennis Dmitriev26b94a22018-07-19 16:12:22 +030075 default_{{ HOSTNAME_KVM }}: +240
76 default_{{ HOSTNAME_KVM01 }}: +241
77 default_{{ HOSTNAME_KVM02 }}: +242
78 default_{{ HOSTNAME_KVM03 }}: +243
79
80 ip_ranges:
81 dhcp: [+90, -10]
82
83 tenant-pool01:
84 net: {{ os_env('TENANT_ADDRESS_POOL01', '10.80.0.0/16:24') }}
85 params:
86 ip_reserved:
87 gateway: +1
88 l2_network_device: +1
89 default_{{ HOSTNAME_CFG01 }}: +15
90
91 default_{{ HOSTNAME_CID }}: +90
92 default_{{ HOSTNAME_CID01 }}: +91
93 default_{{ HOSTNAME_CID02 }}: +92
94 default_{{ HOSTNAME_CID03 }}: +93
95
96 ip_ranges:
97 dhcp: [+10, -10]
98
99 external-pool01:
100 net: {{ os_env('EXTERNAL_ADDRESS_POOL01', '10.90.0.0/16:24') }}
101 params:
102 ip_reserved:
103 gateway: +1
104 l2_network_device: +1
105 default_{{ HOSTNAME_CFG01 }}: +15
106
107 default_{{ HOSTNAME_CID }}: +90
108 default_{{ HOSTNAME_CID01 }}: +91
109 default_{{ HOSTNAME_CID02 }}: +92
110 default_{{ HOSTNAME_CID03 }}: +93
111
112 ip_ranges:
113 dhcp: [+10, -10]
114
115
116 groups:
117 - name: default
118 driver:
119 name: devops.driver.libvirt
120 params:
121 connection_string: {{ os_env('CONNECTION_STRING', 'qemu:///system') }}
122 storage_pool_name: {{ os_env('STORAGE_POOL_NAME', 'default') }}
123 stp: False
124 hpet: False
125 enable_acpi: true
126 use_host_cpu: {{ os_env('DRIVER_USE_HOST_CPU', true) }}
127 use_hugepages: {{ os_env('DRIVER_USE_HUGEPAGES', false) }}
128
129 network_pools:
130 admin: admin-pool01
131 private: private-pool01
132 tenant: tenant-pool01
133 external: external-pool01
134
135 l2_network_devices:
136 admin:
137 address_pool: admin-pool01
138 dhcp: true
139 forward:
140 mode: nat
141
142 private:
143 address_pool: private-pool01
144 dhcp: false
145 forward:
146 mode: route
147
148 external:
149 address_pool: external-pool01
150 dhcp: false
151 forward:
152 mode: nat
153
154
155 group_volumes:
156 - name: cfg01_day01_image # Pre-configured day01 image
157 source_image: {{ os_env('IMAGE_PATH_CFG01_DAY01') }} # http://images.mirantis.com/cfg01-day01.qcow2 or fallback to IMAGE_PATH1604
158 format: qcow2
159 - name: mcp_ubuntu_1604_image # Pre-configured image for VCP nodes initially based on kvm nodes.
160 # http://images.mirantis.com/ubuntu-16-04-x64-latest.qcow2 (preffered)
161 # or
162 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
163 source_image: {{ os_env('MCP_IMAGE_PATH1604') }}
164 format: qcow2
165
166 nodes:
167 - name: {{ HOSTNAME_CFG01 }}
168 role: salt_master
169 params:
170 vcpu: {{ os_env('CFG_NODE_CPU', 3) }}
171 memory: {{ os_env('CFG_NODE_MEMORY', 8192) }}
172 boot:
173 - hd
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300174 volumes:
175 - name: system
176 capacity: {{ os_env('CFG_NODE_VOLUME_SIZE', 150) }}
177 backing_store: cfg01_day01_image
178 format: qcow2
179 - name: config
180 capacity: 1
181 format: raw
182 device: cdrom
183 bus: ide
184 # source_image: !os_env CFG01_CONFIG_PATH # no source image required.
185 # it will be uploaded after config drive generation
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300186 interfaces:
187 - label: ens3
188 l2_network_device: admin
189 interface_model: *interface_model
190 - label: ens4
191 l2_network_device: private
192 interface_model: *interface_model
193 network_config:
194 ens3:
195 networks:
196 - admin
197 ens4:
198 networks:
199 - private
200
201 - name: {{ HOSTNAME_KVM01 }}
202 role: salt_minion
203 params:
204 vcpu: {{ os_env('KVM_NODE_CPU', 1) }}
205 memory: {{ os_env('KVM_NODE_MEMORY', 1024) }}
206 boot:
207 - hd
208 cloud_init_volume_name: iso
209 cloud_init_iface_up: ens3
210 volumes:
211 - name: system
212 capacity: {{ os_env('KVM_NODE_VOLUME_SIZE', 150) }}
213 backing_store: mcp_ubuntu_1604_image
214 format: qcow2
215 - name: iso # Volume with name 'iso' will be used
216 # for store image with cloud-init metadata.
217 capacity: 1
218 format: raw
219 device: cdrom
220 bus: ide
221 cloudinit_meta_data: *cloudinit_meta_data
222 cloudinit_user_data: *cloudinit_user_data_1604_swp
223
224 interfaces: &interfaces
225 - label: ens3
226 l2_network_device: admin
227 interface_model: *interface_model
228 - label: ens4
229 l2_network_device: private
230 interface_model: *interface_model
231 network_config: &network_config
232 ens3:
233 networks:
234 - admin
235 ens4:
236 networks:
237 - private
238
239 - name: {{ HOSTNAME_KVM02 }}
240 role: salt_minion
241 params:
242 vcpu: {{ os_env('KVM_NODE_CPU', 1) }}
243 memory: {{ os_env('KVM_NODE_MEMORY', 1024) }}
244 boot:
245 - hd
246 cloud_init_volume_name: iso
247 cloud_init_iface_up: ens3
248 volumes:
249 - name: system
250 capacity: {{ os_env('KVM_NODE_VOLUME_SIZE', 150) }}
251 backing_store: mcp_ubuntu_1604_image
252 format: qcow2
253 - name: iso # Volume with name 'iso' will be used
254 # for store image with cloud-init metadata.
255 capacity: 1
256 format: raw
257 device: cdrom
258 bus: ide
259 cloudinit_meta_data: *cloudinit_meta_data
260 cloudinit_user_data: *cloudinit_user_data_1604_swp
261
262 interfaces: *interfaces
263 network_config: *network_config
264
265 - name: {{ HOSTNAME_KVM03 }}
266 role: salt_minion
267 params:
268 vcpu: {{ os_env('KVM_NODE_CPU', 1) }}
269 memory: {{ os_env('KVM_NODE_MEMORY', 1024) }}
270 boot:
271 - hd
272 cloud_init_volume_name: iso
273 cloud_init_iface_up: ens3
274 volumes:
275 - name: system
276 capacity: {{ os_env('KVM_NODE_VOLUME_SIZE', 150) }}
277 backing_store: mcp_ubuntu_1604_image
278 format: qcow2
279 - name: iso # Volume with name 'iso' will be used
280 # for store image with cloud-init metadata.
281 capacity: 1
282 format: raw
283 device: cdrom
284 bus: ide
285 cloudinit_meta_data: *cloudinit_meta_data
286 cloudinit_user_data: *cloudinit_user_data_1604_swp
287
288 interfaces: *interfaces
289 network_config: *network_config
290
291 - name: {{ HOSTNAME_CID01 }}
292 role: salt_minion
293 params:
294 vcpu: {{ os_env('CID_NODE_CPU', 3) }}
295 memory: {{ os_env('CID_NODE_MEMORY', 8192) }}
296 boot:
297 - hd
298 cloud_init_volume_name: iso
299 cloud_init_iface_up: ens3
300 volumes:
301 - name: system
302 capacity: {{ os_env('CID_NODE_VOLUME_SIZE', 150) }}
303 backing_store: mcp_ubuntu_1604_image
304 format: qcow2
305 - name: iso # Volume with name 'iso' will be used
306 # for store image with cloud-init metadata.
307 capacity: 1
308 format: raw
309 device: cdrom
310 bus: ide
311 cloudinit_meta_data: *cloudinit_meta_data
312 cloudinit_user_data: *cloudinit_user_data_1604_swp
313
314 interfaces: *interfaces
315 network_config: *network_config
316
317 - name: {{ HOSTNAME_CID02 }}
318 role: salt_minion
319 params:
320 vcpu: {{ os_env('CID_NODE_CPU', 3) }}
321 memory: {{ os_env('CID_NODE_MEMORY', 8192) }}
322 boot:
323 - hd
324 cloud_init_volume_name: iso
325 cloud_init_iface_up: ens3
326 volumes:
327 - name: system
328 capacity: {{ os_env('CID_NODE_VOLUME_SIZE', 150) }}
329 backing_store: mcp_ubuntu_1604_image
330 format: qcow2
331 - name: iso # Volume with name 'iso' will be used
332 # for store image with cloud-init metadata.
333 capacity: 1
334 format: raw
335 device: cdrom
336 bus: ide
337 cloudinit_meta_data: *cloudinit_meta_data
338 cloudinit_user_data: *cloudinit_user_data_1604_swp
339
340 interfaces: *interfaces
341 network_config: *network_config
342
343 - name: {{ HOSTNAME_CID03 }}
344 role: salt_minion
345 params:
346 vcpu: {{ os_env('CID_NODE_CPU', 3) }}
347 memory: {{ os_env('CID_NODE_MEMORY', 8192) }}
348 boot:
349 - hd
350 cloud_init_volume_name: iso
351 cloud_init_iface_up: ens3
352 volumes:
353 - name: system
354 capacity: {{ os_env('CID_NODE_VOLUME_SIZE', 150) }}
355 backing_store: mcp_ubuntu_1604_image
356 format: qcow2
357 - name: iso # Volume with name 'iso' will be used
358 # for store image with cloud-init metadata.
359 capacity: 1
360 format: raw
361 device: cdrom
362 bus: ide
363 cloudinit_meta_data: *cloudinit_meta_data
364 cloudinit_user_data: *cloudinit_user_data_1604_swp
365
366 interfaces: *interfaces
367 network_config: *network_config
368
369 - name: {{ HOSTNAME_CTL01 }}
370 role: k8s_controller
371 params:
372 vcpu: !os_env SLAVE_NODE_CPU, 2
Dennis Dmitrieveb50ce12018-09-27 13:34:32 +0300373 memory: !os_env SLAVE_NODE_MEMORY, 8192
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300374 boot:
375 - hd
376 cloud_init_volume_name: iso
377 cloud_init_iface_up: ens3
378 volumes:
379 - name: system
380 capacity: !os_env NODE_VOLUME_SIZE, 150
381 backing_store: mcp_ubuntu_1604_image
382 format: qcow2
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300383 - name: iso # Volume with name 'iso' will be used
384 # for store image with cloud-init metadata.
385 capacity: 1
386 format: raw
387 device: cdrom
388 bus: ide
389 cloudinit_meta_data: *cloudinit_meta_data
390 cloudinit_user_data: *cloudinit_user_data_1604
391
392 interfaces: *interfaces
393 network_config: *network_config
394
395 - name: {{ HOSTNAME_CTL02 }}
396 role: salt_minion
397 params:
398 vcpu: !os_env SLAVE_NODE_CPU, 2
Dennis Dmitrieveb50ce12018-09-27 13:34:32 +0300399 memory: !os_env SLAVE_NODE_MEMORY, 8192
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300400 boot:
401 - hd
402 cloud_init_volume_name: iso
403 cloud_init_iface_up: ens3
404 volumes:
405 - name: system
406 capacity: !os_env NODE_VOLUME_SIZE, 150
407 backing_store: mcp_ubuntu_1604_image
408 format: qcow2
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300409 - name: iso # Volume with name 'iso' will be used
410 # for store image with cloud-init metadata.
411 capacity: 1
412 format: raw
413 device: cdrom
414 bus: ide
415 cloudinit_meta_data: *cloudinit_meta_data
416 cloudinit_user_data: *cloudinit_user_data_1604
417
418 interfaces: *interfaces
419 network_config: *network_config
420
421 - name: {{ HOSTNAME_CTL03 }}
422 role: salt_minion
423 params:
424 vcpu: !os_env SLAVE_NODE_CPU, 2
Dennis Dmitrieveb50ce12018-09-27 13:34:32 +0300425 memory: !os_env SLAVE_NODE_MEMORY, 8192
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300426 boot:
427 - hd
428 cloud_init_volume_name: iso
429 cloud_init_iface_up: ens3
430 volumes:
431 - name: system
432 capacity: !os_env NODE_VOLUME_SIZE, 150
433 backing_store: mcp_ubuntu_1604_image
434 format: qcow2
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300435 - name: iso # Volume with name 'iso' will be used
436 # for store image with cloud-init metadata.
437 capacity: 1
438 format: raw
439 device: cdrom
440 bus: ide
441 cloudinit_meta_data: *cloudinit_meta_data
442 cloudinit_user_data: *cloudinit_user_data_1604
443
444 interfaces: *interfaces
445 network_config: *network_config
446
447 - name: {{ HOSTNAME_CMP01 }}
448 role: salt_minion
449 params:
450 vcpu: !os_env SLAVE_NODE_CPU, 2
Dennis Dmitrieveb50ce12018-09-27 13:34:32 +0300451 memory: !os_env SLAVE_NODE_MEMORY, 4096
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300452 boot:
453 - hd
454 cloud_init_volume_name: iso
455 cloud_init_iface_up: ens3
456 volumes:
457 - name: system
458 capacity: !os_env NODE_VOLUME_SIZE, 150
459 backing_store: mcp_ubuntu_1604_image
460 format: qcow2
461 - name: iso # Volume with name 'iso' will be used
462 # for store image with cloud-init metadata.
463 capacity: 1
464 format: raw
465 device: cdrom
466 bus: ide
467 cloudinit_meta_data: *cloudinit_meta_data
468 cloudinit_user_data: *cloudinit_user_data_1604
469
470 interfaces: *interfaces
471 network_config: *network_config
472
473 - name: {{ HOSTNAME_CMP02 }}
474 role: salt_minion
475 params:
476 vcpu: !os_env SLAVE_NODE_CPU, 2
Dennis Dmitrieveb50ce12018-09-27 13:34:32 +0300477 memory: !os_env SLAVE_NODE_MEMORY, 4096
478 boot:
479 - hd
480 cloud_init_volume_name: iso
481 cloud_init_iface_up: ens3
482 volumes:
483 - name: system
484 capacity: !os_env NODE_VOLUME_SIZE, 150
485 backing_store: mcp_ubuntu_1604_image
486 format: qcow2
487 - name: iso # Volume with name 'iso' will be used
488 # for store image with cloud-init metadata.
489 capacity: 1
490 format: raw
491 device: cdrom
492 bus: ide
493 cloudinit_meta_data: *cloudinit_meta_data
494 cloudinit_user_data: *cloudinit_user_data_1604
495
496 interfaces: *interfaces
497 network_config: *network_config
498
499 - name: {{ HOSTNAME_CMP03 }}
500 role: salt_minion
501 params:
502 vcpu: !os_env SLAVE_NODE_CPU, 2
503 memory: !os_env SLAVE_NODE_MEMORY, 4096
504 boot:
505 - hd
506 cloud_init_volume_name: iso
507 cloud_init_iface_up: ens3
508 volumes:
509 - name: system
510 capacity: !os_env NODE_VOLUME_SIZE, 150
511 backing_store: mcp_ubuntu_1604_image
512 format: qcow2
513 - name: iso # Volume with name 'iso' will be used
514 # for store image with cloud-init metadata.
515 capacity: 1
516 format: raw
517 device: cdrom
518 bus: ide
519 cloudinit_meta_data: *cloudinit_meta_data
520 cloudinit_user_data: *cloudinit_user_data_1604
521
522 interfaces: *interfaces
523 network_config: *network_config
524
525 - name: {{ HOSTNAME_CMP04 }}
526 role: salt_minion
527 params:
528 vcpu: !os_env SLAVE_NODE_CPU, 2
529 memory: !os_env SLAVE_NODE_MEMORY, 4096
Dennis Dmitriev26b94a22018-07-19 16:12:22 +0300530 boot:
531 - hd
532 cloud_init_volume_name: iso
533 cloud_init_iface_up: ens3
534 volumes:
535 - name: system
536 capacity: !os_env NODE_VOLUME_SIZE, 150
537 backing_store: mcp_ubuntu_1604_image
538 format: qcow2
539 - name: iso # Volume with name 'iso' will be used
540 # for store image with cloud-init metadata.
541 capacity: 1
542 format: raw
543 device: cdrom
544 bus: ide
545 cloudinit_meta_data: *cloudinit_meta_data
546 cloudinit_user_data: *cloudinit_user_data_1604
547
548 interfaces: *interfaces
549 network_config: *network_config