blob: 3ec26d2029037e4ceb4fa6c437a9e2ef788869e4 [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
2{% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'stable') %}
3
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
15{% set DOMAIN_NAME = os_env('LAB_CONFIG_NAME', 'virtual-mcp11-k8s-calico-minimal.local') + '.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
22
23template:
24 devops_settings:
25 env_name: {{ os_env('ENV_NAME', 'virtual-mcp11-k8s-calico-minimal_' + REPOSITORY_SUITE + "_" + os_env('BUILD_NUMBER', '')) }}
26
27 address_pools:
28 admin-pool01:
29 net: {{ os_env('ADMIN_ADDRESS_POOL01', '10.70.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 }}: +101
36 default_{{ HOSTNAME_CTL02 }}: +102
37 default_{{ HOSTNAME_CTL03 }}: +103
38 default_{{ HOSTNAME_CMP01 }}: +105
39 ip_ranges:
40 dhcp: [+90, -10]
41
42 private-pool01:
43 net: {{ os_env('PRIVATE_ADDRESS_POOL01', '10.60.0.0/16:24') }}
44 params:
45 ip_reserved:
46 gateway: +1
47 l2_network_device: +1
48 default_{{ HOSTNAME_CFG01 }}: +100
49 default_{{ HOSTNAME_CTL01 }}: +101
50 default_{{ HOSTNAME_CTL02 }}: +102
51 default_{{ HOSTNAME_CTL03 }}: +103
52 default_{{ HOSTNAME_CMP01 }}: +105
53 ip_ranges:
54 dhcp: [+90, -10]
55
56 groups:
57 - name: default
58 driver:
59 name: devops.driver.libvirt
60 params:
61 connection_string: !os_env CONNECTION_STRING, qemu:///system
62 storage_pool_name: !os_env STORAGE_POOL_NAME, default
63 stp: False
64 hpet: False
65 enable_acpi: true
66 use_host_cpu: !os_env DRIVER_USE_HOST_CPU, true
67
68 network_pools:
69 admin: admin-pool01
70 private: private-pool01
71
72 l2_network_devices:
73 private:
74 address_pool: private-pool01
75 dhcp: true
76
77 admin:
78 address_pool: admin-pool01
79 dhcp: true
80 forward:
81 mode: nat
82
83 group_volumes:
84 - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes.
85 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
86 # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2
87 format: qcow2
88
89 nodes:
90 - name: {{ HOSTNAME_CFG01 }}
91 role: salt_master
92 params:
93 vcpu: !os_env SLAVE_NODE_CPU, 4
94 memory: !os_env SLAVE_NODE_MEMORY, 1536
95 boot:
96 - hd
97 cloud_init_volume_name: iso
98 cloud_init_iface_up: ens3
99 volumes:
100 - name: system
101 capacity: !os_env NODE_VOLUME_SIZE, 150
102 backing_store: cloudimage1604
103 format: qcow2
104 - name: iso # Volume with name 'iso' will be used
105 # for store image with cloud-init metadata.
106 capacity: 1
107 format: raw
108 device: cdrom
109 bus: ide
110 cloudinit_meta_data: !include underlay--meta-data.yaml
111 cloudinit_user_data: !include underlay--user-data-cfg01.yaml
112
113 interfaces:
114 - label: ens3
115 l2_network_device: admin
116 interface_model: *interface_model
117 - label: ens4
118 l2_network_device: private
119 interface_model: *interface_model
120 network_config:
121 ens3:
122 networks:
123 - admin
124 ens4:
125 networks:
126 - private
127
128 - name: {{ HOSTNAME_CTL01 }}
129 role: salt_minion
130 params:
131 vcpu: !os_env SLAVE_NODE_CPU, 4
132 memory: !os_env SLAVE_NODE_MEMORY, 4096
133 boot:
134 - hd
135 cloud_init_volume_name: iso
136 cloud_init_iface_up: ens3
137 volumes:
138 - name: system
139 capacity: !os_env NODE_VOLUME_SIZE, 150
140 backing_store: cloudimage1604
141 format: qcow2
142 - name: cinder
143 capacity: 50
144 format: qcow2
145 - name: iso # Volume with name 'iso' will be used
146 # for store image with cloud-init metadata.
147 capacity: 1
148 format: raw
149 device: cdrom
150 bus: ide
151 cloudinit_meta_data: !include underlay--meta-data.yaml
152 cloudinit_user_data: !include underlay--user-data1604.yaml
153
154 interfaces: &interfaces
155 - label: ens3
156 l2_network_device: admin
157 interface_model: *interface_model
158 - label: ens4
159 l2_network_device: private
160 interface_model: *interface_model
161 network_config: &network_config
162 ens3:
163 networks:
164 - admin
165 ens4:
166 networks:
167 - private
168
169 - name: {{ HOSTNAME_CTL02 }}
170 role: salt_minion
171 params:
172 vcpu: !os_env SLAVE_NODE_CPU, 4
173 memory: !os_env SLAVE_NODE_MEMORY, 4096
174 boot:
175 - hd
176 cloud_init_volume_name: iso
177 cloud_init_iface_up: ens3
178 volumes:
179 - name: system
180 capacity: !os_env NODE_VOLUME_SIZE, 150
181 backing_store: cloudimage1604
182 format: qcow2
183 - name: cinder
184 capacity: 50
185 format: qcow2
186 - name: iso # Volume with name 'iso' will be used
187 # for store image with cloud-init metadata.
188 capacity: 1
189 format: raw
190 device: cdrom
191 bus: ide
192 cloudinit_meta_data: !include underlay--meta-data.yaml
193 cloudinit_user_data: !include underlay--user-data1604.yaml
194
195 interfaces: *interfaces
196 network_config: *network_config
197
198 - name: {{ HOSTNAME_CTL03 }}
199 role: salt_minion
200 params:
201 vcpu: !os_env SLAVE_NODE_CPU, 4
202 memory: !os_env SLAVE_NODE_MEMORY, 4096
203 boot:
204 - hd
205 cloud_init_volume_name: iso
206 cloud_init_iface_up: ens3
207 volumes:
208 - name: system
209 capacity: !os_env NODE_VOLUME_SIZE, 150
210 backing_store: cloudimage1604
211 format: qcow2
212 - name: cinder
213 capacity: 50
214 format: qcow2
215 - name: iso # Volume with name 'iso' will be used
216 # for store image with cloud-init metadata.
217 capacity: 1
218 format: raw
219 device: cdrom
220 bus: ide
221 cloudinit_meta_data: !include underlay--meta-data.yaml
222 cloudinit_user_data: !include underlay--user-data1604.yaml
223
224 interfaces: *interfaces
225 network_config: *network_config
226
227 - name: {{ HOSTNAME_CMP01 }}
228 role: salt_minion
229 params:
230 vcpu: !os_env SLAVE_NODE_CPU, 4
231 memory: !os_env SLAVE_NODE_MEMORY, 2048
232 boot:
233 - hd
234 cloud_init_volume_name: iso
235 cloud_init_iface_up: ens3
236 volumes:
237 - name: system
238 capacity: !os_env NODE_VOLUME_SIZE, 150
239 backing_store: cloudimage1604
240 format: qcow2
241 - name: iso # Volume with name 'iso' will be used
242 # for store image with cloud-init metadata.
243 capacity: 1
244 format: raw
245 device: cdrom
246 bus: ide
247 cloudinit_meta_data: !include underlay--meta-data.yaml
248 cloudinit_user_data: !include underlay--user-data1604.yaml
249
250 interfaces: &all_interfaces
251 - label: ens3
252 l2_network_device: admin
253 interface_model: *interface_model
254 - label: ens4
255 l2_network_device: private
256 interface_model: *interface_model
257 network_config: &all_network_config
258 ens3:
259 networks:
260 - admin
261 ens4:
262 networks:
263 - private