blob: 2cd9c112659dbfcc2d48689ea75d110c63515cad [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
17{% set DOMAIN_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp-ocata-cicd') + '.local' %}
18{% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01.' + DOMAIN_NAME) %}
19{% set HOSTNAME_CID01 = os_env('HOSTNAME_CID01', 'cid01.' + DOMAIN_NAME) %}
20{% set HOSTNAME_CID02 = os_env('HOSTNAME_CID02', 'cid02.' + DOMAIN_NAME) %}
21{% set HOSTNAME_CID03 = os_env('HOSTNAME_CID03', 'cid03.' + DOMAIN_NAME) %}
22{% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %}
23{% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %}
24{% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %}
25{% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp01.' + DOMAIN_NAME) %}
26{% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp02.' + DOMAIN_NAME) %}
27{% set HOSTNAME_GTW01 = os_env('HOSTNAME_GTW01', 'gtw01.' + DOMAIN_NAME) %}
28{% set HOSTNAME_PRX01 = os_env('HOSTNAME_PRX01', 'prx01.' + DOMAIN_NAME) %}
29
30template:
31 devops_settings:
32 env_name: {{ os_env('ENV_NAME', 'virtual-mcp-ocata-cicd_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }}
33
34 address_pools:
35 private-pool01:
36 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }}
37 params:
38 ip_reserved:
39 gateway: +1
40 l2_network_device: +1
41 default_{{ HOSTNAME_CFG01 }}: +100
42 default_{{ HOSTNAME_CID01 }}: +91
43 default_{{ HOSTNAME_CID02 }}: +92
44 default_{{ HOSTNAME_CID03 }}: +93
45 default_{{ HOSTNAME_CTL01 }}: +101
46 default_{{ HOSTNAME_CTL02 }}: +102
47 default_{{ HOSTNAME_CTL03 }}: +103
48 default_{{ HOSTNAME_CMP01 }}: +105
49 default_{{ HOSTNAME_CMP02 }}: +106
50 default_{{ HOSTNAME_GTW01 }}: +110
51 default_{{ HOSTNAME_PRX01 }}: +121
52 ip_ranges:
53 dhcp: [+90, -10]
54
55 admin-pool01:
56 net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.0.0/16:24') }}
57 params:
58 ip_reserved:
59 gateway: +1
60 l2_network_device: +1
61 default_{{ HOSTNAME_CFG01 }}: +100
62 default_{{ HOSTNAME_CID01 }}: +91
63 default_{{ HOSTNAME_CID02 }}: +92
64 default_{{ HOSTNAME_CID03 }}: +93
65 default_{{ HOSTNAME_CTL01 }}: +101
66 default_{{ HOSTNAME_CTL02 }}: +102
67 default_{{ HOSTNAME_CTL03 }}: +103
68 default_{{ HOSTNAME_CMP01 }}: +105
69 default_{{ HOSTNAME_CMP02 }}: +106
70 default_{{ HOSTNAME_GTW01 }}: +110
71 default_{{ HOSTNAME_PRX01 }}: +121
72 ip_ranges:
73 dhcp: [+90, -10]
74
75 tenant-pool01:
76 net: {{ os_env('TENANT_ADDRESS_POOL01', '10.80.0.0/16:24') }}
77 params:
78 ip_reserved:
79 gateway: +1
80 l2_network_device: +1
81 default_{{ HOSTNAME_CFG01 }}: +100
82 default_{{ HOSTNAME_CID01 }}: +91
83 default_{{ HOSTNAME_CID02 }}: +92
84 default_{{ HOSTNAME_CID03 }}: +93
85 default_{{ HOSTNAME_CTL01 }}: +101
86 default_{{ HOSTNAME_CTL02 }}: +102
87 default_{{ HOSTNAME_CTL03 }}: +103
88 default_{{ HOSTNAME_CMP01 }}: +105
89 default_{{ HOSTNAME_CMP02 }}: +106
90 default_{{ HOSTNAME_GTW01 }}: +110
91 default_{{ HOSTNAME_PRX01 }}: +121
92 ip_ranges:
93 dhcp: [+10, -10]
94
95 external-pool01:
96 net: {{ os_env('EXTERNAL_ADDRESS_POOL01', '10.90.0.0/16:24') }}
97 params:
98 ip_reserved:
99 gateway: +1
100 l2_network_device: +1
101 default_{{ HOSTNAME_CFG01 }}: +100
102 default_{{ HOSTNAME_CID01 }}: +91
103 default_{{ HOSTNAME_CID02 }}: +92
104 default_{{ HOSTNAME_CID03 }}: +93
105 default_{{ HOSTNAME_CTL01 }}: +101
106 default_{{ HOSTNAME_CTL02 }}: +102
107 default_{{ HOSTNAME_CTL03 }}: +103
108 default_{{ HOSTNAME_CMP01 }}: +105
109 default_{{ HOSTNAME_CMP02 }}: +106
110 default_{{ HOSTNAME_GTW01 }}: +110
111 default_{{ HOSTNAME_PRX01 }}: +121
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
128 network_pools:
129 admin: admin-pool01
130 private: private-pool01
131 tenant: tenant-pool01
132 external: external-pool01
133
134 l2_network_devices:
135 admin:
136 address_pool: admin-pool01
137 dhcp: true
138 forward:
139 mode: nat
140
141 private:
142 address_pool: private-pool01
143 dhcp: dhcp
144
145 tenant:
146 address_pool: tenant-pool01
147 dhcp: false
148
149 external:
150 address_pool: external-pool01
151 dhcp: true
152 forward:
153 mode: nat
154
155
156 group_volumes:
157 - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes.
158 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
159 # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2
160 format: qcow2
161
162 nodes:
163 - name: {{ HOSTNAME_CFG01 }}
164 role: salt_master
165 params:
166 vcpu: !os_env SLAVE_NODE_CPU, 4
167 memory: !os_env SLAVE_NODE_MEMORY, 3096
168 boot:
169 - hd
170 cloud_init_volume_name: iso
171 cloud_init_iface_up: ens3
172 volumes:
173 - name: system
174 capacity: !os_env NODE_VOLUME_SIZE, 150
175 backing_store: cloudimage1604
176 format: qcow2
177 - name: iso # Volume with name 'iso' will be used
178 # for store image with cloud-init metadata.
179 capacity: 1
180 format: raw
181 device: cdrom
182 bus: ide
183 cloudinit_meta_data: *cloudinit_meta_data
184 cloudinit_user_data: *cloudinit_user_data_cfg01
185
186 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_CID01 }}
202 role: salt_minion
203 params:
204 vcpu: !os_env SLAVE_NODE_CPU, 4
205 memory: !os_env SLAVE_NODE_MEMORY, 12288
206 boot:
207 - hd
208 cloud_init_volume_name: iso
209 cloud_init_iface_up: ens4
210 volumes:
211 - name: system
212 capacity: !os_env NODE_VOLUME_SIZE, 150
213 backing_store: cloudimage1604
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_cicd
223
224 interfaces: &cid_interfaces
225 - label: ens3
226 l2_network_device: private
227 interface_model: *interface_model
228 - label: ens4
229 l2_network_device: admin
230 interface_model: *interface_model
231 network_config: &cid_network_config
232 ens3:
233 networks:
234 - private
235 ens4:
236 networks:
237 - admin
238
239 - name: {{ HOSTNAME_CID02 }}
240 role: salt_minion
241 params:
242 vcpu: !os_env SLAVE_NODE_CPU, 4
243 memory: !os_env SLAVE_NODE_MEMORY, 6144
244 boot:
245 - hd
246 cloud_init_volume_name: iso
247 cloud_init_iface_up: ens4
248 volumes:
249 - name: system
250 capacity: !os_env NODE_VOLUME_SIZE, 150
251 backing_store: cloudimage1604
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_cicd
261
262 interfaces: *cid_interfaces
263 network_config: *cid_network_config
264
265 - name: {{ HOSTNAME_CID03 }}
266 role: salt_minion
267 params:
268 vcpu: !os_env SLAVE_NODE_CPU, 4
269 memory: !os_env SLAVE_NODE_MEMORY, 6144
270 boot:
271 - hd
272 cloud_init_volume_name: iso
273 cloud_init_iface_up: ens4
274 volumes:
275 - name: system
276 capacity: !os_env NODE_VOLUME_SIZE, 150
277 backing_store: cloudimage1604
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_cicd
287
288 interfaces: *cid_interfaces
289 network_config: *cid_network_config
290
291
292 - name: {{ HOSTNAME_CTL01 }}
293 role: salt_minion
294 params:
295 vcpu: !os_env SLAVE_NODE_CPU, 4
296 memory: !os_env SLAVE_NODE_MEMORY, 6144
297 boot:
298 - hd
299 cloud_init_volume_name: iso
300 cloud_init_iface_up: ens3
301 volumes:
302 - name: system
303 capacity: !os_env NODE_VOLUME_SIZE, 150
304 backing_store: cloudimage1604
305 format: qcow2
306 - name: cinder
307 capacity: 50
308 format: qcow2
309 - name: iso # Volume with name 'iso' will be used
310 # for store image with cloud-init metadata.
311 capacity: 1
312 format: raw
313 device: cdrom
314 bus: ide
315 cloudinit_meta_data: *cloudinit_meta_data
316 cloudinit_user_data: *cloudinit_user_data_openstack
317
318 interfaces: &interfaces
319 - label: ens3
320 l2_network_device: admin
321 interface_model: *interface_model
322 - label: ens4
323 l2_network_device: private
324 interface_model: *interface_model
325 network_config: &network_config
326 ens3:
327 networks:
328 - admin
329 ens4:
330 networks:
331 - private
332
333 - name: {{ HOSTNAME_CTL02 }}
334 role: salt_minion
335 params:
336 vcpu: !os_env SLAVE_NODE_CPU, 4
337 memory: !os_env SLAVE_NODE_MEMORY, 6144
338 boot:
339 - hd
340 cloud_init_volume_name: iso
341 cloud_init_iface_up: ens3
342 volumes:
343 - name: system
344 capacity: !os_env NODE_VOLUME_SIZE, 150
345 backing_store: cloudimage1604
346 format: qcow2
347 - name: cinder
348 capacity: 50
349 format: qcow2
350 - name: iso # Volume with name 'iso' will be used
351 # for store image with cloud-init metadata.
352 capacity: 1
353 format: raw
354 device: cdrom
355 bus: ide
356 cloudinit_meta_data: *cloudinit_meta_data
357 cloudinit_user_data: *cloudinit_user_data_openstack
358
359 interfaces: *interfaces
360 network_config: *network_config
361
362 - name: {{ HOSTNAME_CTL03 }}
363 role: salt_minion
364 params:
365 vcpu: !os_env SLAVE_NODE_CPU, 4
366 memory: !os_env SLAVE_NODE_MEMORY, 6144
367 boot:
368 - hd
369 cloud_init_volume_name: iso
370 cloud_init_iface_up: ens3
371 volumes:
372 - name: system
373 capacity: !os_env NODE_VOLUME_SIZE, 150
374 backing_store: cloudimage1604
375 format: qcow2
376 - name: cinder
377 capacity: 50
378 format: qcow2
379 - name: iso # Volume with name 'iso' will be used
380 # for store image with cloud-init metadata.
381 capacity: 1
382 format: raw
383 device: cdrom
384 bus: ide
385 cloudinit_meta_data: *cloudinit_meta_data
386 cloudinit_user_data: *cloudinit_user_data_openstack
387
388 interfaces: *interfaces
389 network_config: *network_config
390
391 - name: {{ HOSTNAME_PRX01 }}
392 role: salt_minion
393 params:
394 vcpu: !os_env SLAVE_NODE_CPU, 4
395 memory: !os_env SLAVE_NODE_MEMORY, 2048
396 boot:
397 - hd
398 cloud_init_volume_name: iso
399 cloud_init_iface_up: ens3
400 volumes:
401 - name: system
402 capacity: !os_env NODE_VOLUME_SIZE, 150
403 backing_store: cloudimage1604
404 format: qcow2
405 - name: cinder
406 capacity: 50
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_openstack
416
417 interfaces: *interfaces
418 network_config: *network_config
419
420
421 - name: {{ HOSTNAME_CMP01 }}
422 role: salt_minion
423 params:
424 vcpu: !os_env SLAVE_NODE_CPU, 4
425 memory: !os_env SLAVE_NODE_MEMORY, 4096
426 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: cloudimage1604
434 format: qcow2
435 - 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_openstack
443
444
445 interfaces: &all_interfaces
446 - label: ens3
447 l2_network_device: admin
448 interface_model: *interface_model
449 - label: ens4
450 l2_network_device: private
451 interface_model: *interface_model
452 - label: ens5
453 l2_network_device: tenant
454 interface_model: *interface_model
455 - label: ens6
456 l2_network_device: external
457 interface_model: *interface_model
458 network_config: &all_network_config
459 ens3:
460 networks:
461 - admin
462 ens4:
463 networks:
464 - private
465 ens5:
466 networks:
467 - tenant
468 ens6:
469 networks:
470 - external
471
472 - name: {{ HOSTNAME_CMP02 }}
473 role: salt_minion
474 params:
475 vcpu: !os_env SLAVE_NODE_CPU, 4
476 memory: !os_env SLAVE_NODE_MEMORY, 4096
477 boot:
478 - hd
479 cloud_init_volume_name: iso
480 cloud_init_iface_up: ens3
481 volumes:
482 - name: system
483 capacity: !os_env NODE_VOLUME_SIZE, 150
484 backing_store: cloudimage1604
485 format: qcow2
486 - name: iso # Volume with name 'iso' will be used
487 # for store image with cloud-init metadata.
488 capacity: 1
489 format: raw
490 device: cdrom
491 bus: ide
492 cloudinit_meta_data: *cloudinit_meta_data
493 cloudinit_user_data: *cloudinit_user_data_openstack
494
495 interfaces: *all_interfaces
496 network_config: *all_network_config
497
498 - name: {{ HOSTNAME_GTW01 }}
499 role: salt_minion
500 params:
501 vcpu: !os_env SLAVE_NODE_CPU, 1
502 memory: !os_env SLAVE_NODE_MEMORY, 2048
503 boot:
504 - hd
505 cloud_init_volume_name: iso
506 cloud_init_iface_up: ens3
507 volumes:
508 - name: system
509 capacity: !os_env NODE_VOLUME_SIZE, 150
510 backing_store: cloudimage1604
511 format: qcow2
512 - name: iso # Volume with name 'iso' will be used
513 # for store image with cloud-init metadata.
514 capacity: 1
515 format: raw
516 device: cdrom
517 bus: ide
518 cloudinit_meta_data: *cloudinit_meta_data
519 cloudinit_user_data: *cloudinit_user_data_openstack
520
521 interfaces: *all_interfaces
522 network_config: *all_network_config