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