blob: c3e5a34c88bb72347c4b98ae7525f0a10dc49f6e [file] [log] [blame]
Tatyana Leontovichbb6d1a72017-05-17 14:10:38 +03001# Set the repository suite, one of the: 'nightly', 'testing', 'stable', or any other required
2{% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'stable') %}
3
4{% import 'virtual-mcp11-k8s-contrail/underlay--meta-data.yaml' as CLOUDINIT_META_DATA with context %}
5{% import 'virtual-mcp11-k8s-contrail/underlay--user-data-cfg01.yaml' as CLOUDINIT_USER_DATA_CFG01 with context %}
6{% import 'virtual-mcp11-k8s-contrail/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 DOMAIN_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp11-k8s-contrail') + '.local' %}
16{% set HOSTNAME_CFG01 = os_env('HOSTNAME_CFG01', 'cfg01.' + DOMAIN_NAME) %}
17{% set HOSTNAME_CTL01 = os_env('HOSTNAME_CTL01', 'ctl01.' + DOMAIN_NAME) %}
18{% set HOSTNAME_CTL02 = os_env('HOSTNAME_CTL02', 'ctl02.' + DOMAIN_NAME) %}
19{% set HOSTNAME_CTL03 = os_env('HOSTNAME_CTL03', 'ctl03.' + DOMAIN_NAME) %}
20{% set HOSTNAME_CMP01 = os_env('HOSTNAME_CMP01', 'cmp01.' + DOMAIN_NAME) %}
21{% set HOSTNAME_CMP02 = os_env('HOSTNAME_CMP02', 'cmp02.' + DOMAIN_NAME) %}
22
23template:
24 devops_settings:
25 env_name: {{ os_env('ENV_NAME', 'virtual-mcp11-k8s-contrail_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }}
26
27 address_pools:
28 private-pool01:
29 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }}
30 params:
31 ip_reserved:
32 gateway: +1
33 l2_network_device: +1
34 default_{{ HOSTNAME_CFG01 }}: +100
35 default_{{ HOSTNAME_CTL01 }}: +107
36 default_{{ HOSTNAME_CTL02 }}: +108
37 default_{{ HOSTNAME_CTL03 }}: +109
38 default_{{ HOSTNAME_CMP01 }}: +105
39 default_{{ HOSTNAME_CMP02 }}: +106
40 ip_ranges:
41 dhcp: [+90, -10]
42
43 admin-pool01:
44 net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.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 }}: +107
51 default_{{ HOSTNAME_CTL02 }}: +108
52 default_{{ HOSTNAME_CTL03 }}: +109
53 default_{{ HOSTNAME_CMP01 }}: +105
54 default_{{ HOSTNAME_CMP02 }}: +106
55 ip_ranges:
56 dhcp: [+90, -10]
57
58 groups:
59 - name: default
60 driver:
61 name: devops.driver.libvirt
62 params:
63 connection_string: !os_env CONNECTION_STRING, qemu:///system
64 storage_pool_name: !os_env STORAGE_POOL_NAME, default
65 stp: False
66 hpet: False
67 enable_acpi: true
68 use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true
69
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.
87 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
88 # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2
89 format: qcow2
90
91 nodes:
92 - name: {{ HOSTNAME_CFG01 }}
93 role: salt_master
94 params:
95 vcpu: !os_env SLAVE_NODE_CPU, 4
96 memory: !os_env SLAVE_NODE_MEMORY, 2048
97 boot:
98 - hd
99 cloud_init_volume_name: iso
100 cloud_init_iface_up: ens3
101 volumes:
102 - name: system
103 capacity: !os_env NODE_VOLUME_SIZE, 150
104 backing_store: cloudimage1604
105 format: qcow2
106 - name: iso # Volume with name 'iso' will be used
107 # for store image with cloud-init metadata.
108 capacity: 1
109 format: raw
110 device: cdrom
111 bus: ide
112 cloudinit_meta_data: !include underlay--meta-data.yaml
113 cloudinit_user_data: !include underlay--user-data-cfg01.yaml
114
115 interfaces:
116 - label: ens3
117 l2_network_device: admin
118 interface_model: *interface_model
119 - label: ens4
120 l2_network_device: private
121 interface_model: *interface_model
122 network_config:
123 ens3:
124 networks:
125 - admin
126 ens4:
127 networks:
128 - private
129
130 - name: {{ HOSTNAME_CTL01 }}
131 role: salt_minion
132 params:
133 vcpu: !os_env SLAVE_NODE_CPU, 4
134 memory: !os_env SLAVE_NODE_MEMORY, 8192
135 boot:
136 - hd
137 cloud_init_volume_name: iso
138 cloud_init_iface_up: ens3
139 volumes:
140 - name: system
141 capacity: !os_env NODE_VOLUME_SIZE, 150
142 backing_store: cloudimage1604
143 format: qcow2
144 - name: cinder
145 capacity: 50
146 format: qcow2
147 - name: iso # Volume with name 'iso' will be used
148 # for store image with cloud-init metadata.
149 capacity: 1
150 format: raw
151 device: cdrom
152 bus: ide
153 cloudinit_meta_data: !include underlay--meta-data.yaml
154 cloudinit_user_data: !include underlay--user-data1604.yaml
155
156 interfaces: &interfaces
157 - label: ens3
158 l2_network_device: admin
159 interface_model: *interface_model
160 - label: ens4
161 l2_network_device: private
162 interface_model: *interface_model
163 network_config: &network_config
164 ens3:
165 networks:
166 - admin
167 ens4:
168 networks:
169 - private
170
171 - name: {{ HOSTNAME_CTL02 }}
172 role: salt_minion
173 params:
174 vcpu: !os_env SLAVE_NODE_CPU, 4
175 memory: !os_env SLAVE_NODE_MEMORY, 8192
176 boot:
177 - hd
178 cloud_init_volume_name: iso
179 cloud_init_iface_up: ens3
180 volumes:
181 - name: system
182 capacity: !os_env NODE_VOLUME_SIZE, 150
183 backing_store: cloudimage1604
184 format: qcow2
185 - name: cinder
186 capacity: 50
187 format: qcow2
188 - name: iso # Volume with name 'iso' will be used
189 # for store image with cloud-init metadata.
190 capacity: 1
191 format: raw
192 device: cdrom
193 bus: ide
194 cloudinit_meta_data: !include underlay--meta-data.yaml
195 cloudinit_user_data: !include underlay--user-data1604.yaml
196
197 interfaces: *interfaces
198 network_config: *network_config
199
200 - name: {{ HOSTNAME_CTL03 }}
201 role: salt_minion
202 params:
203 vcpu: !os_env SLAVE_NODE_CPU, 4
204 memory: !os_env SLAVE_NODE_MEMORY, 8192
205 boot:
206 - hd
207 cloud_init_volume_name: iso
208 cloud_init_iface_up: ens3
209 volumes:
210 - name: system
211 capacity: !os_env NODE_VOLUME_SIZE, 150
212 backing_store: cloudimage1604
213 format: qcow2
214 - name: cinder
215 capacity: 50
216 format: qcow2
217 - name: iso # Volume with name 'iso' will be used
218 # for store image with cloud-init metadata.
219 capacity: 1
220 format: raw
221 device: cdrom
222 bus: ide
223 cloudinit_meta_data: !include underlay--meta-data.yaml
224 cloudinit_user_data: !include underlay--user-data1604.yaml
225
226 interfaces: *interfaces
227 network_config: *network_config
228
229 - name: {{ HOSTNAME_CMP01 }}
230 role: salt_minion
231 params:
232 vcpu: !os_env SLAVE_NODE_CPU, 4
233 memory: !os_env SLAVE_NODE_MEMORY, 4096
234 boot:
235 - hd
236 cloud_init_volume_name: iso
237 cloud_init_iface_up: ens3
238 volumes:
239 - name: system
240 capacity: !os_env NODE_VOLUME_SIZE, 150
241 backing_store: cloudimage1604
242 format: qcow2
243 - name: iso # Volume with name 'iso' will be used
244 # for store image with cloud-init metadata.
245 capacity: 1
246 format: raw
247 device: cdrom
248 bus: ide
249 cloudinit_meta_data: !include underlay--meta-data.yaml
250 cloudinit_user_data: !include underlay--user-data1604.yaml
251
252
253 interfaces: &all_interfaces
254 - label: ens3
255 l2_network_device: admin
256 interface_model: *interface_model
257 - label: ens4
258 l2_network_device: private
259 interface_model: *interface_model
260 network_config: &all_network_config
261 ens3:
262 networks:
263 - admin
264 ens4:
265 networks:
266 - private
267
268 - name: {{ HOSTNAME_CMP02 }}
269 role: salt_minion
270 params:
271 vcpu: !os_env SLAVE_NODE_CPU, 4
272 memory: !os_env SLAVE_NODE_MEMORY, 4096
273 boot:
274 - hd
275 cloud_init_volume_name: iso
276 cloud_init_iface_up: ens3
277 volumes:
278 - name: system
279 capacity: !os_env NODE_VOLUME_SIZE, 150
280 backing_store: cloudimage1604
281 format: qcow2
282 - name: iso # Volume with name 'iso' will be used
283 # for store image with cloud-init metadata.
284 capacity: 1
285 format: raw
286 device: cdrom
287 bus: ide
288 cloudinit_meta_data: !include underlay--meta-data.yaml
289 cloudinit_user_data: !include underlay--user-data1604.yaml
290
291 interfaces: *all_interfaces
292 network_config: *all_network_config