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