blob: 2355c0c6a776d32ca28cc0955045674fccb45eb0 [file] [log] [blame]
Tatyana Leontovichc8b8ca22017-05-19 13:37:05 +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') %}
Tatyana Leontovichc8b8ca22017-05-19 13:37:05 +03003
4{% import 'virtual-mcp11-k8s-calico/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
5{% import 'virtual-mcp11-k8s-calico/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
6{% import 'virtual-mcp11-k8s-calico/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA_1604 with context %}
7
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +02008---
9aliases:
Tatyana Leontovichc8b8ca22017-05-19 13:37:05 +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 }}
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020014
Dennis Dmitriev5ec4d572017-09-27 00:47:54 +030015{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp11-k8s-calico.local') %}
16{% set DOMAIN_NAME = os_env('DOMAIN_NAME', LAB_CONFIG_NAME) + '.local' %}
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020017{% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01.' + DOMAIN_NAME) %}
18{% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %}
19{% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %}
20{% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %}
21{% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp01.' + DOMAIN_NAME) %}
22{% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp02.' + DOMAIN_NAME) %}
23{% set HOSTNAME_MON01 = os_env('HOSTNAME_MON01', 'mon01.' + DOMAIN_NAME) %}
24{% set HOSTNAME_MON02 = os_env('HOSTNAME_MON02', 'mon02.' + DOMAIN_NAME) %}
25{% set HOSTNAME_MON03 = os_env('HOSTNAME_MON03', 'mon03.' + DOMAIN_NAME) %}
26{% set HOSTNAME_PRX01 = os_env('HOSTNAME_PRX01', 'prx01.' + DOMAIN_NAME) %}
27
28template:
29 devops_settings:
Tatyana Leontovichc8b8ca22017-05-19 13:37:05 +030030 env_name: {{ os_env('ENV_NAME', 'virtual-mcp11-k8s-calico_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }}
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020031
32 address_pools:
33 admin-pool01:
Tatyana Leontoviche4fe5312017-05-19 14:40:06 +030034 net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.0.0/16:24') }}
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020035 params:
36 ip_reserved:
37 gateway: +1
38 l2_network_device: +1
Tatyana Leontoviche0286ed2017-09-12 11:55:06 +030039 default_{{ HOSTNAME_CFG01 }}: +90
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020040 default_{{ HOSTNAME_CTL01 }}: +101
41 default_{{ HOSTNAME_CTL02 }}: +102
42 default_{{ HOSTNAME_CTL03 }}: +103
43 default_{{ HOSTNAME_CMP01 }}: +105
44 default_{{ HOSTNAME_CMP02 }}: +106
45 default_{{ HOSTNAME_MON01 }}: +107
46 default_{{ HOSTNAME_MON02 }}: +108
47 default_{{ HOSTNAME_MON03 }}: +109
Tatyana Leontovich4ff75f32017-10-03 13:24:45 +030048 default_{{ HOSTNAME_PRX01 }}: +121
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020049 ip_ranges:
50 dhcp: [+90, -10]
51
52 private-pool01:
Tatyana Leontoviche4fe5312017-05-19 14:40:06 +030053 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }}
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020054 params:
55 ip_reserved:
56 gateway: +1
57 l2_network_device: +1
58 default_{{ HOSTNAME_CFG01 }}: +100
59 default_{{ HOSTNAME_CTL01 }}: +101
60 default_{{ HOSTNAME_CTL02 }}: +102
61 default_{{ HOSTNAME_CTL03 }}: +103
62 default_{{ HOSTNAME_CMP01 }}: +105
63 default_{{ HOSTNAME_CMP02 }}: +106
64 default_{{ HOSTNAME_MON01 }}: +107
65 default_{{ HOSTNAME_MON02 }}: +108
66 default_{{ HOSTNAME_MON03 }}: +109
Tatyana Leontovich4ff75f32017-10-03 13:24:45 +030067 default_{{ HOSTNAME_PRX01 }}: +121
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020068 ip_ranges:
69 dhcp: [+90, -10]
70
71 groups:
72 - name: default
73 driver:
74 name: devops.driver.libvirt
75 params:
76 connection_string: !os_env CONNECTION_STRING, qemu:///system
77 storage_pool_name: !os_env STORAGE_POOL_NAME, default
78 stp: False
79 hpet: False
80 enable_acpi: true
81 use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true
Dennis Dmitrievb3fc4242017-07-14 16:01:51 +030082 use_hugepages: !os_env DRIVER_USE_HUGEPAGES, false
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020083
84 network_pools:
85 admin: admin-pool01
86 private: private-pool01
87
88 l2_network_devices:
89 private:
90 address_pool: private-pool01
91 dhcp: true
92
93 admin:
94 address_pool: admin-pool01
95 dhcp: true
96 forward:
97 mode: nat
98
99 group_volumes:
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200100 - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes.
Dennis Dmitriev6f71cfd2018-01-31 14:17:28 +0200101 # http://images.mirantis.com/ubuntu-16-04-x64-latest.qcow2 (preffered)
102 # or
103 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
104 source_image: {{ os_env('MCP_IMAGE_PATH1604', os_env('IMAGE_PATH1604')) }}
Dennis Dmitrievf00a3842018-01-24 16:44:26 +0200105 format: qcow2
106 - name: cfg01_day01_image # Pre-configured day01 image
107 source_image: {{ os_env('IMAGE_PATH_CFG01_DAY01', os_env('IMAGE_PATH1604')) }} # http://images.mirantis.com/cfg01-day01.qcow2 or fallback to IMAGE_PATH1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200108 format: qcow2
109
110 nodes:
111 - name: {{ HOSTNAME_CFG01 }}
112 role: salt_master
113 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300114 vcpu: !os_env SLAVE_NODE_CPU, 2
Dennis Dmitrievb1822792017-10-24 18:22:23 +0300115 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200116 boot:
117 - hd
118 cloud_init_volume_name: iso
119 cloud_init_iface_up: ens3
120 volumes:
121 - name: system
122 capacity: !os_env NODE_VOLUME_SIZE, 150
Dennis Dmitrievf00a3842018-01-24 16:44:26 +0200123 backing_store: cfg01_day01_image
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200124 format: qcow2
125 - name: iso # Volume with name 'iso' will be used
126 # for store image with cloud-init metadata.
127 capacity: 1
128 format: raw
129 device: cdrom
130 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300131 cloudinit_meta_data: *cloudinit_meta_data
132 cloudinit_user_data: *cloudinit_user_data_cfg01
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200133
134 interfaces:
135 - label: ens3
136 l2_network_device: admin
137 interface_model: *interface_model
138 - label: ens4
139 l2_network_device: private
140 interface_model: *interface_model
141 network_config:
142 ens3:
143 networks:
144 - admin
145 ens4:
146 networks:
147 - private
148
149 - name: {{ HOSTNAME_CTL01 }}
Victor Ryzhenkin66d39372017-09-28 19:25:48 +0400150 role: k8s_controller
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200151 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300152 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300153 memory: !os_env SLAVE_NODE_MEMORY, 2048
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200154 boot:
155 - hd
156 cloud_init_volume_name: iso
157 cloud_init_iface_up: ens3
158 volumes:
159 - name: system
160 capacity: !os_env NODE_VOLUME_SIZE, 150
161 backing_store: cloudimage1604
162 format: qcow2
163 - name: cinder
164 capacity: 50
165 format: qcow2
166 - name: iso # Volume with name 'iso' will be used
167 # for store image with cloud-init metadata.
168 capacity: 1
169 format: raw
170 device: cdrom
171 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300172 cloudinit_meta_data: *cloudinit_meta_data
173 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200174
175 interfaces: &interfaces
176 - label: ens3
177 l2_network_device: admin
178 interface_model: *interface_model
179 - label: ens4
180 l2_network_device: private
181 interface_model: *interface_model
182 network_config: &network_config
183 ens3:
184 networks:
185 - admin
186 ens4:
187 networks:
188 - private
189
190 - name: {{ HOSTNAME_CTL02 }}
Victor Ryzhenkin3ffa2b42017-10-05 16:38:44 +0400191 role: salt_minion
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200192 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300193 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300194 memory: !os_env SLAVE_NODE_MEMORY, 2048
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200195 boot:
196 - hd
197 cloud_init_volume_name: iso
198 cloud_init_iface_up: ens3
199 volumes:
200 - name: system
201 capacity: !os_env NODE_VOLUME_SIZE, 150
202 backing_store: cloudimage1604
203 format: qcow2
204 - name: cinder
205 capacity: 50
206 format: qcow2
207 - name: iso # Volume with name 'iso' will be used
208 # for store image with cloud-init metadata.
209 capacity: 1
210 format: raw
211 device: cdrom
212 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300213 cloudinit_meta_data: *cloudinit_meta_data
214 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200215
216 interfaces: *interfaces
217 network_config: *network_config
218
219 - name: {{ HOSTNAME_CTL03 }}
220 role: salt_minion
221 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300222 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300223 memory: !os_env SLAVE_NODE_MEMORY, 2048
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200224 boot:
225 - hd
226 cloud_init_volume_name: iso
227 cloud_init_iface_up: ens3
228 volumes:
229 - name: system
230 capacity: !os_env NODE_VOLUME_SIZE, 150
231 backing_store: cloudimage1604
232 format: qcow2
233 - name: cinder
234 capacity: 50
235 format: qcow2
236 - name: iso # Volume with name 'iso' will be used
237 # for store image with cloud-init metadata.
238 capacity: 1
239 format: raw
240 device: cdrom
241 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300242 cloudinit_meta_data: *cloudinit_meta_data
243 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200244
245 interfaces: *interfaces
246 network_config: *network_config
247
248 - name: {{ HOSTNAME_CMP01 }}
249 role: salt_minion
250 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300251 vcpu: !os_env SLAVE_NODE_CPU, 3
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200252 memory: !os_env SLAVE_NODE_MEMORY, 2048
253 boot:
254 - hd
255 cloud_init_volume_name: iso
256 cloud_init_iface_up: ens3
257 volumes:
258 - name: system
259 capacity: !os_env NODE_VOLUME_SIZE, 150
260 backing_store: cloudimage1604
261 format: qcow2
262 - name: iso # Volume with name 'iso' will be used
263 # for store image with cloud-init metadata.
264 capacity: 1
265 format: raw
266 device: cdrom
267 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300268 cloudinit_meta_data: *cloudinit_meta_data
269 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200270
271 interfaces: &all_interfaces
272 - label: ens3
273 l2_network_device: admin
274 interface_model: *interface_model
275 - label: ens4
276 l2_network_device: private
277 interface_model: *interface_model
278 network_config: &all_network_config
279 ens3:
280 networks:
281 - admin
282 ens4:
283 networks:
284 - private
285
286 - name: {{ HOSTNAME_CMP02 }}
287 role: salt_minion
288 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300289 vcpu: !os_env SLAVE_NODE_CPU, 3
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200290 memory: !os_env SLAVE_NODE_MEMORY, 2048
291 boot:
292 - hd
293 cloud_init_volume_name: iso
294 cloud_init_iface_up: ens3
295 volumes:
296 - name: system
297 capacity: !os_env NODE_VOLUME_SIZE, 150
298 backing_store: cloudimage1604
299 format: qcow2
300 - name: iso # Volume with name 'iso' will be used
301 # for store image with cloud-init metadata.
302 capacity: 1
303 format: raw
304 device: cdrom
305 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300306 cloudinit_meta_data: *cloudinit_meta_data
307 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200308
309 interfaces: *interfaces
310 network_config: *network_config
311
312 - name: {{ HOSTNAME_MON01 }}
313 role: salt_minion
314 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300315 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300316 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200317 boot:
318 - hd
319 cloud_init_volume_name: iso
320 cloud_init_iface_up: ens3
321 volumes:
322 - name: system
323 capacity: !os_env NODE_VOLUME_SIZE, 150
324 backing_store: cloudimage1604
325 format: qcow2
326 - name: iso # Volume with name 'iso' will be used
327 # for store image with cloud-init metadata.
328 capacity: 1
329 format: raw
330 device: cdrom
331 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300332 cloudinit_meta_data: *cloudinit_meta_data
333 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200334
335 interfaces: *interfaces
336 network_config: *network_config
337
338 - name: {{ HOSTNAME_MON02 }}
339 role: salt_minion
340 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300341 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300342 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200343 boot:
344 - hd
345 cloud_init_volume_name: iso
346 cloud_init_iface_up: ens3
347 volumes:
348 - name: system
349 capacity: !os_env NODE_VOLUME_SIZE, 150
350 backing_store: cloudimage1604
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
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300358 cloudinit_meta_data: *cloudinit_meta_data
359 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200360
361 interfaces: *interfaces
362 network_config: *network_config
363
364 - name: {{ HOSTNAME_MON03 }}
365 role: salt_minion
366 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300367 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300368 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200369 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: iso # Volume with name 'iso' will be used
379 # for store image with cloud-init metadata.
380 capacity: 1
381 format: raw
382 device: cdrom
383 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300384 cloudinit_meta_data: *cloudinit_meta_data
385 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200386
387 interfaces: *interfaces
388 network_config: *network_config
389
390 - name: {{ HOSTNAME_PRX01 }}
391 role: salt_minion
392 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300393 vcpu: !os_env SLAVE_NODE_CPU, 1
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200394 memory: !os_env SLAVE_NODE_MEMORY, 1024
395 boot:
396 - hd
397 cloud_init_volume_name: iso
398 cloud_init_iface_up: ens3
399 volumes:
400 - name: system
401 capacity: !os_env NODE_VOLUME_SIZE, 150
402 backing_store: cloudimage1604
403 format: qcow2
404 - name: iso # Volume with name 'iso' will be used
405 # for store image with cloud-init metadata.
406 capacity: 1
407 format: raw
408 device: cdrom
409 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300410 cloudinit_meta_data: *cloudinit_meta_data
411 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200412
413 interfaces: *interfaces
414 network_config: *network_config