blob: c9dcc7354af4c81719a9c162190bb441a4ec6eab [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
Dennis Dmitrievb3fc4242017-07-14 16:01:51 +030067 use_hugepages: !os_env DRIVER_USE_HUGEPAGES, false
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030068
69 network_pools:
70 admin: admin-pool01
71 private: private-pool01
72
73 l2_network_devices:
74 private:
75 address_pool: private-pool01
76 dhcp: true
77
78 admin:
79 address_pool: admin-pool01
80 dhcp: true
81 forward:
82 mode: nat
83
84 group_volumes:
85 - name: cloudimage1604 # This name is used for 'backing_store' option for node volumes.
86 source_image: !os_env IMAGE_PATH1604 # https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img or
87 # http://apt.tcpcloud.eu/images/ubuntu-16-04-x64-201608231004.qcow2
88 format: qcow2
89
90 nodes:
91 - name: {{ HOSTNAME_CFG01 }}
92 role: salt_master
93 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +030094 vcpu: !os_env SLAVE_NODE_CPU, 2
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030095 memory: !os_env SLAVE_NODE_MEMORY, 1536
96 boot:
97 - hd
98 cloud_init_volume_name: iso
99 cloud_init_iface_up: ens3
100 volumes:
101 - name: system
102 capacity: !os_env NODE_VOLUME_SIZE, 150
103 backing_store: cloudimage1604
104 format: qcow2
105 - name: iso # Volume with name 'iso' will be used
106 # for store image with cloud-init metadata.
107 capacity: 1
108 format: raw
109 device: cdrom
110 bus: ide
111 cloudinit_meta_data: !include underlay--meta-data.yaml
112 cloudinit_user_data: !include underlay--user-data-cfg01.yaml
113
114 interfaces:
115 - label: ens3
116 l2_network_device: admin
117 interface_model: *interface_model
118 - label: ens4
119 l2_network_device: private
120 interface_model: *interface_model
121 network_config:
122 ens3:
123 networks:
124 - admin
125 ens4:
126 networks:
127 - private
128
129 - name: {{ HOSTNAME_CTL01 }}
130 role: salt_minion
131 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300132 vcpu: !os_env SLAVE_NODE_CPU, 2
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300133 memory: !os_env SLAVE_NODE_MEMORY, 4096
134 boot:
135 - hd
136 cloud_init_volume_name: iso
137 cloud_init_iface_up: ens3
138 volumes:
139 - name: system
140 capacity: !os_env NODE_VOLUME_SIZE, 150
141 backing_store: cloudimage1604
142 format: qcow2
143 - name: cinder
144 capacity: 50
145 format: qcow2
146 - name: iso # Volume with name 'iso' will be used
147 # for store image with cloud-init metadata.
148 capacity: 1
149 format: raw
150 device: cdrom
151 bus: ide
152 cloudinit_meta_data: !include underlay--meta-data.yaml
153 cloudinit_user_data: !include underlay--user-data1604.yaml
154
155 interfaces: &interfaces
156 - label: ens3
157 l2_network_device: admin
158 interface_model: *interface_model
159 - label: ens4
160 l2_network_device: private
161 interface_model: *interface_model
162 network_config: &network_config
163 ens3:
164 networks:
165 - admin
166 ens4:
167 networks:
168 - private
169
170 - name: {{ HOSTNAME_CTL02 }}
171 role: salt_minion
172 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300173 vcpu: !os_env SLAVE_NODE_CPU, 2
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300174 memory: !os_env SLAVE_NODE_MEMORY, 4096
175 boot:
176 - hd
177 cloud_init_volume_name: iso
178 cloud_init_iface_up: ens3
179 volumes:
180 - name: system
181 capacity: !os_env NODE_VOLUME_SIZE, 150
182 backing_store: cloudimage1604
183 format: qcow2
184 - name: cinder
185 capacity: 50
186 format: qcow2
187 - name: iso # Volume with name 'iso' will be used
188 # for store image with cloud-init metadata.
189 capacity: 1
190 format: raw
191 device: cdrom
192 bus: ide
193 cloudinit_meta_data: !include underlay--meta-data.yaml
194 cloudinit_user_data: !include underlay--user-data1604.yaml
195
196 interfaces: *interfaces
197 network_config: *network_config
198
199 - name: {{ HOSTNAME_CTL03 }}
200 role: salt_minion
201 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300202 vcpu: !os_env SLAVE_NODE_CPU, 2
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300203 memory: !os_env SLAVE_NODE_MEMORY, 4096
204 boot:
205 - hd
206 cloud_init_volume_name: iso
207 cloud_init_iface_up: ens3
208 volumes:
209 - name: system
210 capacity: !os_env NODE_VOLUME_SIZE, 150
211 backing_store: cloudimage1604
212 format: qcow2
213 - name: cinder
214 capacity: 50
215 format: qcow2
216 - name: iso # Volume with name 'iso' will be used
217 # for store image with cloud-init metadata.
218 capacity: 1
219 format: raw
220 device: cdrom
221 bus: ide
222 cloudinit_meta_data: !include underlay--meta-data.yaml
223 cloudinit_user_data: !include underlay--user-data1604.yaml
224
225 interfaces: *interfaces
226 network_config: *network_config
227
228 - name: {{ HOSTNAME_CMP01 }}
229 role: salt_minion
230 params:
Dennis Dmitriev5b0e5f32017-07-22 11:30:26 +0300231 vcpu: !os_env SLAVE_NODE_CPU, 3
Artem Panchenkoedf70ef2017-06-13 09:14:34 +0300232 memory: !os_env SLAVE_NODE_MEMORY, 2048
233 boot:
234 - hd
235 cloud_init_volume_name: iso
236 cloud_init_iface_up: ens3
237 volumes:
238 - name: system
239 capacity: !os_env NODE_VOLUME_SIZE, 150
240 backing_store: cloudimage1604
241 format: qcow2
242 - name: iso # Volume with name 'iso' will be used
243 # for store image with cloud-init metadata.
244 capacity: 1
245 format: raw
246 device: cdrom
247 bus: ide
248 cloudinit_meta_data: !include underlay--meta-data.yaml
249 cloudinit_user_data: !include underlay--user-data1604.yaml
250
251 interfaces: &all_interfaces
252 - label: ens3
253 l2_network_device: admin
254 interface_model: *interface_model
255 - label: ens4
256 l2_network_device: private
257 interface_model: *interface_model
258 network_config: &all_network_config
259 ens3:
260 networks:
261 - admin
262 ens4:
263 networks:
264 - private