blob: 2e92e1bbb68756607564014ab3b4a03b7630ce55 [file] [log] [blame]
Artem Panchenkoedf70ef2017-06-13 09:14:34 +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') %}
Artem Panchenkoedf70ef2017-06-13 09:14:34 +03003
4{% import 'virtual-mcp11-k8s-calico-minimal/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
5{% import 'virtual-mcp11-k8s-calico-minimal/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
6{% import 'virtual-mcp11-k8s-calico-minimal/underlay--user-data1604.yaml' as CLOUDINIT_USER_DATA_1604 with context %}
7
8---
9aliases:
10 - &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 }}
14
Dennis Dmitriev5ec4d572017-09-27 00:47:54 +030015{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp11-k8s-calico-minimal.local') %}
16{% set DOMAIN_NAME = os_env('DOMAIN_NAME', LAB_CONFIG_NAME) + '.local' %}
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030017{% 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
23
24template:
25 devops_settings:
26 env_name: {{ os_env('ENV_NAME', 'virtual-mcp11-k8s-calico-minimal_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }}
27
28 address_pools:
29 admin-pool01:
30 net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.0.0/16:24') }}
31 params:
32 ip_reserved:
33 gateway: +1
34 l2_network_device: +1
Tatyana Leontoviche0286ed2017-09-12 11:55:06 +030035 default_{{ HOSTNAME_CFG01 }}: +90
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030036 default_{{ HOSTNAME_CTL01 }}: +101
37 default_{{ HOSTNAME_CTL02 }}: +102
38 default_{{ HOSTNAME_CTL03 }}: +103
39 default_{{ HOSTNAME_CMP01 }}: +105
40 ip_ranges:
41 dhcp: [+90, -10]
42
43 private-pool01:
44 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }}
45 params:
46 ip_reserved:
47 gateway: +1
48 l2_network_device: +1
49 default_{{ HOSTNAME_CFG01 }}: +100
50 default_{{ HOSTNAME_CTL01 }}: +101
51 default_{{ HOSTNAME_CTL02 }}: +102
52 default_{{ HOSTNAME_CTL03 }}: +103
53 default_{{ HOSTNAME_CMP01 }}: +105
54 ip_ranges:
55 dhcp: [+90, -10]
56
57 groups:
58 - name: default
59 driver:
60 name: devops.driver.libvirt
61 params:
62 connection_string: !os_env CONNECTION_STRING, qemu:///system
63 storage_pool_name: !os_env STORAGE_POOL_NAME, default
64 stp: False
65 hpet: False
66 enable_acpi: true
67 use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true
Dennis Dmitrievb3fc4242017-07-14 16:01:51 +030068 use_hugepages: !os_env DRIVER_USE_HUGEPAGES, false
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030069
70 network_pools:
71 admin: admin-pool01
72 private: private-pool01
73
74 l2_network_devices:
75 private:
76 address_pool: private-pool01
77 dhcp: true
78
79 admin:
80 address_pool: admin-pool01
81 dhcp: true
82 forward:
83 mode: nat
84
85 group_volumes:
86 - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes.
Dennis Dmitriev6f71cfd2018-01-31 14:17:28 +020087 # http://images.mirantis.com/ubuntu-16-04-x64-latest.qcow2 (preffered)
88 # or
89 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
90 source_image: {{ os_env('MCP_IMAGE_PATH1604', os_env('IMAGE_PATH1604')) }}
Dennis Dmitrievf00a3842018-01-24 16:44:26 +020091 format: qcow2
92 - name: cfg01_day01_image # Pre-configured day01 image
93 source_image: {{ os_env('IMAGE_PATH_CFG01_DAY01', os_env('IMAGE_PATH1604')) }} # http://images.mirantis.com/cfg01-day01.qcow2 or fallback to IMAGE_PATH1604
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030094 format: qcow2
95
96 nodes:
97 - name: {{ HOSTNAME_CFG01 }}
98 role: salt_master
99 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300100 vcpu: !os_env SLAVE_NODE_CPU, 2
Dennis Dmitriev4a43e9a2017-11-10 13:08:40 +0200101 memory: !os_env SLAVE_NODE_MEMORY, 3072
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300102 boot:
103 - hd
104 cloud_init_volume_name: iso
105 cloud_init_iface_up: ens3
106 volumes:
107 - name: system
108 capacity: !os_env NODE_VOLUME_SIZE, 150
Dennis Dmitrievf00a3842018-01-24 16:44:26 +0200109 backing_store: cfg01_day01_image
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300110 format: qcow2
111 - name: iso # Volume with name 'iso' will be used
112 # for store image with cloud-init metadata.
113 capacity: 1
114 format: raw
115 device: cdrom
116 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300117 cloudinit_meta_data: *cloudinit_meta_data
118 cloudinit_user_data: *cloudinit_user_data_cfg01
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300119
120 interfaces:
121 - label: ens3
122 l2_network_device: admin
123 interface_model: *interface_model
124 - label: ens4
125 l2_network_device: private
126 interface_model: *interface_model
127 network_config:
128 ens3:
129 networks:
130 - admin
131 ens4:
132 networks:
133 - private
134
135 - name: {{ HOSTNAME_CTL01 }}
Victor Ryzhenkin66d39372017-09-28 19:25:48 +0400136 role: k8s_controller
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300137 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300138 vcpu: !os_env SLAVE_NODE_CPU, 2
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300139 memory: !os_env SLAVE_NODE_MEMORY, 4096
140 boot:
141 - hd
142 cloud_init_volume_name: iso
143 cloud_init_iface_up: ens3
144 volumes:
145 - name: system
146 capacity: !os_env NODE_VOLUME_SIZE, 150
147 backing_store: cloudimage1604
148 format: qcow2
149 - name: cinder
150 capacity: 50
151 format: qcow2
152 - name: iso # Volume with name 'iso' will be used
153 # for store image with cloud-init metadata.
154 capacity: 1
155 format: raw
156 device: cdrom
157 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300158 cloudinit_meta_data: *cloudinit_meta_data
159 cloudinit_user_data: *cloudinit_user_data_1604
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300160
161 interfaces: &interfaces
162 - label: ens3
163 l2_network_device: admin
164 interface_model: *interface_model
165 - label: ens4
166 l2_network_device: private
167 interface_model: *interface_model
168 network_config: &network_config
169 ens3:
170 networks:
171 - admin
172 ens4:
173 networks:
174 - private
175
176 - name: {{ HOSTNAME_CTL02 }}
177 role: salt_minion
178 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300179 vcpu: !os_env SLAVE_NODE_CPU, 2
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300180 memory: !os_env SLAVE_NODE_MEMORY, 4096
181 boot:
182 - hd
183 cloud_init_volume_name: iso
184 cloud_init_iface_up: ens3
185 volumes:
186 - name: system
187 capacity: !os_env NODE_VOLUME_SIZE, 150
188 backing_store: cloudimage1604
189 format: qcow2
190 - name: cinder
191 capacity: 50
192 format: qcow2
193 - name: iso # Volume with name 'iso' will be used
194 # for store image with cloud-init metadata.
195 capacity: 1
196 format: raw
197 device: cdrom
198 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300199 cloudinit_meta_data: *cloudinit_meta_data
200 cloudinit_user_data: *cloudinit_user_data_1604
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300201
202 interfaces: *interfaces
203 network_config: *network_config
204
205 - name: {{ HOSTNAME_CTL03 }}
206 role: salt_minion
207 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300208 vcpu: !os_env SLAVE_NODE_CPU, 2
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300209 memory: !os_env SLAVE_NODE_MEMORY, 4096
210 boot:
211 - hd
212 cloud_init_volume_name: iso
213 cloud_init_iface_up: ens3
214 volumes:
215 - name: system
216 capacity: !os_env NODE_VOLUME_SIZE, 150
217 backing_store: cloudimage1604
218 format: qcow2
219 - name: cinder
220 capacity: 50
221 format: qcow2
222 - name: iso # Volume with name 'iso' will be used
223 # for store image with cloud-init metadata.
224 capacity: 1
225 format: raw
226 device: cdrom
227 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300228 cloudinit_meta_data: *cloudinit_meta_data
229 cloudinit_user_data: *cloudinit_user_data_1604
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300230
231 interfaces: *interfaces
232 network_config: *network_config
233
234 - name: {{ HOSTNAME_CMP01 }}
235 role: salt_minion
236 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300237 vcpu: !os_env SLAVE_NODE_CPU, 3
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300238 memory: !os_env SLAVE_NODE_MEMORY, 2048
239 boot:
240 - hd
241 cloud_init_volume_name: iso
242 cloud_init_iface_up: ens3
243 volumes:
244 - name: system
245 capacity: !os_env NODE_VOLUME_SIZE, 150
246 backing_store: cloudimage1604
247 format: qcow2
248 - name: iso # Volume with name 'iso' will be used
249 # for store image with cloud-init metadata.
250 capacity: 1
251 format: raw
252 device: cdrom
253 bus: ide
Dennis Dmitriev80a01802017-08-11 09:49:37 +0300254 cloudinit_meta_data: *cloudinit_meta_data
255 cloudinit_user_data: *cloudinit_user_data_1604
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300256
257 interfaces: &all_interfaces
258 - label: ens3
259 l2_network_device: admin
260 interface_model: *interface_model
261 - label: ens4
262 l2_network_device: private
263 interface_model: *interface_model
264 network_config: &all_network_config
265 ens3:
266 networks:
267 - admin
268 ens4:
269 networks:
270 - private