blob: c6287c6e469eb152fb77c05489ff56408126d51f [file] [log] [blame]
sgudzb8819722019-05-16 22:34:31 +03001---
2
3heat_template_version: queens
4
5description: MCP environment for heat-cicd-k8s-genie
6
7parameters:
8 instance_domain:
9 type: string
10 default: heat-cicd-k8s-genie.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
Dennis Dmitrievcba86122019-05-24 13:41:46 +030053 foundation_image:
54 type: string
55
sgudzb8819722019-05-16 22:34:31 +030056resources:
57 networks:
58 type: MCP::Networks
59 properties:
60 stack_name: { get_param: "OS::stack_name" }
61 env_name: { get_param: env_name }
62
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +030063 subnets:
64 depends_on: [networks]
65 type: MCP::Subnets
66 properties:
67 stack_name: { get_param: "OS::stack_name" }
68 env_name: { get_param: env_name }
69 management_net: { list_join: ['-', [ 'management_net', { get_param: env_name } ]] }
70 control_net: { list_join: ['-', [ 'control_net', { get_param: env_name } ]] }
71 tenant_net: { list_join: ['-', [ 'tenant_net', { get_param: env_name } ]] }
72 external_net: { list_join: ['-', [ 'external_net', { get_param: env_name } ]] }
73
sgudzb8819722019-05-16 22:34:31 +030074 #flavors:
75 # type: MCP::Flavors
76
77 cfg01_node:
78 type: MCP::MasterNode
79 depends_on: [networks]
80 properties:
81 env_name: { get_param: env_name }
82 mcp_version: { get_param: mcp_version }
83 cfg01_flavor: { get_param: cfg_flavor }
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +030084 management_net: { list_join: ['-', [ 'management_net', { get_param: env_name } ]] }
85 control_net: { list_join: ['-', [ 'control_net', { get_param: env_name } ]] }
86 tenant_net: { list_join: ['-', [ 'tenant_net', { get_param: env_name } ]] }
87 external_net: { list_join: ['-', [ 'external_net', { get_param: env_name } ]] }
sgudze6bff762019-05-23 18:15:49 +030088 tenant_net_static_ip:
89 list_join:
90 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +030091 - [ { get_attr: [subnets, tenant_net_prefix] }, '15' ]
sgudze6bff762019-05-23 18:15:49 +030092 external_net_static_ip:
93 list_join:
94 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +030095 - [ { get_attr: [subnets, external_net_prefix] }, '15' ]
sgudzb8819722019-05-16 22:34:31 +030096 instance_name: cfg01
97 instance_domain: {get_param: instance_domain}
sgudzb8819722019-05-16 22:34:31 +030098
99 control_cluster:
100 type: MCP::MultipleInstance
101 depends_on: [cfg01_node]
102 properties:
103 env_name: { get_param: env_name }
104 mcp_version: { get_param: mcp_version }
105 instance_domain: {get_param: instance_domain}
106 instance01_name: ctl01
107 instance02_name: ctl02
108 instance03_name: ctl03
109 instance01_role: [k8s_controller]
110 instance_flavor: {get_param: ctl_flavor}
sgudzb8819722019-05-16 22:34:31 +0300111 underlay_userdata: { get_file: ./underlay-userdata.yaml }
112 instance01_control_net_static_ip:
113 list_join:
114 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300115 - [ { get_attr: [subnets, control_net_prefix] }, '11' ]
sgudzb8819722019-05-16 22:34:31 +0300116 instance02_control_net_static_ip:
117 list_join:
118 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300119 - [ { get_attr: [subnets, control_net_prefix] }, '12' ]
sgudzb8819722019-05-16 22:34:31 +0300120 instance03_control_net_static_ip:
121 list_join:
122 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300123 - [ { get_attr: [subnets, control_net_prefix] }, '13' ]
sgudze6bff762019-05-23 18:15:49 +0300124 instance01_tenant_net_static_ip:
125 list_join:
126 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300127 - [ { get_attr: [subnets, tenant_net_prefix] }, '11' ]
sgudze6bff762019-05-23 18:15:49 +0300128 instance02_tenant_net_static_ip:
129 list_join:
130 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300131 - [ { get_attr: [subnets, tenant_net_prefix] }, '12' ]
sgudze6bff762019-05-23 18:15:49 +0300132 instance03_tenant_net_static_ip:
133 list_join:
134 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300135 - [ { get_attr: [subnets, tenant_net_prefix] }, '13' ]
sgudze6bff762019-05-23 18:15:49 +0300136 instance01_external_net_static_ip:
137 list_join:
138 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300139 - [ { get_attr: [subnets, external_net_prefix] }, '11' ]
sgudze6bff762019-05-23 18:15:49 +0300140 instance02_external_net_static_ip:
141 list_join:
142 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300143 - [ { get_attr: [subnets, external_net_prefix] }, '12' ]
sgudze6bff762019-05-23 18:15:49 +0300144 instance03_external_net_static_ip:
145 list_join:
146 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300147 - [ { get_attr: [subnets, external_net_prefix] }, '13' ]
sgudzb8819722019-05-16 22:34:31 +0300148
149 instance_config_host: { get_attr: [cfg01_node, instance_address] }
150
151 fake_kvm_cluster:
152 type: MCP::MultipleInstance
153 depends_on: [control_cluster]
154 properties:
155 env_name: { get_param: env_name }
156 mcp_version: { get_param: mcp_version }
157 instance_domain: {get_param: instance_domain}
158 instance01_name: kvm01
159 instance02_name: kvm02
160 instance03_name: kvm03
161 instance_flavor: {get_param: kvm_fake_flavor}
sgudzb8819722019-05-16 22:34:31 +0300162 underlay_userdata: { get_file: ./underlay-userdata.yaml }
163 instance01_control_net_static_ip:
164 list_join:
165 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300166 - [ { get_attr: [subnets, control_net_prefix] }, '241' ]
sgudzb8819722019-05-16 22:34:31 +0300167 instance02_control_net_static_ip:
168 list_join:
169 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300170 - [ { get_attr: [subnets, control_net_prefix] }, '242' ]
sgudzb8819722019-05-16 22:34:31 +0300171 instance03_control_net_static_ip:
172 list_join:
173 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300174 - [ { get_attr: [subnets, control_net_prefix] }, '243' ]
sgudze6bff762019-05-23 18:15:49 +0300175 instance01_tenant_net_static_ip:
176 list_join:
177 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300178 - [ { get_attr: [subnets, tenant_net_prefix] }, '241' ]
sgudze6bff762019-05-23 18:15:49 +0300179 instance02_tenant_net_static_ip:
180 list_join:
181 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300182 - [ { get_attr: [subnets, tenant_net_prefix] }, '242' ]
sgudze6bff762019-05-23 18:15:49 +0300183 instance03_tenant_net_static_ip:
184 list_join:
185 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300186 - [ { get_attr: [subnets, tenant_net_prefix] }, '243' ]
sgudze6bff762019-05-23 18:15:49 +0300187 instance01_external_net_static_ip:
188 list_join:
189 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300190 - [ { get_attr: [subnets, external_net_prefix] }, '241' ]
sgudze6bff762019-05-23 18:15:49 +0300191 instance02_external_net_static_ip:
192 list_join:
193 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300194 - [ { get_attr: [subnets, external_net_prefix] }, '242' ]
sgudze6bff762019-05-23 18:15:49 +0300195 instance03_external_net_static_ip:
196 list_join:
197 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300198 - [ { get_attr: [subnets, external_net_prefix] }, '243' ]
sgudzb8819722019-05-16 22:34:31 +0300199
200 instance_config_host: { get_attr: [cfg01_node, instance_address] }
201
202 cicd_cluster:
203 type: MCP::MultipleInstance
204 depends_on: [fake_kvm_cluster]
205 properties:
206 env_name: { get_param: env_name }
207 mcp_version: { get_param: mcp_version }
208 instance_domain: {get_param: instance_domain}
209 instance01_name: cid01
210 instance02_name: cid02
211 instance03_name: cid03
212 instance_flavor: {get_param: cid_flavor}
sgudzb8819722019-05-16 22:34:31 +0300213 underlay_userdata: { get_file: ./underlay-userdata.yaml }
214 instance01_control_net_static_ip:
215 list_join:
216 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300217 - [ { get_attr: [subnets, control_net_prefix] }, '91' ]
sgudzb8819722019-05-16 22:34:31 +0300218 instance02_control_net_static_ip:
219 list_join:
220 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300221 - [ { get_attr: [subnets, control_net_prefix] }, '92' ]
sgudzb8819722019-05-16 22:34:31 +0300222 instance03_control_net_static_ip:
223 list_join:
224 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300225 - [ { get_attr: [subnets, control_net_prefix] }, '93' ]
sgudze6bff762019-05-23 18:15:49 +0300226 instance01_tenant_net_static_ip:
227 list_join:
228 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300229 - [ { get_attr: [subnets, tenant_net_prefix] }, '91' ]
sgudze6bff762019-05-23 18:15:49 +0300230 instance02_tenant_net_static_ip:
231 list_join:
232 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300233 - [ { get_attr: [subnets, tenant_net_prefix] }, '92' ]
sgudze6bff762019-05-23 18:15:49 +0300234 instance03_tenant_net_static_ip:
235 list_join:
236 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300237 - [ { get_attr: [subnets, tenant_net_prefix] }, '93' ]
sgudze6bff762019-05-23 18:15:49 +0300238 instance01_external_net_static_ip:
239 list_join:
240 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300241 - [ { get_attr: [subnets, external_net_prefix] }, '91' ]
sgudze6bff762019-05-23 18:15:49 +0300242 instance02_external_net_static_ip:
243 list_join:
244 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300245 - [ { get_attr: [subnets, external_net_prefix] }, '92' ]
sgudze6bff762019-05-23 18:15:49 +0300246 instance03_external_net_static_ip:
247 list_join:
248 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300249 - [ { get_attr: [subnets, external_net_prefix] }, '93' ]
sgudzb8819722019-05-16 22:34:31 +0300250
251 instance_config_host: { get_attr: [cfg01_node, instance_address] }
252
253 prx01_virtual:
254 type: MCP::SingleInstance
255 depends_on: [cicd_cluster]
256 properties:
257 env_name: { get_param: env_name }
258 mcp_version: { get_param: mcp_version }
259 instance_domain: {get_param: instance_domain}
260 instance_name: prx01
261 instance_flavor: {get_param: cid_flavor}
sgudzb8819722019-05-16 22:34:31 +0300262 underlay_userdata: { get_file: ./underlay-userdata.yaml }
263 control_net_static_ip:
264 list_join:
265 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300266 - [ { get_attr: [subnets, control_net_prefix] }, '221' ]
sgudze6bff762019-05-23 18:15:49 +0300267 tenant_net_static_ip:
268 list_join:
269 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300270 - [ { get_attr: [subnets, tenant_net_prefix] }, '221' ]
sgudze6bff762019-05-23 18:15:49 +0300271 external_net_static_ip:
272 list_join:
273 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300274 - [ { get_attr: [subnets, external_net_prefix] }, '221' ]
sgudze6bff762019-05-23 18:15:49 +0300275
sgudzb8819722019-05-16 22:34:31 +0300276 instance_config_host: { get_attr: [cfg01_node, instance_address] }
277
278 prx02_virtual:
279 type: MCP::SingleInstance
280 depends_on: [prx01_virtual]
281 properties:
282 env_name: { get_param: env_name }
283 mcp_version: { get_param: mcp_version }
284 instance_domain: {get_param: instance_domain}
285 instance_name: prx02
286 instance_flavor: {get_param: cid_flavor}
sgudzb8819722019-05-16 22:34:31 +0300287 underlay_userdata: { get_file: ./underlay-userdata.yaml }
288 control_net_static_ip:
289 list_join:
290 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300291 - [ { get_attr: [subnets, control_net_prefix] }, '222' ]
sgudze6bff762019-05-23 18:15:49 +0300292 tenant_net_static_ip:
293 list_join:
294 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300295 - [ { get_attr: [subnets, tenant_net_prefix] }, '222' ]
sgudze6bff762019-05-23 18:15:49 +0300296 external_net_static_ip:
297 list_join:
298 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300299 - [ { get_attr: [subnets, external_net_prefix] }, '222' ]
sgudze6bff762019-05-23 18:15:49 +0300300
sgudzb8819722019-05-16 22:34:31 +0300301 instance_config_host: { get_attr: [cfg01_node, instance_address] }
302
303 cmp001_virtual:
304 type: MCP::Compute
305 depends_on: [prx02_virtual]
306 properties:
307 env_name: { get_param: env_name }
308 mcp_version: { get_param: mcp_version }
309 instance_domain: {get_param: instance_domain}
310 instance_name: cmp001
311 instance_flavor: {get_param: cmp_flavor}
sgudzb8819722019-05-16 22:34:31 +0300312 underlay_userdata: { get_file: ./underlay-userdata.yaml }
313 control_net_static_ip:
314 list_join:
315 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300316 - [ { get_attr: [subnets, control_net_prefix] }, '101' ]
sgudze6bff762019-05-23 18:15:49 +0300317 tenant_net_static_ip:
318 list_join:
319 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300320 - [ { get_attr: [subnets, tenant_net_prefix] }, '101' ]
sgudze6bff762019-05-23 18:15:49 +0300321 external_net_static_ip:
322 list_join:
323 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300324 - [ { get_attr: [subnets, external_net_prefix] }, '101' ]
sgudze6bff762019-05-23 18:15:49 +0300325
sgudzb8819722019-05-16 22:34:31 +0300326 instance_config_host: { get_attr: [cfg01_node, instance_address] }
327
328 cmp002_virtual:
329 type: MCP::Compute
330 depends_on: [cmp001_virtual]
331 properties:
332 env_name: { get_param: env_name }
333 mcp_version: { get_param: mcp_version }
334 instance_domain: {get_param: instance_domain}
335 instance_name: cmp002
336 instance_flavor: {get_param: cmp_flavor}
sgudzb8819722019-05-16 22:34:31 +0300337 underlay_userdata: { get_file: ./underlay-userdata.yaml }
338 control_net_static_ip:
339 list_join:
340 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300341 - [ { get_attr: [subnets, control_net_prefix] }, '102' ]
sgudze6bff762019-05-23 18:15:49 +0300342 tenant_net_static_ip:
343 list_join:
344 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300345 - [ { get_attr: [subnets, tenant_net_prefix] }, '102' ]
sgudze6bff762019-05-23 18:15:49 +0300346 external_net_static_ip:
347 list_join:
348 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300349 - [ { get_attr: [subnets, external_net_prefix] }, '102' ]
sgudze6bff762019-05-23 18:15:49 +0300350
sgudzb8819722019-05-16 22:34:31 +0300351 instance_config_host: { get_attr: [cfg01_node, instance_address] }
352
353 cmp003_virtual:
354 type: MCP::Compute
355 depends_on: [cmp002_virtual]
356 properties:
357 env_name: { get_param: env_name }
358 mcp_version: { get_param: mcp_version }
359 instance_domain: {get_param: instance_domain}
360 instance_name: cmp003
361 instance_flavor: {get_param: cmp_flavor}
sgudzb8819722019-05-16 22:34:31 +0300362 underlay_userdata: { get_file: ./underlay-userdata.yaml }
363 control_net_static_ip:
364 list_join:
365 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300366 - [ { get_attr: [subnets, control_net_prefix] }, '103' ]
sgudze6bff762019-05-23 18:15:49 +0300367 tenant_net_static_ip:
368 list_join:
369 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300370 - [ { get_attr: [subnets, tenant_net_prefix] }, '103' ]
sgudze6bff762019-05-23 18:15:49 +0300371 external_net_static_ip:
372 list_join:
373 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300374 - [ { get_attr: [subnets, external_net_prefix] }, '103' ]
sgudze6bff762019-05-23 18:15:49 +0300375
sgudzb8819722019-05-16 22:34:31 +0300376 instance_config_host: { get_attr: [cfg01_node, instance_address] }
377
378 cmp004_virtual:
379 type: MCP::Compute
380 depends_on: [cmp003_virtual]
381 properties:
382 env_name: { get_param: env_name }
383 mcp_version: { get_param: mcp_version }
384 instance_domain: {get_param: instance_domain}
385 instance_name: cmp004
386 instance_flavor: {get_param: cmp_flavor}
sgudzb8819722019-05-16 22:34:31 +0300387 underlay_userdata: { get_file: ./underlay-userdata.yaml }
388 control_net_static_ip:
389 list_join:
390 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300391 - [ { get_attr: [subnets, control_net_prefix] }, '104' ]
sgudze6bff762019-05-23 18:15:49 +0300392 tenant_net_static_ip:
393 list_join:
394 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300395 - [ { get_attr: [subnets, tenant_net_prefix] }, '104' ]
sgudze6bff762019-05-23 18:15:49 +0300396 external_net_static_ip:
397 list_join:
398 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300399 - [ { get_attr: [subnets, external_net_prefix] }, '104' ]
sgudze6bff762019-05-23 18:15:49 +0300400
sgudzb8819722019-05-16 22:34:31 +0300401 instance_config_host: { get_attr: [cfg01_node, instance_address] }
402
403 foundation_node:
404 type: MCP::FoundationNode
405 depends_on: [networks]
406 properties:
407 env_name: { get_param: env_name }
408 mcp_version: { get_param: mcp_version }
409 instance_domain: {get_param: instance_domain}
410 instance_name: foundation
Dennis Dmitrievcba86122019-05-24 13:41:46 +0300411 instance_image: { get_param: foundation_image }
sgudzb8819722019-05-16 22:34:31 +0300412 instance_flavor: {get_param: foundation_flavor}
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300413 management_net: { list_join: ['-', [ 'management_net', { get_param: env_name } ]] }
414 control_net: { list_join: ['-', [ 'control_net', { get_param: env_name } ]] }
415 tenant_net: { list_join: ['-', [ 'tenant_net', { get_param: env_name } ]] }
416 external_net: { list_join: ['-', [ 'external_net', { get_param: env_name } ]] }
sgudzb8819722019-05-16 22:34:31 +0300417 underlay_userdata: { get_file: ./underlay--user-data-foundation.yaml }
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300418 management_net_static_ip:
419 list_join:
420 - '.'
421 - [ { get_attr: [subnets, management_net_prefix] }, '5' ]
sgudzb8819722019-05-16 22:34:31 +0300422 control_net_static_ip:
423 list_join:
424 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300425 - [ { get_attr: [subnets, control_net_prefix] }, '5' ]
sgudze6bff762019-05-23 18:15:49 +0300426 tenant_net_static_ip:
427 list_join:
428 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300429 - [ { get_attr: [subnets, tenant_net_prefix] }, '5' ]
sgudze6bff762019-05-23 18:15:49 +0300430 external_net_static_ip:
431 list_join:
432 - '.'
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300433 - [ { get_attr: [subnets, external_net_prefix] }, '5' ]
sgudze6bff762019-05-23 18:15:49 +0300434
sgudzb8819722019-05-16 22:34:31 +0300435 instance_config_host: { get_attr: [cfg01_node, instance_address] }
436
437outputs:
Andrew Baraniuk67c04ec2019-05-27 13:46:10 +0300438 foundation_public_ip:
sgudzb8819722019-05-16 22:34:31 +0300439 description: foundation node IP address (floating) from external network
440 value:
441 get_attr:
442 - foundation_node
443 - instance_floating_address
444...