blob: c5df027fa60f360e53c49e861ab79f4a43012a89 [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 Dmitrievf00a3842018-01-24 16:44:26 +0200101 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
102 format: qcow2
103 - name: cfg01_day01_image # Pre-configured day01 image
104 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 +0200105 format: qcow2
106
107 nodes:
108 - name: {{ HOSTNAME_CFG01 }}
109 role: salt_master
110 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300111 vcpu: !os_env SLAVE_NODE_CPU, 2
Dennis Dmitrievb1822792017-10-24 18:22:23 +0300112 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200113 boot:
114 - hd
115 cloud_init_volume_name: iso
116 cloud_init_iface_up: ens3
117 volumes:
118 - name: system
119 capacity: !os_env NODE_VOLUME_SIZE, 150
Dennis Dmitrievf00a3842018-01-24 16:44:26 +0200120 backing_store: cfg01_day01_image
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200121 format: qcow2
122 - name: iso # Volume with name 'iso' will be used
123 # for store image with cloud-init metadata.
124 capacity: 1
125 format: raw
126 device: cdrom
127 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300128 cloudinit_meta_data: *cloudinit_meta_data
129 cloudinit_user_data: *cloudinit_user_data_cfg01
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200130
131 interfaces:
132 - label: ens3
133 l2_network_device: admin
134 interface_model: *interface_model
135 - label: ens4
136 l2_network_device: private
137 interface_model: *interface_model
138 network_config:
139 ens3:
140 networks:
141 - admin
142 ens4:
143 networks:
144 - private
145
146 - name: {{ HOSTNAME_CTL01 }}
Victor Ryzhenkin66d39372017-09-28 19:25:48 +0400147 role: k8s_controller
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200148 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300149 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300150 memory: !os_env SLAVE_NODE_MEMORY, 2048
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200151 boot:
152 - hd
153 cloud_init_volume_name: iso
154 cloud_init_iface_up: ens3
155 volumes:
156 - name: system
157 capacity: !os_env NODE_VOLUME_SIZE, 150
158 backing_store: cloudimage1604
159 format: qcow2
160 - name: cinder
161 capacity: 50
162 format: qcow2
163 - name: iso # Volume with name 'iso' will be used
164 # for store image with cloud-init metadata.
165 capacity: 1
166 format: raw
167 device: cdrom
168 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300169 cloudinit_meta_data: *cloudinit_meta_data
170 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200171
172 interfaces: &interfaces
173 - label: ens3
174 l2_network_device: admin
175 interface_model: *interface_model
176 - label: ens4
177 l2_network_device: private
178 interface_model: *interface_model
179 network_config: &network_config
180 ens3:
181 networks:
182 - admin
183 ens4:
184 networks:
185 - private
186
187 - name: {{ HOSTNAME_CTL02 }}
Victor Ryzhenkin3ffa2b42017-10-05 16:38:44 +0400188 role: salt_minion
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200189 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300190 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300191 memory: !os_env SLAVE_NODE_MEMORY, 2048
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200192 boot:
193 - hd
194 cloud_init_volume_name: iso
195 cloud_init_iface_up: ens3
196 volumes:
197 - name: system
198 capacity: !os_env NODE_VOLUME_SIZE, 150
199 backing_store: cloudimage1604
200 format: qcow2
201 - name: cinder
202 capacity: 50
203 format: qcow2
204 - name: iso # Volume with name 'iso' will be used
205 # for store image with cloud-init metadata.
206 capacity: 1
207 format: raw
208 device: cdrom
209 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300210 cloudinit_meta_data: *cloudinit_meta_data
211 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200212
213 interfaces: *interfaces
214 network_config: *network_config
215
216 - name: {{ HOSTNAME_CTL03 }}
217 role: salt_minion
218 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300219 vcpu: !os_env SLAVE_NODE_CPU, 2
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300220 memory: !os_env SLAVE_NODE_MEMORY, 2048
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200221 boot:
222 - hd
223 cloud_init_volume_name: iso
224 cloud_init_iface_up: ens3
225 volumes:
226 - name: system
227 capacity: !os_env NODE_VOLUME_SIZE, 150
228 backing_store: cloudimage1604
229 format: qcow2
230 - name: cinder
231 capacity: 50
232 format: qcow2
233 - name: iso # Volume with name 'iso' will be used
234 # for store image with cloud-init metadata.
235 capacity: 1
236 format: raw
237 device: cdrom
238 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300239 cloudinit_meta_data: *cloudinit_meta_data
240 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200241
242 interfaces: *interfaces
243 network_config: *network_config
244
245 - name: {{ HOSTNAME_CMP01 }}
246 role: salt_minion
247 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300248 vcpu: !os_env SLAVE_NODE_CPU, 3
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200249 memory: !os_env SLAVE_NODE_MEMORY, 2048
250 boot:
251 - hd
252 cloud_init_volume_name: iso
253 cloud_init_iface_up: ens3
254 volumes:
255 - name: system
256 capacity: !os_env NODE_VOLUME_SIZE, 150
257 backing_store: cloudimage1604
258 format: qcow2
259 - name: iso # Volume with name 'iso' will be used
260 # for store image with cloud-init metadata.
261 capacity: 1
262 format: raw
263 device: cdrom
264 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300265 cloudinit_meta_data: *cloudinit_meta_data
266 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200267
268 interfaces: &all_interfaces
269 - label: ens3
270 l2_network_device: admin
271 interface_model: *interface_model
272 - label: ens4
273 l2_network_device: private
274 interface_model: *interface_model
275 network_config: &all_network_config
276 ens3:
277 networks:
278 - admin
279 ens4:
280 networks:
281 - private
282
283 - name: {{ HOSTNAME_CMP02 }}
284 role: salt_minion
285 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300286 vcpu: !os_env SLAVE_NODE_CPU, 3
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200287 memory: !os_env SLAVE_NODE_MEMORY, 2048
288 boot:
289 - hd
290 cloud_init_volume_name: iso
291 cloud_init_iface_up: ens3
292 volumes:
293 - name: system
294 capacity: !os_env NODE_VOLUME_SIZE, 150
295 backing_store: cloudimage1604
296 format: qcow2
297 - name: iso # Volume with name 'iso' will be used
298 # for store image with cloud-init metadata.
299 capacity: 1
300 format: raw
301 device: cdrom
302 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300303 cloudinit_meta_data: *cloudinit_meta_data
304 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200305
306 interfaces: *interfaces
307 network_config: *network_config
308
309 - name: {{ HOSTNAME_MON01 }}
310 role: salt_minion
311 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300312 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300313 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200314 boot:
315 - hd
316 cloud_init_volume_name: iso
317 cloud_init_iface_up: ens3
318 volumes:
319 - name: system
320 capacity: !os_env NODE_VOLUME_SIZE, 150
321 backing_store: cloudimage1604
322 format: qcow2
323 - name: iso # Volume with name 'iso' will be used
324 # for store image with cloud-init metadata.
325 capacity: 1
326 format: raw
327 device: cdrom
328 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300329 cloudinit_meta_data: *cloudinit_meta_data
330 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200331
332 interfaces: *interfaces
333 network_config: *network_config
334
335 - name: {{ HOSTNAME_MON02 }}
336 role: salt_minion
337 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300338 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300339 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200340 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: iso # Volume with name 'iso' will be used
350 # for store image with cloud-init metadata.
351 capacity: 1
352 format: raw
353 device: cdrom
354 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300355 cloudinit_meta_data: *cloudinit_meta_data
356 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200357
358 interfaces: *interfaces
359 network_config: *network_config
360
361 - name: {{ HOSTNAME_MON03 }}
362 role: salt_minion
363 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300364 vcpu: !os_env SLAVE_NODE_CPU, 3
Tatyana Leontovich64126da2017-06-12 15:28:11 +0300365 memory: !os_env SLAVE_NODE_MEMORY, 4096
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200366 boot:
367 - hd
368 cloud_init_volume_name: iso
369 cloud_init_iface_up: ens3
370 volumes:
371 - name: system
372 capacity: !os_env NODE_VOLUME_SIZE, 150
373 backing_store: cloudimage1604
374 format: qcow2
375 - name: iso # Volume with name 'iso' will be used
376 # for store image with cloud-init metadata.
377 capacity: 1
378 format: raw
379 device: cdrom
380 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300381 cloudinit_meta_data: *cloudinit_meta_data
382 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200383
384 interfaces: *interfaces
385 network_config: *network_config
386
387 - name: {{ HOSTNAME_PRX01 }}
388 role: salt_minion
389 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300390 vcpu: !os_env SLAVE_NODE_CPU, 1
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200391 memory: !os_env SLAVE_NODE_MEMORY, 1024
392 boot:
393 - hd
394 cloud_init_volume_name: iso
395 cloud_init_iface_up: ens3
396 volumes:
397 - name: system
398 capacity: !os_env NODE_VOLUME_SIZE, 150
399 backing_store: cloudimage1604
400 format: qcow2
401 - name: iso # Volume with name 'iso' will be used
402 # for store image with cloud-init metadata.
403 capacity: 1
404 format: raw
405 device: cdrom
406 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300407 cloudinit_meta_data: *cloudinit_meta_data
408 cloudinit_user_data: *cloudinit_user_data_1604
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +0200409
410 interfaces: *interfaces
411 network_config: *network_config