blob: 0e5ff4f88c82f255acd80b16ca16c6685ba5a298 [file] [log] [blame]
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +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{% import 'virtual-mcp-ocata-cicd/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
5{% import 'virtual-mcp-ocata-cicd/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
6{% import 'virtual-mcp-ocata-cicd/underlay--user-data-cicd.yaml' as CLOUDINIT_USER_DATA_CICD with context %}
7{% import 'virtual-mcp-ocata-cicd/underlay--user-data-openstack.yaml' as CLOUDINIT_USER_DATA_OPENSTACK 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_cicd {{ CLOUDINIT_USER_DATA_CICD }}
15 - &cloudinit_user_data_openstack {{ CLOUDINIT_USER_DATA_OPENSTACK }}
16
Dennis Dmitriev5ec4d572017-09-27 00:47:54 +030017{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp-ocata-cicd') %}
18{% set DOMAIN_NAME = os_env('DOMAIN_NAME', LAB_CONFIG_NAME) + '.local' %}
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +030019{% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01.' + DOMAIN_NAME) %}
20{% set HOSTNAME_CID01 = os_env('HOSTNAME_CID01', 'cid01.' + DOMAIN_NAME) %}
21{% set HOSTNAME_CID02 = os_env('HOSTNAME_CID02', 'cid02.' + DOMAIN_NAME) %}
22{% set HOSTNAME_CID03 = os_env('HOSTNAME_CID03', 'cid03.' + DOMAIN_NAME) %}
23{% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %}
24{% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %}
25{% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %}
26{% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp01.' + DOMAIN_NAME) %}
27{% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp02.' + DOMAIN_NAME) %}
28{% set HOSTNAME_GTW01 = os_env('HOSTNAME_GTW01', 'gtw01.' + DOMAIN_NAME) %}
29{% set HOSTNAME_PRX01 = os_env('HOSTNAME_PRX01', 'prx01.' + DOMAIN_NAME) %}
30
31template:
32 devops_settings:
33 env_name: {{ os_env('ENV_NAME', 'virtual-mcp-ocata-cicd_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }}
34
35 address_pools:
36 private-pool01:
37 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }}
38 params:
39 ip_reserved:
40 gateway: +1
41 l2_network_device: +1
42 default_{{ HOSTNAME_CFG01 }}: +100
43 default_{{ HOSTNAME_CID01 }}: +91
44 default_{{ HOSTNAME_CID02 }}: +92
45 default_{{ HOSTNAME_CID03 }}: +93
46 default_{{ HOSTNAME_CTL01 }}: +101
47 default_{{ HOSTNAME_CTL02 }}: +102
48 default_{{ HOSTNAME_CTL03 }}: +103
49 default_{{ HOSTNAME_CMP01 }}: +105
50 default_{{ HOSTNAME_CMP02 }}: +106
51 default_{{ HOSTNAME_GTW01 }}: +110
52 default_{{ HOSTNAME_PRX01 }}: +121
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
Tatyana Leontoviche0286ed2017-09-12 11:55:06 +030062 default_{{ HOSTNAME_CFG01 }}: +90
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +030063 default_{{ HOSTNAME_CID01 }}: +91
64 default_{{ HOSTNAME_CID02 }}: +92
65 default_{{ HOSTNAME_CID03 }}: +93
66 default_{{ HOSTNAME_CTL01 }}: +101
67 default_{{ HOSTNAME_CTL02 }}: +102
68 default_{{ HOSTNAME_CTL03 }}: +103
69 default_{{ HOSTNAME_CMP01 }}: +105
70 default_{{ HOSTNAME_CMP02 }}: +106
71 default_{{ HOSTNAME_GTW01 }}: +110
72 default_{{ HOSTNAME_PRX01 }}: +121
73 ip_ranges:
74 dhcp: [+90, -10]
75
76 tenant-pool01:
77 net: {{ os_env('TENANT_ADDRESS_POOL01', '10.80.0.0/16:24') }}
78 params:
79 ip_reserved:
80 gateway: +1
81 l2_network_device: +1
82 default_{{ HOSTNAME_CFG01 }}: +100
83 default_{{ HOSTNAME_CID01 }}: +91
84 default_{{ HOSTNAME_CID02 }}: +92
85 default_{{ HOSTNAME_CID03 }}: +93
86 default_{{ HOSTNAME_CTL01 }}: +101
87 default_{{ HOSTNAME_CTL02 }}: +102
88 default_{{ HOSTNAME_CTL03 }}: +103
89 default_{{ HOSTNAME_CMP01 }}: +105
90 default_{{ HOSTNAME_CMP02 }}: +106
91 default_{{ HOSTNAME_GTW01 }}: +110
92 default_{{ HOSTNAME_PRX01 }}: +121
93 ip_ranges:
94 dhcp: [+10, -10]
95
96 external-pool01:
97 net: {{ os_env('EXTERNAL_ADDRESS_POOL01', '10.90.0.0/16:24') }}
98 params:
99 ip_reserved:
100 gateway: +1
101 l2_network_device: +1
102 default_{{ HOSTNAME_CFG01 }}: +100
103 default_{{ HOSTNAME_CID01 }}: +91
104 default_{{ HOSTNAME_CID02 }}: +92
105 default_{{ HOSTNAME_CID03 }}: +93
106 default_{{ HOSTNAME_CTL01 }}: +101
107 default_{{ HOSTNAME_CTL02 }}: +102
108 default_{{ HOSTNAME_CTL03 }}: +103
109 default_{{ HOSTNAME_CMP01 }}: +105
110 default_{{ HOSTNAME_CMP02 }}: +106
111 default_{{ HOSTNAME_GTW01 }}: +110
112 default_{{ HOSTNAME_PRX01 }}: +121
113 ip_ranges:
114 dhcp: [+10, -10]
115
116
117 groups:
118 - name: default
119 driver:
120 name: devops.driver.libvirt
121 params:
122 connection_string: !os_env CONNECTION_STRING, qemu:///system
123 storage_pool_name: !os_env STORAGE_POOL_NAME, default
124 stp: False
125 hpet: False
126 enable_acpi: true
127 use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true
Dennis Dmitrievb3fc4242017-07-14 16:01:51 +0300128 use_hugepages: !os_env DRIVER_USE_HUGEPAGES, false
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300129
130 network_pools:
131 admin: admin-pool01
132 private: private-pool01
133 tenant: tenant-pool01
134 external: external-pool01
135
136 l2_network_devices:
137 admin:
138 address_pool: admin-pool01
139 dhcp: true
140 forward:
141 mode: nat
142
143 private:
144 address_pool: private-pool01
145 dhcp: dhcp
146
147 tenant:
148 address_pool: tenant-pool01
149 dhcp: false
150
151 external:
152 address_pool: external-pool01
153 dhcp: true
154 forward:
155 mode: nat
156
157
158 group_volumes:
159 - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes.
160 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
161 # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2
162 format: qcow2
163
164 nodes:
165 - name: {{ HOSTNAME_CFG01 }}
166 role: salt_master
167 params:
Dennis Dmitrievea7ee492017-07-14 20:16:07 +0300168 vcpu: !os_env SLAVE_NODE_CPU, 2
169 memory: !os_env SLAVE_NODE_MEMORY, 2096
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300170 boot:
171 - hd
172 cloud_init_volume_name: iso
173 cloud_init_iface_up: ens3
174 volumes:
175 - name: system
176 capacity: !os_env NODE_VOLUME_SIZE, 150
177 backing_store: cloudimage1604
178 format: qcow2
179 - name: iso # Volume with name 'iso' will be used
180 # for store image with cloud-init metadata.
181 capacity: 1
182 format: raw
183 device: cdrom
184 bus: ide
185 cloudinit_meta_data: *cloudinit_meta_data
186 cloudinit_user_data: *cloudinit_user_data_cfg01
187
188 interfaces:
189 - label: ens3
190 l2_network_device: admin
191 interface_model: *interface_model
192 - label: ens4
193 l2_network_device: private
194 interface_model: *interface_model
195 network_config:
196 ens3:
197 networks:
198 - admin
199 ens4:
200 networks:
201 - private
202
203 - name: {{ HOSTNAME_CID01 }}
204 role: salt_minion
205 params:
Dennis Dmitriev41f0b792017-07-27 18:08:50 +0300206 vcpu: !os_env SLAVE_NODE_CPU, 3
Dennis Dmitrievea7ee492017-07-14 20:16:07 +0300207 memory: !os_env SLAVE_NODE_MEMORY, 8192
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300208 boot:
209 - hd
210 cloud_init_volume_name: iso
211 cloud_init_iface_up: ens4
212 volumes:
213 - name: system
214 capacity: !os_env NODE_VOLUME_SIZE, 150
215 backing_store: cloudimage1604
216 format: qcow2
217 - name: iso # Volume with name 'iso' will be used
218 # for store image with cloud-init metadata.
219 capacity: 1
220 format: raw
221 device: cdrom
222 bus: ide
223 cloudinit_meta_data: *cloudinit_meta_data
224 cloudinit_user_data: *cloudinit_user_data_cicd
225
226 interfaces: &cid_interfaces
227 - label: ens3
228 l2_network_device: private
229 interface_model: *interface_model
230 - label: ens4
231 l2_network_device: admin
232 interface_model: *interface_model
233 network_config: &cid_network_config
234 ens3:
235 networks:
236 - private
237 ens4:
238 networks:
239 - admin
240
241 - name: {{ HOSTNAME_CID02 }}
242 role: salt_minion
243 params:
Dennis Dmitriev41f0b792017-07-27 18:08:50 +0300244 vcpu: !os_env SLAVE_NODE_CPU, 3
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300245 memory: !os_env SLAVE_NODE_MEMORY, 6144
246 boot:
247 - hd
248 cloud_init_volume_name: iso
249 cloud_init_iface_up: ens4
250 volumes:
251 - name: system
252 capacity: !os_env NODE_VOLUME_SIZE, 150
253 backing_store: cloudimage1604
254 format: qcow2
255 - name: iso # Volume with name 'iso' will be used
256 # for store image with cloud-init metadata.
257 capacity: 1
258 format: raw
259 device: cdrom
260 bus: ide
261 cloudinit_meta_data: *cloudinit_meta_data
262 cloudinit_user_data: *cloudinit_user_data_cicd
263
264 interfaces: *cid_interfaces
265 network_config: *cid_network_config
266
267 - name: {{ HOSTNAME_CID03 }}
268 role: salt_minion
269 params:
Dennis Dmitriev41f0b792017-07-27 18:08:50 +0300270 vcpu: !os_env SLAVE_NODE_CPU, 3
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300271 memory: !os_env SLAVE_NODE_MEMORY, 6144
272 boot:
273 - hd
274 cloud_init_volume_name: iso
275 cloud_init_iface_up: ens4
276 volumes:
277 - name: system
278 capacity: !os_env NODE_VOLUME_SIZE, 150
279 backing_store: cloudimage1604
280 format: qcow2
281 - name: iso # Volume with name 'iso' will be used
282 # for store image with cloud-init metadata.
283 capacity: 1
284 format: raw
285 device: cdrom
286 bus: ide
287 cloudinit_meta_data: *cloudinit_meta_data
288 cloudinit_user_data: *cloudinit_user_data_cicd
289
290 interfaces: *cid_interfaces
291 network_config: *cid_network_config
292
293
294 - name: {{ HOSTNAME_CTL01 }}
295 role: salt_minion
296 params:
Dennis Dmitriev41f0b792017-07-27 18:08:50 +0300297 vcpu: !os_env SLAVE_NODE_CPU, 3
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300298 memory: !os_env SLAVE_NODE_MEMORY, 6144
299 boot:
300 - hd
301 cloud_init_volume_name: iso
302 cloud_init_iface_up: ens3
303 volumes:
304 - name: system
305 capacity: !os_env NODE_VOLUME_SIZE, 150
306 backing_store: cloudimage1604
307 format: qcow2
308 - name: cinder
309 capacity: 50
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_openstack
319
320 interfaces: &interfaces
321 - label: ens3
322 l2_network_device: admin
323 interface_model: *interface_model
324 - label: ens4
325 l2_network_device: private
326 interface_model: *interface_model
327 network_config: &network_config
328 ens3:
329 networks:
330 - admin
331 ens4:
332 networks:
333 - private
334
335 - name: {{ HOSTNAME_CTL02 }}
336 role: salt_minion
337 params:
Dennis Dmitriev41f0b792017-07-27 18:08:50 +0300338 vcpu: !os_env SLAVE_NODE_CPU, 3
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300339 memory: !os_env SLAVE_NODE_MEMORY, 6144
340 boot:
341 - hd
342 cloud_init_volume_name: iso
343 cloud_init_iface_up: ens3
344 volumes:
345 - name: system
346 capacity: !os_env NODE_VOLUME_SIZE, 150
347 backing_store: cloudimage1604
348 format: qcow2
349 - name: cinder
350 capacity: 50
351 format: qcow2
352 - name: iso # Volume with name 'iso' will be used
353 # for store image with cloud-init metadata.
354 capacity: 1
355 format: raw
356 device: cdrom
357 bus: ide
358 cloudinit_meta_data: *cloudinit_meta_data
359 cloudinit_user_data: *cloudinit_user_data_openstack
360
361 interfaces: *interfaces
362 network_config: *network_config
363
364 - name: {{ HOSTNAME_CTL03 }}
365 role: salt_minion
366 params:
Dennis Dmitriev41f0b792017-07-27 18:08:50 +0300367 vcpu: !os_env SLAVE_NODE_CPU, 3
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300368 memory: !os_env SLAVE_NODE_MEMORY, 6144
369 boot:
370 - hd
371 cloud_init_volume_name: iso
372 cloud_init_iface_up: ens3
373 volumes:
374 - name: system
375 capacity: !os_env NODE_VOLUME_SIZE, 150
376 backing_store: cloudimage1604
377 format: qcow2
378 - name: cinder
379 capacity: 50
380 format: qcow2
381 - name: iso # Volume with name 'iso' will be used
382 # for store image with cloud-init metadata.
383 capacity: 1
384 format: raw
385 device: cdrom
386 bus: ide
387 cloudinit_meta_data: *cloudinit_meta_data
388 cloudinit_user_data: *cloudinit_user_data_openstack
389
390 interfaces: *interfaces
391 network_config: *network_config
392
393 - name: {{ HOSTNAME_PRX01 }}
394 role: salt_minion
395 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300396 vcpu: !os_env SLAVE_NODE_CPU, 1
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300397 memory: !os_env SLAVE_NODE_MEMORY, 2048
398 boot:
399 - hd
400 cloud_init_volume_name: iso
401 cloud_init_iface_up: ens3
402 volumes:
403 - name: system
404 capacity: !os_env NODE_VOLUME_SIZE, 150
405 backing_store: cloudimage1604
406 format: qcow2
407 - name: cinder
408 capacity: 50
409 format: qcow2
410 - name: iso # Volume with name 'iso' will be used
411 # for store image with cloud-init metadata.
412 capacity: 1
413 format: raw
414 device: cdrom
415 bus: ide
416 cloudinit_meta_data: *cloudinit_meta_data
417 cloudinit_user_data: *cloudinit_user_data_openstack
418
419 interfaces: *interfaces
420 network_config: *network_config
421
422
423 - name: {{ HOSTNAME_CMP01 }}
424 role: salt_minion
425 params:
Dennis Dmitriev41f0b792017-07-27 18:08:50 +0300426 vcpu: !os_env SLAVE_NODE_CPU, 4
427 memory: !os_env SLAVE_NODE_MEMORY, 6144
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300428 boot:
429 - hd
430 cloud_init_volume_name: iso
431 cloud_init_iface_up: ens3
432 volumes:
433 - name: system
434 capacity: !os_env NODE_VOLUME_SIZE, 150
435 backing_store: cloudimage1604
436 format: qcow2
437 - name: iso # Volume with name 'iso' will be used
438 # for store image with cloud-init metadata.
439 capacity: 1
440 format: raw
441 device: cdrom
442 bus: ide
443 cloudinit_meta_data: *cloudinit_meta_data
444 cloudinit_user_data: *cloudinit_user_data_openstack
445
446
447 interfaces: &all_interfaces
448 - label: ens3
449 l2_network_device: admin
450 interface_model: *interface_model
451 - label: ens4
452 l2_network_device: private
453 interface_model: *interface_model
454 - label: ens5
455 l2_network_device: tenant
456 interface_model: *interface_model
457 - label: ens6
458 l2_network_device: external
459 interface_model: *interface_model
460 network_config: &all_network_config
461 ens3:
462 networks:
463 - admin
464 ens4:
465 networks:
466 - private
467 ens5:
468 networks:
469 - tenant
470 ens6:
471 networks:
472 - external
473
474 - name: {{ HOSTNAME_CMP02 }}
475 role: salt_minion
476 params:
Dennis Dmitriev41f0b792017-07-27 18:08:50 +0300477 vcpu: !os_env SLAVE_NODE_CPU, 4
478 memory: !os_env SLAVE_NODE_MEMORY, 6144
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300479 boot:
480 - hd
481 cloud_init_volume_name: iso
482 cloud_init_iface_up: ens3
483 volumes:
484 - name: system
485 capacity: !os_env NODE_VOLUME_SIZE, 150
486 backing_store: cloudimage1604
487 format: qcow2
488 - name: iso # Volume with name 'iso' will be used
489 # for store image with cloud-init metadata.
490 capacity: 1
491 format: raw
492 device: cdrom
493 bus: ide
494 cloudinit_meta_data: *cloudinit_meta_data
495 cloudinit_user_data: *cloudinit_user_data_openstack
496
497 interfaces: *all_interfaces
498 network_config: *all_network_config
499
Dennis Dmitrieveac3aab2017-07-12 16:36:41 +0300500 - name: {{ HOSTNAME_GTW01 }}
501 role: salt_minion
502 params:
503 vcpu: !os_env SLAVE_NODE_CPU, 1
504 memory: !os_env SLAVE_NODE_MEMORY, 2048
505 boot:
506 - hd
507 cloud_init_volume_name: iso
508 cloud_init_iface_up: ens3
509 volumes:
510 - name: system
511 capacity: !os_env NODE_VOLUME_SIZE, 150
512 backing_store: cloudimage1604
513 format: qcow2
514 - name: iso # Volume with name 'iso' will be used
515 # for store image with cloud-init metadata.
516 capacity: 1
517 format: raw
518 device: cdrom
519 bus: ide
520 cloudinit_meta_data: *cloudinit_meta_data
521 cloudinit_user_data: *cloudinit_user_data_openstack
522
523 interfaces: *all_interfaces
524 network_config: *all_network_config