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