blob: b75127a424dae81d0fe4469886eed897596c7788 [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.
101 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
102 # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2
103 format: qcow2
104
105 nodes:
106 - name: {{ HOSTNAME_CFG01 }}
107 role: salt_master
108 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300109 vcpu: !os_env SLAVE_NODE_CPU, 2
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200110 memory: !os_env SLAVE_NODE_MEMORY, 1536
111 boot:
112 - hd
113 cloud_init_volume_name: iso
114 cloud_init_iface_up: ens3
115 volumes:
116 - name: system
117 capacity: !os_env NODE_VOLUME_SIZE, 150
118 backing_store: cloudimage1604
119 format: qcow2
120 - name: iso # Volume with name 'iso' will be used
121 # for store image with cloud-init metadata.
122 capacity: 1
123 format: raw
124 device: cdrom
125 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300126 cloudinit_meta_data: *cloudinit_meta_data
127 cloudinit_user_data: *cloudinit_user_data_cfg01
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200128
129 interfaces:
130 - label: ens3
131 l2_network_device: admin
132 interface_model: *interface_model
133 - label: ens4
134 l2_network_device: private
135 interface_model: *interface_model
136 network_config:
137 ens3:
138 networks:
139 - admin
140 ens4:
141 networks:
142 - private
143
144 - name: {{ HOSTNAME_CTL01 }}
145 role: salt_minion
146 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300147 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300148 memory: !os_env SLAVE_NODE_MEMORY, 2048
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200149 boot:
150 - hd
151 cloud_init_volume_name: iso
152 cloud_init_iface_up: ens3
153 volumes:
154 - name: system
155 capacity: !os_env NODE_VOLUME_SIZE, 150
156 backing_store: cloudimage1604
157 format: qcow2
158 - name: cinder
159 capacity: 50
160 format: qcow2
161 - name: iso # Volume with name 'iso' will be used
162 # for store image with cloud-init metadata.
163 capacity: 1
164 format: raw
165 device: cdrom
166 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300167 cloudinit_meta_data: *cloudinit_meta_data
168 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200169
170 interfaces: &interfaces
171 - label: ens3
172 l2_network_device: admin
173 interface_model: *interface_model
174 - label: ens4
175 l2_network_device: private
176 interface_model: *interface_model
177 network_config: &network_config
178 ens3:
179 networks:
180 - admin
181 ens4:
182 networks:
183 - private
184
185 - name: {{ HOSTNAME_CTL02 }}
vrovachev99228d32017-06-08 19:46:10 +0400186 role: k8s_virtlet
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200187 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300188 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300189 memory: !os_env SLAVE_NODE_MEMORY, 2048
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200190 boot:
191 - hd
192 cloud_init_volume_name: iso
193 cloud_init_iface_up: ens3
194 volumes:
195 - name: system
196 capacity: !os_env NODE_VOLUME_SIZE, 150
197 backing_store: cloudimage1604
198 format: qcow2
199 - name: cinder
200 capacity: 50
201 format: qcow2
202 - name: iso # Volume with name 'iso' will be used
203 # for store image with cloud-init metadata.
204 capacity: 1
205 format: raw
206 device: cdrom
207 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300208 cloudinit_meta_data: *cloudinit_meta_data
209 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200210
211 interfaces: *interfaces
212 network_config: *network_config
213
214 - name: {{ HOSTNAME_CTL03 }}
215 role: salt_minion
216 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300217 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300218 memory: !os_env SLAVE_NODE_MEMORY, 2048
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200219 boot:
220 - hd
221 cloud_init_volume_name: iso
222 cloud_init_iface_up: ens3
223 volumes:
224 - name: system
225 capacity: !os_env NODE_VOLUME_SIZE, 150
226 backing_store: cloudimage1604
227 format: qcow2
228 - name: cinder
229 capacity: 50
230 format: qcow2
231 - name: iso # Volume with name 'iso' will be used
232 # for store image with cloud-init metadata.
233 capacity: 1
234 format: raw
235 device: cdrom
236 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300237 cloudinit_meta_data: *cloudinit_meta_data
238 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200239
240 interfaces: *interfaces
241 network_config: *network_config
242
243 - name: {{ HOSTNAME_CMP01 }}
244 role: salt_minion
245 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300246 vcpu: !os_env SLAVE_NODE_CPU, 3
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200247 memory: !os_env SLAVE_NODE_MEMORY, 2048
248 boot:
249 - hd
250 cloud_init_volume_name: iso
251 cloud_init_iface_up: ens3
252 volumes:
253 - name: system
254 capacity: !os_env NODE_VOLUME_SIZE, 150
255 backing_store: cloudimage1604
256 format: qcow2
257 - name: iso # Volume with name 'iso' will be used
258 # for store image with cloud-init metadata.
259 capacity: 1
260 format: raw
261 device: cdrom
262 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300263 cloudinit_meta_data: *cloudinit_meta_data
264 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200265
266 interfaces: &all_interfaces
267 - label: ens3
268 l2_network_device: admin
269 interface_model: *interface_model
270 - label: ens4
271 l2_network_device: private
272 interface_model: *interface_model
273 network_config: &all_network_config
274 ens3:
275 networks:
276 - admin
277 ens4:
278 networks:
279 - private
280
281 - name: {{ HOSTNAME_CMP02 }}
282 role: salt_minion
283 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300284 vcpu: !os_env SLAVE_NODE_CPU, 3
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200285 memory: !os_env SLAVE_NODE_MEMORY, 2048
286 boot:
287 - hd
288 cloud_init_volume_name: iso
289 cloud_init_iface_up: ens3
290 volumes:
291 - name: system
292 capacity: !os_env NODE_VOLUME_SIZE, 150
293 backing_store: cloudimage1604
294 format: qcow2
295 - name: iso # Volume with name 'iso' will be used
296 # for store image with cloud-init metadata.
297 capacity: 1
298 format: raw
299 device: cdrom
300 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300301 cloudinit_meta_data: *cloudinit_meta_data
302 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200303
304 interfaces: *interfaces
305 network_config: *network_config
306
307 - name: {{ HOSTNAME_MON01 }}
308 role: salt_minion
309 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300310 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300311 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200312 boot:
313 - hd
314 cloud_init_volume_name: iso
315 cloud_init_iface_up: ens3
316 volumes:
317 - name: system
318 capacity: !os_env NODE_VOLUME_SIZE, 150
319 backing_store: cloudimage1604
320 format: qcow2
321 - name: iso # Volume with name 'iso' will be used
322 # for store image with cloud-init metadata.
323 capacity: 1
324 format: raw
325 device: cdrom
326 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300327 cloudinit_meta_data: *cloudinit_meta_data
328 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200329
330 interfaces: *interfaces
331 network_config: *network_config
332
333 - name: {{ HOSTNAME_MON02 }}
334 role: salt_minion
335 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300336 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300337 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200338 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: iso # Volume with name 'iso' will be used
348 # for store image with cloud-init metadata.
349 capacity: 1
350 format: raw
351 device: cdrom
352 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300353 cloudinit_meta_data: *cloudinit_meta_data
354 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200355
356 interfaces: *interfaces
357 network_config: *network_config
358
359 - name: {{ HOSTNAME_MON03 }}
360 role: salt_minion
361 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300362 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300363 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200364 boot:
365 - hd
366 cloud_init_volume_name: iso
367 cloud_init_iface_up: ens3
368 volumes:
369 - name: system
370 capacity: !os_env NODE_VOLUME_SIZE, 150
371 backing_store: cloudimage1604
372 format: qcow2
373 - name: iso # Volume with name 'iso' will be used
374 # for store image with cloud-init metadata.
375 capacity: 1
376 format: raw
377 device: cdrom
378 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300379 cloudinit_meta_data: *cloudinit_meta_data
380 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200381
382 interfaces: *interfaces
383 network_config: *network_config
384
385 - name: {{ HOSTNAME_PRX01 }}
386 role: salt_minion
387 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300388 vcpu: !os_env SLAVE_NODE_CPU, 1
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200389 memory: !os_env SLAVE_NODE_MEMORY, 1024
390 boot:
391 - hd
392 cloud_init_volume_name: iso
393 cloud_init_iface_up: ens3
394 volumes:
395 - name: system
396 capacity: !os_env NODE_VOLUME_SIZE, 150
397 backing_store: cloudimage1604
398 format: qcow2
399 - name: iso # Volume with name 'iso' will be used
400 # for store image with cloud-init metadata.
401 capacity: 1
402 format: raw
403 device: cdrom
404 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300405 cloudinit_meta_data: *cloudinit_meta_data
406 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200407
408 interfaces: *interfaces
409 network_config: *network_config