blob: eef7bb88c38e64347fda4d3dec8fc65c669abdb9 [file] [log] [blame]
Victor Ryzhenkin42e24232017-11-15 08:01:20 -04001# Set the repository suite, one of the: 'nightly', 'testing', 'stable', or any other required
2{% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %}
3
4{% import 'k8s-ha-calico/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
5{% import 'k8s-ha-calico/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
6{% import 'k8s-ha-calico/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
15{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME', 'k8s-ha-calico.local') %}
16{% set DOMAIN_NAME = os_env('DOMAIN_NAME', LAB_CONFIG_NAME) + '.local' %}
17{% 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', 'cmp0.' + DOMAIN_NAME) %}
22{% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp1.' + DOMAIN_NAME) %}
23
24template:
25 devops_settings:
26 env_name: {{ os_env('ENV_NAME', 'k8s-ha-calico_' + 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
35 default_{{ HOSTNAME_CFG01 }}: +90
36 default_{{ HOSTNAME_CTL01 }}: +101
37 default_{{ HOSTNAME_CTL02 }}: +102
38 default_{{ HOSTNAME_CTL03 }}: +103
39 default_{{ HOSTNAME_CMP01 }}: +105
40 default_{{ HOSTNAME_CMP02 }}: +106
41 ip_ranges:
42 dhcp: [+90, -10]
43
44 private-pool01:
45 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }}
46 params:
47 ip_reserved:
48 gateway: +1
49 l2_network_device: +1
50 default_{{ HOSTNAME_CFG01 }}: +100
51 default_{{ HOSTNAME_CTL01 }}: +101
52 default_{{ HOSTNAME_CTL02 }}: +102
53 default_{{ HOSTNAME_CTL03 }}: +103
54 default_{{ HOSTNAME_CMP01 }}: +105
55 default_{{ HOSTNAME_CMP02 }}: +106
56 ip_ranges:
57 dhcp: [+90, -10]
58
59 groups:
60 - name: default
61 driver:
62 name: devops.driver.libvirt
63 params:
64 connection_string: !os_env CONNECTION_STRING, qemu:///system
65 storage_pool_name: !os_env STORAGE_POOL_NAME, default
66 stp: False
67 hpet: False
68 enable_acpi: true
69 use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true
70 use_hugepages: !os_env DRIVER_USE_HUGEPAGES, false
71
72 network_pools:
73 admin: admin-pool01
74 private: private-pool01
75
76 l2_network_devices:
77 private:
78 address_pool: private-pool01
79 dhcp: true
80
81 admin:
82 address_pool: admin-pool01
83 dhcp: true
84 forward:
85 mode: nat
86
87 group_volumes:
88 - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes.
Dennis Dmitrievf00a3842018-01-24 16:44:26 +020089 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
90 format: qcow2
91 - name: cfg01_day01_image # Pre-configured day01 image
92 source_image: {{ os_env('IMAGE_PATH_CFG01_DAY01', os_env('IMAGE_PATH1604')) }} # http://images.mirantis.com/cfg01-day01.qcow2 or fallback to IMAGE_PATH1604
Victor Ryzhenkin42e24232017-11-15 08:01:20 -040093 format: qcow2
94
95 nodes:
96 - name: {{ HOSTNAME_CFG01 }}
97 role: salt_master
98 params:
99 vcpu: !os_env SLAVE_NODE_CPU, 2
100 memory: !os_env SLAVE_NODE_MEMORY, 4096
101 boot:
102 - hd
103 cloud_init_volume_name: iso
104 cloud_init_iface_up: ens3
105 volumes:
106 - name: system
107 capacity: !os_env NODE_VOLUME_SIZE, 150
Dennis Dmitrievf00a3842018-01-24 16:44:26 +0200108 backing_store: cfg01_day01_image
Victor Ryzhenkin42e24232017-11-15 08:01:20 -0400109 format: qcow2
110 - name: iso # Volume with name 'iso' will be used
111 # for store image with cloud-init metadata.
112 capacity: 1
113 format: raw
114 device: cdrom
115 bus: ide
116 cloudinit_meta_data: *cloudinit_meta_data
117 cloudinit_user_data: *cloudinit_user_data_cfg01
118
119 interfaces:
120 - label: ens3
121 l2_network_device: admin
122 interface_model: *interface_model
123 - label: ens4
124 l2_network_device: private
125 interface_model: *interface_model
126 network_config:
127 ens3:
128 networks:
129 - admin
130 ens4:
131 networks:
132 - private
133
134 - name: {{ HOSTNAME_CTL01 }}
135 role: k8s_controller
136 params:
137 vcpu: !os_env SLAVE_NODE_CPU, 2
138 memory: !os_env SLAVE_NODE_MEMORY, 4096
139 boot:
140 - hd
141 cloud_init_volume_name: iso
142 cloud_init_iface_up: ens3
143 volumes:
144 - name: system
145 capacity: !os_env NODE_VOLUME_SIZE, 150
146 backing_store: cloudimage1604
147 format: qcow2
148 - name: cinder
149 capacity: 50
150 format: qcow2
151 - name: iso # Volume with name 'iso' will be used
152 # for store image with cloud-init metadata.
153 capacity: 1
154 format: raw
155 device: cdrom
156 bus: ide
157 cloudinit_meta_data: *cloudinit_meta_data
158 cloudinit_user_data: *cloudinit_user_data_1604
159
160 interfaces: &interfaces
161 - label: ens3
162 l2_network_device: admin
163 interface_model: *interface_model
164 - label: ens4
165 l2_network_device: private
166 interface_model: *interface_model
167 network_config: &network_config
168 ens3:
169 networks:
170 - admin
171 ens4:
172 networks:
173 - private
174
175 - name: {{ HOSTNAME_CTL02 }}
176 role: salt_minion
177 params:
178 vcpu: !os_env SLAVE_NODE_CPU, 2
179 memory: !os_env SLAVE_NODE_MEMORY, 4096
180 boot:
181 - hd
182 cloud_init_volume_name: iso
183 cloud_init_iface_up: ens3
184 volumes:
185 - name: system
186 capacity: !os_env NODE_VOLUME_SIZE, 150
187 backing_store: cloudimage1604
188 format: qcow2
189 - name: cinder
190 capacity: 50
191 format: qcow2
192 - name: iso # Volume with name 'iso' will be used
193 # for store image with cloud-init metadata.
194 capacity: 1
195 format: raw
196 device: cdrom
197 bus: ide
198 cloudinit_meta_data: *cloudinit_meta_data
199 cloudinit_user_data: *cloudinit_user_data_1604
200
201 interfaces: *interfaces
202 network_config: *network_config
203
204 - name: {{ HOSTNAME_CTL03 }}
205 role: salt_minion
206 params:
207 vcpu: !os_env SLAVE_NODE_CPU, 2
208 memory: !os_env SLAVE_NODE_MEMORY, 4096
209 boot:
210 - hd
211 cloud_init_volume_name: iso
212 cloud_init_iface_up: ens3
213 volumes:
214 - name: system
215 capacity: !os_env NODE_VOLUME_SIZE, 150
216 backing_store: cloudimage1604
217 format: qcow2
218 - name: cinder
219 capacity: 50
220 format: qcow2
221 - name: iso # Volume with name 'iso' will be used
222 # for store image with cloud-init metadata.
223 capacity: 1
224 format: raw
225 device: cdrom
226 bus: ide
227 cloudinit_meta_data: *cloudinit_meta_data
228 cloudinit_user_data: *cloudinit_user_data_1604
229
230 interfaces: *interfaces
231 network_config: *network_config
232
233 - name: {{ HOSTNAME_CMP01 }}
234 role: salt_minion
235 params:
236 vcpu: !os_env SLAVE_NODE_CPU, 3
237 memory: !os_env SLAVE_NODE_MEMORY, 4096
238 boot:
239 - hd
240 cloud_init_volume_name: iso
241 cloud_init_iface_up: ens3
242 volumes:
243 - name: system
244 capacity: !os_env NODE_VOLUME_SIZE, 150
245 backing_store: cloudimage1604
246 format: qcow2
247 - name: iso # Volume with name 'iso' will be used
248 # for store image with cloud-init metadata.
249 capacity: 1
250 format: raw
251 device: cdrom
252 bus: ide
253 cloudinit_meta_data: *cloudinit_meta_data
254 cloudinit_user_data: *cloudinit_user_data_1604
255
256 interfaces: &all_interfaces
257 - label: ens3
258 l2_network_device: admin
259 interface_model: *interface_model
260 - label: ens4
261 l2_network_device: private
262 interface_model: *interface_model
263 network_config: &all_network_config
264 ens3:
265 networks:
266 - admin
267 ens4:
268 networks:
269 - private
270
271 - name: {{ HOSTNAME_CMP02 }}
272 role: salt_minion
273 params:
274 vcpu: !os_env SLAVE_NODE_CPU, 3
275 memory: !os_env SLAVE_NODE_MEMORY, 4096
276 boot:
277 - hd
278 cloud_init_volume_name: iso
279 cloud_init_iface_up: ens3
280 volumes:
281 - name: system
282 capacity: !os_env NODE_VOLUME_SIZE, 150
283 backing_store: cloudimage1604
284 format: qcow2
285 - name: iso # Volume with name 'iso' will be used
286 # for store image with cloud-init metadata.
287 capacity: 1
288 format: raw
289 device: cdrom
290 bus: ide
291 cloudinit_meta_data: *cloudinit_meta_data
292 cloudinit_user_data: *cloudinit_user_data_1604
293
294 interfaces: *interfaces
295 network_config: *network_config