blob: deb615801d4db615f0fd1d0e19c03783b8ff78dc [file] [log] [blame]
sgudza133b8e2019-05-10 14:32:08 +03001---
2
3heat_template_version: queens
4
5description: MCP environment for heat-cicd-k8s-calico-sl
6
7parameters:
8 instance_domain:
9 type: string
10 default: heat-cicd-k8s-calico-sl.local
11 mcp_version:
12 type: string
13 env_name:
14 type: string
15 control_subnet_cidr:
16 type: string
17 management_subnet_cidr:
18 type: string
19 management_subnet_pool_start:
20 type: string
21 management_subnet_pool_end:
22 type: string
23 management_subnet_cfg01_ip:
24 type: string
25 management_subnet_gateway_ip:
26 type: string
27
28 key_pair:
29 type: string
30
31 ctl_flavor:
32 type: string
33 cfg_flavor:
34 type: string
35 cid_flavor:
36 type: string
37 kvm_fake_flavor:
38 type: string
39 mon_flavor:
40 type: string
41 log_flavor:
42 type: string
43 mtr_flavor:
44 type: string
45 cmp_flavor:
46 type: string
47 foundation_flavor:
48 type: string
49
50 net_public:
51 type: string
52
53resources:
54 networks:
55 type: MCP::Networks
56 properties:
57 stack_name: { get_param: "OS::stack_name" }
58 env_name: { get_param: env_name }
59
60 #flavors:
61 # type: MCP::Flavors
62
63 cfg01_node:
64 type: MCP::MasterNode
65 depends_on: [networks]
66 properties:
67 env_name: { get_param: env_name }
68 mcp_version: { get_param: mcp_version }
69 cfg01_flavor: { get_param: cfg_flavor }
70 instance_name: cfg01
71 instance_domain: {get_param: instance_domain}
72 network: { get_attr: [networks, network] }
73
74 control_cluster:
75 type: MCP::MultipleInstance
76 depends_on: [cfg01_node]
77 properties:
78 env_name: { get_param: env_name }
79 mcp_version: { get_param: mcp_version }
80 instance_domain: {get_param: instance_domain}
81 instance01_name: ctl01
82 instance02_name: ctl02
83 instance03_name: ctl03
84 instance01_role: k8s_controller
85 instance_flavor: {get_param: ctl_flavor}
86 network: { get_attr: [networks, network] }
87 underlay_userdata: { get_file: ./underlay-userdata.yaml }
88 instance01_control_net_static_ip:
89 list_join:
90 - '.'
91 - [ { get_attr: [networks, control_net_prefix] }, '11' ]
92 instance02_control_net_static_ip:
93 list_join:
94 - '.'
95 - [ { get_attr: [networks, control_net_prefix] }, '12' ]
96 instance03_control_net_static_ip:
97 list_join:
98 - '.'
99 - [ { get_attr: [networks, control_net_prefix] }, '13' ]
100
101 instance_config_host: { get_attr: [cfg01_node, instance_address] }
102
103 fake_kvm_cluster:
104 type: MCP::MultipleInstance
105 depends_on: [control_cluster]
106 properties:
107 env_name: { get_param: env_name }
108 mcp_version: { get_param: mcp_version }
109 instance_domain: {get_param: instance_domain}
110 instance01_name: kvm01
111 instance02_name: kvm02
112 instance03_name: kvm03
113 instance_flavor: {get_param: kvm_fake_flavor}
114 network: { get_attr: [networks, network] }
115 underlay_userdata: { get_file: ./underlay-userdata.yaml }
116 instance01_control_net_static_ip:
117 list_join:
118 - '.'
119 - [ { get_attr: [networks, control_net_prefix] }, '241' ]
120 instance02_control_net_static_ip:
121 list_join:
122 - '.'
123 - [ { get_attr: [networks, control_net_prefix] }, '242' ]
124 instance03_control_net_static_ip:
125 list_join:
126 - '.'
127 - [ { get_attr: [networks, control_net_prefix] }, '243' ]
128
129 instance_config_host: { get_attr: [cfg01_node, instance_address] }
130
131 cicd_cluster:
132 type: MCP::MultipleInstance
133 depends_on: [fake_kvm_cluster]
134 properties:
135 env_name: { get_param: env_name }
136 mcp_version: { get_param: mcp_version }
137 instance_domain: {get_param: instance_domain}
138 instance01_name: cid01
139 instance02_name: cid02
140 instance03_name: cid03
141 instance_flavor: {get_param: cid_flavor}
142 network: { get_attr: [networks, network] }
143 underlay_userdata: { get_file: ./underlay-userdata.yaml }
144 instance01_control_net_static_ip:
145 list_join:
146 - '.'
147 - [ { get_attr: [networks, control_net_prefix] }, '91' ]
148 instance02_control_net_static_ip:
149 list_join:
150 - '.'
151 - [ { get_attr: [networks, control_net_prefix] }, '92' ]
152 instance03_control_net_static_ip:
153 list_join:
154 - '.'
155 - [ { get_attr: [networks, control_net_prefix] }, '93' ]
156
157 instance_config_host: { get_attr: [cfg01_node, instance_address] }
158
159 stacklight_monitor_cluster:
160 type: MCP::MultipleInstance
161 depends_on: [cicd_cluster]
162 properties:
163 env_name: { get_param: env_name }
164 mcp_version: { get_param: mcp_version }
165 instance_domain: {get_param: instance_domain}
166 instance01_name: mon01
167 instance02_name: mon02
168 instance03_name: mon03
169 instance_flavor: {get_param: mon_flavor}
170 network: { get_attr: [networks, network] }
171 underlay_userdata: { get_file: ./underlay-userdata.yaml }
172 instance01_control_net_static_ip:
173 list_join:
174 - '.'
175 - [ { get_attr: [networks, control_net_prefix] }, '71' ]
176 instance02_control_net_static_ip:
177 list_join:
178 - '.'
179 - [ { get_attr: [networks, control_net_prefix] }, '72' ]
180 instance03_control_net_static_ip:
181 list_join:
182 - '.'
183 - [ { get_attr: [networks, control_net_prefix] }, '73' ]
184 instance_config_host: { get_attr: [cfg01_node, instance_address] }
185
186 stacklight_log_cluster:
187 type: MCP::MultipleInstance
188 depends_on: [stacklight_monitor_cluster]
189 properties:
190 env_name: { get_param: env_name }
191 mcp_version: { get_param: mcp_version }
192 instance_domain: {get_param: instance_domain}
193 instance01_name: log01
194 instance02_name: log02
195 instance03_name: log03
196 instance_flavor: {get_param: log_flavor}
197 network: { get_attr: [networks, network] }
198 underlay_userdata: { get_file: ./underlay-userdata.yaml }
199 instance01_control_net_static_ip:
200 list_join:
201 - '.'
202 - [ { get_attr: [networks, control_net_prefix] }, '61' ]
203 instance02_control_net_static_ip:
204 list_join:
205 - '.'
206 - [ { get_attr: [networks, control_net_prefix] }, '62' ]
207 instance03_control_net_static_ip:
208 list_join:
209 - '.'
210 - [ { get_attr: [networks, control_net_prefix] }, '63' ]
211 instance_config_host: { get_attr: [cfg01_node, instance_address] }
212
213 stacklight_mtr_cluster:
214 type: MCP::MultipleInstance
215 depends_on: [stacklight_log_cluster]
216 properties:
217 env_name: { get_param: env_name }
218 mcp_version: { get_param: mcp_version }
219 instance_domain: {get_param: instance_domain}
220 instance01_name: mtr01
221 instance02_name: mtr02
222 instance03_name: mtr03
223 instance_flavor: {get_param: mtr_flavor}
224 network: { get_attr: [networks, network] }
225 underlay_userdata: { get_file: ./underlay-userdata.yaml }
226 instance01_control_net_static_ip:
227 list_join:
228 - '.'
229 - [ { get_attr: [networks, control_net_prefix] }, '86' ]
230 instance02_control_net_static_ip:
231 list_join:
232 - '.'
233 - [ { get_attr: [networks, control_net_prefix] }, '87' ]
234 instance03_control_net_static_ip:
235 list_join:
236 - '.'
237 - [ { get_attr: [networks, control_net_prefix] }, '88' ]
238 instance_config_host: { get_attr: [cfg01_node, instance_address] }
239
240 prx01_virtual:
241 type: MCP::SingleInstance
242 depends_on: [stacklight_mtr_cluster]
243 properties:
244 env_name: { get_param: env_name }
245 mcp_version: { get_param: mcp_version }
246 instance_domain: {get_param: instance_domain}
247 instance_name: prx01
248 instance_flavor: {get_param: cid_flavor}
249 network: { get_attr: [networks, network] }
250 underlay_userdata: { get_file: ./underlay-userdata.yaml }
251 control_net_static_ip:
252 list_join:
253 - '.'
254 - [ { get_attr: [networks, control_net_prefix] }, '221' ]
255 instance_config_host: { get_attr: [cfg01_node, instance_address] }
256
257 prx02_virtual:
258 type: MCP::SingleInstance
259 depends_on: [prx01_virtual]
260 properties:
261 env_name: { get_param: env_name }
262 mcp_version: { get_param: mcp_version }
263 instance_domain: {get_param: instance_domain}
264 instance_name: prx02
265 instance_flavor: {get_param: cid_flavor}
266 network: { get_attr: [networks, network] }
267 underlay_userdata: { get_file: ./underlay-userdata.yaml }
268 control_net_static_ip:
269 list_join:
270 - '.'
271 - [ { get_attr: [networks, control_net_prefix] }, '222' ]
272 instance_config_host: { get_attr: [cfg01_node, instance_address] }
273
274 cmp001_virtual:
275 type: MCP::Compute
276 depends_on: [prx02_virtual]
277 properties:
278 env_name: { get_param: env_name }
279 mcp_version: { get_param: mcp_version }
280 instance_domain: {get_param: instance_domain}
281 instance_name: cmp001
282 instance_flavor: {get_param: cmp_flavor}
283 network: { get_attr: [networks, network] }
284 underlay_userdata: { get_file: ./underlay-userdata.yaml }
285 control_net_static_ip:
286 list_join:
287 - '.'
288 - [ { get_attr: [networks, control_net_prefix] }, '101' ]
289 instance_config_host: { get_attr: [cfg01_node, instance_address] }
290
291 cmp002_virtual:
292 type: MCP::Compute
293 depends_on: [cmp001_virtual]
294 properties:
295 env_name: { get_param: env_name }
296 mcp_version: { get_param: mcp_version }
297 instance_domain: {get_param: instance_domain}
298 instance_name: cmp002
299 instance_flavor: {get_param: cmp_flavor}
300 network: { get_attr: [networks, network] }
301 underlay_userdata: { get_file: ./underlay-userdata.yaml }
302 control_net_static_ip:
303 list_join:
304 - '.'
305 - [ { get_attr: [networks, control_net_prefix] }, '102' ]
306 instance_config_host: { get_attr: [cfg01_node, instance_address] }
307
308 cmp003_virtual:
309 type: MCP::Compute
310 depends_on: [cmp002_virtual]
311 properties:
312 env_name: { get_param: env_name }
313 mcp_version: { get_param: mcp_version }
314 instance_domain: {get_param: instance_domain}
315 instance_name: cmp003
316 instance_flavor: {get_param: cmp_flavor}
317 network: { get_attr: [networks, network] }
318 underlay_userdata: { get_file: ./underlay-userdata.yaml }
319 control_net_static_ip:
320 list_join:
321 - '.'
322 - [ { get_attr: [networks, control_net_prefix] }, '103' ]
323 instance_config_host: { get_attr: [cfg01_node, instance_address] }
324
325 cmp004_virtual:
326 type: MCP::Compute
327 depends_on: [cmp003_virtual]
328 properties:
329 env_name: { get_param: env_name }
330 mcp_version: { get_param: mcp_version }
331 instance_domain: {get_param: instance_domain}
332 instance_name: cmp004
333 instance_flavor: {get_param: cmp_flavor}
334 network: { get_attr: [networks, network] }
335 underlay_userdata: { get_file: ./underlay-userdata.yaml }
336 control_net_static_ip:
337 list_join:
338 - '.'
339 - [ { get_attr: [networks, control_net_prefix] }, '104' ]
340 instance_config_host: { get_attr: [cfg01_node, instance_address] }
341
342 foundation_node:
343 type: MCP::FoundationNode
344 depends_on: [networks]
345 properties:
346 env_name: { get_param: env_name }
347 mcp_version: { get_param: mcp_version }
348 instance_domain: {get_param: instance_domain}
349 instance_name: foundation
350 instance_flavor: {get_param: foundation_flavor}
351 network: { get_attr: [networks, network] }
352 underlay_userdata: { get_file: ./underlay--user-data-foundation.yaml }
353 control_net_static_ip:
354 list_join:
355 - '.'
356 - [ { get_attr: [networks, control_net_prefix] }, '5' ]
357 instance_config_host: { get_attr: [cfg01_node, instance_address] }
358
359outputs:
360
361 control_subnet_cidr:
362 description: Control network CIDR
363 value: { get_param: control_subnet_cidr }
364
365 management_subnet_cidr:
366 description: Admin network CIDR
367 value: { get_param: management_subnet_cidr }
368
369 foundation_floating:
370 description: foundation node IP address (floating) from external network
371 value:
372 get_attr:
373 - foundation_node
374 - instance_floating_address
375...