blob: 46f49b2f444cd4e414c3c35e26acfda15bccb756 [file] [log] [blame]
Dennis Dmitrievb4b5c102017-05-10 17:09:06 +03001# Set the repository suite, one of the: 'nightly', 'testing', 'stable', or any other required
Dennis Dmitriev492813e2017-08-09 15:08:58 +03002{% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %}
Dennis Dmitrievb4b5c102017-05-10 17:09:06 +03003
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03004{% import 'virtual-mcp-ocata-dvr/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
5{% import 'virtual-mcp-ocata-dvr/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
6{% import 'virtual-mcp-ocata-dvr/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA_1604 with context %}
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +03007
Tatyana Leontovich38be41b2017-04-12 14:45:23 +03008---
9aliases:
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030010 - &interface_model {{ os_env('INTERFACE_MODEL', 'virtio') }}
11 - &cloudinit_meta_data {{ CLOUDINIT_META_DATA }}
12 - &cloudinit_user_data_cfg01 {{ CLOUDINIT_USER_DATA_CFG01 }}
13 - &cloudinit_user_data_1604 {{ CLOUDINIT_USER_DATA_1604 }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030014
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030015{% set DOMAIN_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp-ocata-dvr') + '.local' %}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030016{% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01.' + DOMAIN_NAME) %}
17{% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %}
18{% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %}
19{% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %}
20{% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp01.' + DOMAIN_NAME) %}
21{% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp02.' + DOMAIN_NAME) %}
Tatyana Leontovichd85357d2017-08-02 15:28:37 +030022{% 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) %}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030025{% set HOSTNAME_GTW01 = os_env('HOSTNAME_GTW01', 'gtw01.' + DOMAIN_NAME) %}
26{% set HOSTNAME_PRX01 = os_env('HOSTNAME_PRX01', 'prx01.' + DOMAIN_NAME) %}
27
28template:
29 devops_settings:
Dennis Dmitrievab83ea42017-05-12 16:52:45 +030030 env_name: {{ os_env('ENV_NAME', 'virtual-mcp-ocata-dvr_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030031
32 address_pools:
33 private-pool01:
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030034 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030035 params:
36 ip_reserved:
37 gateway: +1
38 l2_network_device: +1
39 default_{{ HOSTNAME_CFG01 }}: +100
40 default_{{ HOSTNAME_CTL01 }}: +101
41 default_{{ HOSTNAME_CTL02 }}: +102
42 default_{{ HOSTNAME_CTL03 }}: +103
43 default_{{ HOSTNAME_CMP01 }}: +105
44 default_{{ HOSTNAME_CMP02 }}: +106
Tatyana Leontovichd85357d2017-08-02 15:28:37 +030045 default_{{ HOSTNAME_MON01 }}: +107
46 default_{{ HOSTNAME_MON02 }}: +108
47 default_{{ HOSTNAME_MON03 }}: +109
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030048 default_{{ HOSTNAME_GTW01 }}: +110
49 default_{{ HOSTNAME_PRX01 }}: +121
50 ip_ranges:
51 dhcp: [+90, -10]
52
53 admin-pool01:
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030054 net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.0.0/16:24') }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030055 params:
56 ip_reserved:
57 gateway: +1
58 l2_network_device: +1
59 default_{{ HOSTNAME_CFG01 }}: +100
60 default_{{ HOSTNAME_CTL01 }}: +101
61 default_{{ HOSTNAME_CTL02 }}: +102
62 default_{{ HOSTNAME_CTL03 }}: +103
63 default_{{ HOSTNAME_CMP01 }}: +105
64 default_{{ HOSTNAME_CMP02 }}: +106
Tatyana Leontovichd85357d2017-08-02 15:28:37 +030065 default_{{ HOSTNAME_MON01 }}: +107
66 default_{{ HOSTNAME_MON02 }}: +108
67 default_{{ HOSTNAME_MON03 }}: +109
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030068 default_{{ HOSTNAME_GTW01 }}: +110
69 default_{{ HOSTNAME_PRX01 }}: +121
70 ip_ranges:
71 dhcp: [+90, -10]
72
73 tenant-pool01:
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030074 net: {{ os_env('TENANT_ADDRESS_POOL01', '10.80.0.0/16:24') }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030075 params:
76 ip_reserved:
77 gateway: +1
78 l2_network_device: +1
79 default_{{ HOSTNAME_CFG01 }}: +100
80 default_{{ HOSTNAME_CTL01 }}: +101
81 default_{{ HOSTNAME_CTL02 }}: +102
82 default_{{ HOSTNAME_CTL03 }}: +103
83 default_{{ HOSTNAME_CMP01 }}: +105
84 default_{{ HOSTNAME_CMP02 }}: +106
Tatyana Leontovichd85357d2017-08-02 15:28:37 +030085 default_{{ HOSTNAME_MON01 }}: +107
86 default_{{ HOSTNAME_MON02 }}: +108
87 default_{{ HOSTNAME_MON03 }}: +109
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030088 default_{{ HOSTNAME_GTW01 }}: +110
89 default_{{ HOSTNAME_PRX01 }}: +121
90 ip_ranges:
91 dhcp: [+10, -10]
92
93 external-pool01:
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030094 net: {{ os_env('EXTERNAL_ADDRESS_POOL01', '10.90.0.0/16:24') }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030095 params:
96 ip_reserved:
97 gateway: +1
98 l2_network_device: +1
99 default_{{ HOSTNAME_CFG01 }}: +100
100 default_{{ HOSTNAME_CTL01 }}: +101
101 default_{{ HOSTNAME_CTL02 }}: +102
102 default_{{ HOSTNAME_CTL03 }}: +103
103 default_{{ HOSTNAME_CMP01 }}: +105
104 default_{{ HOSTNAME_CMP02 }}: +106
Tatyana Leontovichd85357d2017-08-02 15:28:37 +0300105 default_{{ HOSTNAME_MON01 }}: +107
106 default_{{ HOSTNAME_MON02 }}: +108
107 default_{{ HOSTNAME_MON03 }}: +109
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300108 default_{{ HOSTNAME_GTW01 }}: +110
109 default_{{ HOSTNAME_PRX01 }}: +121
110 ip_ranges:
111 dhcp: [+10, -10]
112
113
114 groups:
115 - name: default
116 driver:
117 name: devops.driver.libvirt
118 params:
119 connection_string: !os_env CONNECTION_STRING, qemu:///system
120 storage_pool_name: !os_env STORAGE_POOL_NAME, default
121 stp: False
122 hpet: False
123 enable_acpi: true
124 use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true
Dennis Dmitrievb3fc4242017-07-14 16:01:51 +0300125 use_hugepages: !os_env DRIVER_USE_HUGEPAGES, false
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300126
127 network_pools:
128 admin: admin-pool01
129 private: private-pool01
130 tenant: tenant-pool01
131 external: external-pool01
132
133 l2_network_devices:
134 private:
135 address_pool: private-pool01
136 dhcp: true
137
138 admin:
139 address_pool: admin-pool01
140 dhcp: true
141 forward:
142 mode: nat
143
144 tenant:
145 address_pool: tenant-pool01
146 dhcp: true
147
148 external:
149 address_pool: external-pool01
150 dhcp: true
151 forward:
152 mode: nat
153
154
155 group_volumes:
156 - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes.
157 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
158 # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2
159 format: qcow2
160
161 nodes:
162 - name: {{ HOSTNAME_CFG01 }}
163 role: salt_master
164 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300165 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300166 memory: !os_env SLAVE_NODE_MEMORY, 2048
167 boot:
168 - hd
169 cloud_init_volume_name: iso
170 cloud_init_iface_up: ens3
171 volumes:
172 - name: system
173 capacity: !os_env NODE_VOLUME_SIZE, 150
174 backing_store: cloudimage1604
175 format: qcow2
176 - name: iso # Volume with name 'iso' will be used
177 # for store image with cloud-init metadata.
178 capacity: 1
179 format: raw
180 device: cdrom
181 bus: ide
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +0300182 cloudinit_meta_data: *cloudinit_meta_data
183 cloudinit_user_data: *cloudinit_user_data_cfg01
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300184
185 interfaces:
186 - label: ens3
187 l2_network_device: admin
188 interface_model: *interface_model
189 - label: ens4
190 l2_network_device: private
191 interface_model: *interface_model
192 network_config:
193 ens3:
194 networks:
195 - admin
196 ens4:
197 networks:
198 - private
199
200 - name: {{ HOSTNAME_CTL01 }}
201 role: salt_minion
202 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300203 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300204 memory: !os_env SLAVE_NODE_MEMORY, 8192
205 boot:
206 - hd
207 cloud_init_volume_name: iso
208 cloud_init_iface_up: ens3
209 volumes:
210 - name: system
211 capacity: !os_env NODE_VOLUME_SIZE, 150
212 backing_store: cloudimage1604
213 format: qcow2
214 - name: cinder
215 capacity: 50
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
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +0300223 cloudinit_meta_data: *cloudinit_meta_data
224 cloudinit_user_data: *cloudinit_user_data_1604
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300225
226 interfaces: &interfaces
227 - label: ens3
228 l2_network_device: admin
229 interface_model: *interface_model
230 - label: ens4
231 l2_network_device: private
232 interface_model: *interface_model
233 network_config: &network_config
234 ens3:
235 networks:
236 - admin
237 ens4:
238 networks:
239 - private
240
241 - name: {{ HOSTNAME_CTL02 }}
242 role: salt_minion
243 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300244 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300245 memory: !os_env SLAVE_NODE_MEMORY, 8192
246 boot:
247 - hd
248 cloud_init_volume_name: iso
249 cloud_init_iface_up: ens3
250 volumes:
251 - name: system
252 capacity: !os_env NODE_VOLUME_SIZE, 150
253 backing_store: cloudimage1604
254 format: qcow2
255 - name: cinder
256 capacity: 50
257 format: qcow2
258 - name: iso # Volume with name 'iso' will be used
259 # for store image with cloud-init metadata.
260 capacity: 1
261 format: raw
262 device: cdrom
263 bus: ide
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +0300264 cloudinit_meta_data: *cloudinit_meta_data
265 cloudinit_user_data: *cloudinit_user_data_1604
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300266
267 interfaces: *interfaces
268 network_config: *network_config
269
270 - name: {{ HOSTNAME_CTL03 }}
271 role: salt_minion
272 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300273 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300274 memory: !os_env SLAVE_NODE_MEMORY, 8192
275 boot:
276 - hd
277 cloud_init_volume_name: iso
278 cloud_init_iface_up: ens3
279 volumes:
280 - name: system
281 capacity: !os_env NODE_VOLUME_SIZE, 150
282 backing_store: cloudimage1604
283 format: qcow2
284 - name: cinder
285 capacity: 50
286 format: qcow2
287 - name: iso # Volume with name 'iso' will be used
288 # for store image with cloud-init metadata.
289 capacity: 1
290 format: raw
291 device: cdrom
292 bus: ide
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +0300293 cloudinit_meta_data: *cloudinit_meta_data
294 cloudinit_user_data: *cloudinit_user_data_1604
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300295
296 interfaces: *interfaces
297 network_config: *network_config
298
Tatyana Leontovichd85357d2017-08-02 15:28:37 +0300299 - name: {{ HOSTNAME_MON01 }}
300 role: salt_minion
301 params:
302 vcpu: !os_env SLAVE_NODE_CPU, 3
303 memory: !os_env SLAVE_NODE_MEMORY, 2048
304 boot:
305 - hd
306 cloud_init_volume_name: iso
307 cloud_init_iface_up: ens3
308 volumes:
309 - name: system
310 capacity: !os_env NODE_VOLUME_SIZE, 150
311 backing_store: cloudimage1604
312 format: qcow2
313 - name: iso # Volume with name 'iso' will be used
314 # for store image with cloud-init metadata.
315 capacity: 1
316 format: raw
317 device: cdrom
318 bus: ide
319 cloudinit_meta_data: !include underlay--meta-data.yaml
320 cloudinit_user_data: !include underlay--user-data1604.yaml
321
322 interfaces: *interfaces
323 network_config: *network_config
324
325 - name: {{ HOSTNAME_MON02 }}
326 role: salt_minion
327 params:
328 vcpu: !os_env SLAVE_NODE_CPU, 3
329 memory: !os_env SLAVE_NODE_MEMORY, 2048
330 boot:
331 - hd
332 cloud_init_volume_name: iso
333 cloud_init_iface_up: ens3
334 volumes:
335 - name: system
336 capacity: !os_env NODE_VOLUME_SIZE, 150
337 backing_store: cloudimage1604
338 format: qcow2
339 - name: iso # Volume with name 'iso' will be used
340 # for store image with cloud-init metadata.
341 capacity: 1
342 format: raw
343 device: cdrom
344 bus: ide
345 cloudinit_meta_data: !include underlay--meta-data.yaml
346 cloudinit_user_data: !include underlay--user-data1604.yaml
347
348 interfaces: *interfaces
349 network_config: *network_config
350
351 - name: {{ HOSTNAME_MON03 }}
352 role: salt_minion
353 params:
354 vcpu: !os_env SLAVE_NODE_CPU, 3
355 memory: !os_env SLAVE_NODE_MEMORY, 2048
356 boot:
357 - hd
358 cloud_init_volume_name: iso
359 cloud_init_iface_up: ens3
360 volumes:
361 - name: system
362 capacity: !os_env NODE_VOLUME_SIZE, 150
363 backing_store: cloudimage1604
364 format: qcow2
365 - name: iso # Volume with name 'iso' will be used
366 # for store image with cloud-init metadata.
367 capacity: 1
368 format: raw
369 device: cdrom
370 bus: ide
371 cloudinit_meta_data: !include underlay--meta-data.yaml
372 cloudinit_user_data: !include underlay--user-data1604.yaml
373
374 interfaces: *interfaces
375 network_config: *network_config
376
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300377 - name: {{ HOSTNAME_PRX01 }}
378 role: salt_minion
379 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300380 vcpu: !os_env SLAVE_NODE_CPU, 1
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300381 memory: !os_env SLAVE_NODE_MEMORY, 8192
382 boot:
383 - hd
384 cloud_init_volume_name: iso
385 cloud_init_iface_up: ens3
386 volumes:
387 - name: system
388 capacity: !os_env NODE_VOLUME_SIZE, 150
389 backing_store: cloudimage1604
390 format: qcow2
391 - name: cinder
392 capacity: 50
393 format: qcow2
394 - name: iso # Volume with name 'iso' will be used
395 # for store image with cloud-init metadata.
396 capacity: 1
397 format: raw
398 device: cdrom
399 bus: ide
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +0300400 cloudinit_meta_data: *cloudinit_meta_data
401 cloudinit_user_data: *cloudinit_user_data_1604
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300402
403 interfaces: *interfaces
404 network_config: *network_config
405
406
407 - name: {{ HOSTNAME_CMP01 }}
408 role: salt_minion
409 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300410 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300411 memory: !os_env SLAVE_NODE_MEMORY, 4096
412 boot:
413 - hd
414 cloud_init_volume_name: iso
415 cloud_init_iface_up: ens3
416 volumes:
417 - name: system
418 capacity: !os_env NODE_VOLUME_SIZE, 150
419 backing_store: cloudimage1604
420 format: qcow2
421 - name: iso # Volume with name 'iso' will be used
422 # for store image with cloud-init metadata.
423 capacity: 1
424 format: raw
425 device: cdrom
426 bus: ide
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +0300427 cloudinit_meta_data: *cloudinit_meta_data
428 cloudinit_user_data: *cloudinit_user_data_1604
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300429
430
431 interfaces: &all_interfaces
432 - label: ens3
433 l2_network_device: admin
434 interface_model: *interface_model
435 - label: ens4
436 l2_network_device: private
437 interface_model: *interface_model
438 - label: ens5
439 l2_network_device: tenant
440 interface_model: *interface_model
441 - label: ens6
442 l2_network_device: external
443 interface_model: *interface_model
444 network_config: &all_network_config
445 ens3:
446 networks:
447 - admin
448 ens4:
449 networks:
450 - private
451 ens5:
452 networks:
453 - tenant
454 ens6:
455 networks:
456 - external
457
458 - name: {{ HOSTNAME_CMP02 }}
459 role: salt_minion
460 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300461 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300462 memory: !os_env SLAVE_NODE_MEMORY, 4096
463 boot:
464 - hd
465 cloud_init_volume_name: iso
466 cloud_init_iface_up: ens3
467 volumes:
468 - name: system
469 capacity: !os_env NODE_VOLUME_SIZE, 150
470 backing_store: cloudimage1604
471 format: qcow2
472 - name: iso # Volume with name 'iso' will be used
473 # for store image with cloud-init metadata.
474 capacity: 1
475 format: raw
476 device: cdrom
477 bus: ide
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +0300478 cloudinit_meta_data: *cloudinit_meta_data
479 cloudinit_user_data: *cloudinit_user_data_1604
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300480
481 interfaces: *all_interfaces
482 network_config: *all_network_config
483
484 - name: {{ HOSTNAME_GTW01 }}
485 role: salt_minion
486 params:
487 vcpu: !os_env SLAVE_NODE_CPU, 1
488 memory: !os_env SLAVE_NODE_MEMORY, 2048
489 boot:
490 - hd
491 cloud_init_volume_name: iso
492 cloud_init_iface_up: ens3
493 volumes:
494 - name: system
495 capacity: !os_env NODE_VOLUME_SIZE, 150
496 backing_store: cloudimage1604
497 format: qcow2
498 - name: iso # Volume with name 'iso' will be used
499 # for store image with cloud-init metadata.
500 capacity: 1
501 format: raw
502 device: cdrom
503 bus: ide
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +0300504 cloudinit_meta_data: *cloudinit_meta_data
505 cloudinit_user_data: *cloudinit_user_data_1604
Tatyana Leontovich38be41b2017-04-12 14:45:23 +0300506
507 interfaces: *all_interfaces
508 network_config: *all_network_config