blob: ac1bd952d8ec6cbbdd7e7637557f1daa63a5d210 [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.
89 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
90 # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2
91 format: qcow2
92
93 nodes:
94 - name: {{ HOSTNAME_CFG01 }}
95 role: salt_master
96 params:
97 vcpu: !os_env SLAVE_NODE_CPU, 2
98 memory: !os_env SLAVE_NODE_MEMORY, 4096
99 boot:
100 - hd
101 cloud_init_volume_name: iso
102 cloud_init_iface_up: ens3
103 volumes:
104 - name: system
105 capacity: !os_env NODE_VOLUME_SIZE, 150
106 backing_store: cloudimage1604
107 format: qcow2
108 - name: iso # Volume with name 'iso' will be used
109 # for store image with cloud-init metadata.
110 capacity: 1
111 format: raw
112 device: cdrom
113 bus: ide
114 cloudinit_meta_data: *cloudinit_meta_data
115 cloudinit_user_data: *cloudinit_user_data_cfg01
116
117 interfaces:
118 - label: ens3
119 l2_network_device: admin
120 interface_model: *interface_model
121 - label: ens4
122 l2_network_device: private
123 interface_model: *interface_model
124 network_config:
125 ens3:
126 networks:
127 - admin
128 ens4:
129 networks:
130 - private
131
132 - name: {{ HOSTNAME_CTL01 }}
133 role: k8s_controller
134 params:
135 vcpu: !os_env SLAVE_NODE_CPU, 2
136 memory: !os_env SLAVE_NODE_MEMORY, 4096
137 boot:
138 - hd
139 cloud_init_volume_name: iso
140 cloud_init_iface_up: ens3
141 volumes:
142 - name: system
143 capacity: !os_env NODE_VOLUME_SIZE, 150
144 backing_store: cloudimage1604
145 format: qcow2
146 - name: cinder
147 capacity: 50
148 format: qcow2
149 - name: iso # Volume with name 'iso' will be used
150 # for store image with cloud-init metadata.
151 capacity: 1
152 format: raw
153 device: cdrom
154 bus: ide
155 cloudinit_meta_data: *cloudinit_meta_data
156 cloudinit_user_data: *cloudinit_user_data_1604
157
158 interfaces: &interfaces
159 - label: ens3
160 l2_network_device: admin
161 interface_model: *interface_model
162 - label: ens4
163 l2_network_device: private
164 interface_model: *interface_model
165 network_config: &network_config
166 ens3:
167 networks:
168 - admin
169 ens4:
170 networks:
171 - private
172
173 - name: {{ HOSTNAME_CTL02 }}
174 role: salt_minion
175 params:
176 vcpu: !os_env SLAVE_NODE_CPU, 2
177 memory: !os_env SLAVE_NODE_MEMORY, 4096
178 boot:
179 - hd
180 cloud_init_volume_name: iso
181 cloud_init_iface_up: ens3
182 volumes:
183 - name: system
184 capacity: !os_env NODE_VOLUME_SIZE, 150
185 backing_store: cloudimage1604
186 format: qcow2
187 - name: cinder
188 capacity: 50
189 format: qcow2
190 - name: iso # Volume with name 'iso' will be used
191 # for store image with cloud-init metadata.
192 capacity: 1
193 format: raw
194 device: cdrom
195 bus: ide
196 cloudinit_meta_data: *cloudinit_meta_data
197 cloudinit_user_data: *cloudinit_user_data_1604
198
199 interfaces: *interfaces
200 network_config: *network_config
201
202 - name: {{ HOSTNAME_CTL03 }}
203 role: salt_minion
204 params:
205 vcpu: !os_env SLAVE_NODE_CPU, 2
206 memory: !os_env SLAVE_NODE_MEMORY, 4096
207 boot:
208 - hd
209 cloud_init_volume_name: iso
210 cloud_init_iface_up: ens3
211 volumes:
212 - name: system
213 capacity: !os_env NODE_VOLUME_SIZE, 150
214 backing_store: cloudimage1604
215 format: qcow2
216 - name: cinder
217 capacity: 50
218 format: qcow2
219 - name: iso # Volume with name 'iso' will be used
220 # for store image with cloud-init metadata.
221 capacity: 1
222 format: raw
223 device: cdrom
224 bus: ide
225 cloudinit_meta_data: *cloudinit_meta_data
226 cloudinit_user_data: *cloudinit_user_data_1604
227
228 interfaces: *interfaces
229 network_config: *network_config
230
231 - name: {{ HOSTNAME_CMP01 }}
232 role: salt_minion
233 params:
234 vcpu: !os_env SLAVE_NODE_CPU, 3
235 memory: !os_env SLAVE_NODE_MEMORY, 4096
236 boot:
237 - hd
238 cloud_init_volume_name: iso
239 cloud_init_iface_up: ens3
240 volumes:
241 - name: system
242 capacity: !os_env NODE_VOLUME_SIZE, 150
243 backing_store: cloudimage1604
244 format: qcow2
245 - name: iso # Volume with name 'iso' will be used
246 # for store image with cloud-init metadata.
247 capacity: 1
248 format: raw
249 device: cdrom
250 bus: ide
251 cloudinit_meta_data: *cloudinit_meta_data
252 cloudinit_user_data: *cloudinit_user_data_1604
253
254 interfaces: &all_interfaces
255 - label: ens3
256 l2_network_device: admin
257 interface_model: *interface_model
258 - label: ens4
259 l2_network_device: private
260 interface_model: *interface_model
261 network_config: &all_network_config
262 ens3:
263 networks:
264 - admin
265 ens4:
266 networks:
267 - private
268
269 - name: {{ HOSTNAME_CMP02 }}
270 role: salt_minion
271 params:
272 vcpu: !os_env SLAVE_NODE_CPU, 3
273 memory: !os_env SLAVE_NODE_MEMORY, 4096
274 boot:
275 - hd
276 cloud_init_volume_name: iso
277 cloud_init_iface_up: ens3
278 volumes:
279 - name: system
280 capacity: !os_env NODE_VOLUME_SIZE, 150
281 backing_store: cloudimage1604
282 format: qcow2
283 - name: iso # Volume with name 'iso' will be used
284 # for store image with cloud-init metadata.
285 capacity: 1
286 format: raw
287 device: cdrom
288 bus: ide
289 cloudinit_meta_data: *cloudinit_meta_data
290 cloudinit_user_data: *cloudinit_user_data_1604
291
292 interfaces: *interfaces
293 network_config: *network_config