blob: 9ae8f0817b0582f5de12bc41dac0329750ecb3c4 [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
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 prx01_virtual:
163 type: MCP::SingleInstance
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 instance_name: prx01
170 instance_flavor: {get_param: cid_flavor}
171 network: { get_attr: [networks, network] }
172 underlay_userdata: { get_file: ./underlay-userdata.yaml }
173 control_net_static_ip:
174 list_join:
175 - '.'
176 - [ { get_attr: [networks, control_net_prefix] }, '221' ]
177 instance_config_host: { get_attr: [cfg01_node, instance_address] }
178
179 prx02_virtual:
180 type: MCP::SingleInstance
181 depends_on: [prx01_virtual]
182 properties:
183 env_name: { get_param: env_name }
184 mcp_version: { get_param: mcp_version }
185 instance_domain: {get_param: instance_domain}
186 instance_name: prx02
187 instance_flavor: {get_param: cid_flavor}
188 network: { get_attr: [networks, network] }
189 underlay_userdata: { get_file: ./underlay-userdata.yaml }
190 control_net_static_ip:
191 list_join:
192 - '.'
193 - [ { get_attr: [networks, control_net_prefix] }, '222' ]
194 instance_config_host: { get_attr: [cfg01_node, instance_address] }
195
196 cmp001_virtual:
197 type: MCP::Compute
198 depends_on: [prx02_virtual]
199 properties:
200 env_name: { get_param: env_name }
201 mcp_version: { get_param: mcp_version }
202 instance_domain: {get_param: instance_domain}
203 instance_name: cmp001
204 instance_flavor: {get_param: cmp_flavor}
205 network: { get_attr: [networks, network] }
206 underlay_userdata: { get_file: ./underlay-userdata.yaml }
207 control_net_static_ip:
208 list_join:
209 - '.'
210 - [ { get_attr: [networks, control_net_prefix] }, '101' ]
211 instance_config_host: { get_attr: [cfg01_node, instance_address] }
212
213 cmp002_virtual:
214 type: MCP::Compute
215 depends_on: [cmp001_virtual]
216 properties:
217 env_name: { get_param: env_name }
218 mcp_version: { get_param: mcp_version }
219 instance_domain: {get_param: instance_domain}
220 instance_name: cmp002
221 instance_flavor: {get_param: cmp_flavor}
222 network: { get_attr: [networks, network] }
223 underlay_userdata: { get_file: ./underlay-userdata.yaml }
224 control_net_static_ip:
225 list_join:
226 - '.'
227 - [ { get_attr: [networks, control_net_prefix] }, '102' ]
228 instance_config_host: { get_attr: [cfg01_node, instance_address] }
229
230 cmp003_virtual:
231 type: MCP::Compute
232 depends_on: [cmp002_virtual]
233 properties:
234 env_name: { get_param: env_name }
235 mcp_version: { get_param: mcp_version }
236 instance_domain: {get_param: instance_domain}
237 instance_name: cmp003
238 instance_flavor: {get_param: cmp_flavor}
239 network: { get_attr: [networks, network] }
240 underlay_userdata: { get_file: ./underlay-userdata.yaml }
241 control_net_static_ip:
242 list_join:
243 - '.'
244 - [ { get_attr: [networks, control_net_prefix] }, '103' ]
245 instance_config_host: { get_attr: [cfg01_node, instance_address] }
246
247 cmp004_virtual:
248 type: MCP::Compute
249 depends_on: [cmp003_virtual]
250 properties:
251 env_name: { get_param: env_name }
252 mcp_version: { get_param: mcp_version }
253 instance_domain: {get_param: instance_domain}
254 instance_name: cmp004
255 instance_flavor: {get_param: cmp_flavor}
256 network: { get_attr: [networks, network] }
257 underlay_userdata: { get_file: ./underlay-userdata.yaml }
258 control_net_static_ip:
259 list_join:
260 - '.'
261 - [ { get_attr: [networks, control_net_prefix] }, '104' ]
262 instance_config_host: { get_attr: [cfg01_node, instance_address] }
263
264 foundation_node:
265 type: MCP::FoundationNode
266 depends_on: [networks]
267 properties:
268 env_name: { get_param: env_name }
269 mcp_version: { get_param: mcp_version }
270 instance_domain: {get_param: instance_domain}
271 instance_name: foundation
Dennis Dmitrievcba86122019-05-24 13:41:46 +0300272 instance_image: { get_param: foundation_image }
sgudzb8819722019-05-16 22:34:31 +0300273 instance_flavor: {get_param: foundation_flavor}
274 network: { get_attr: [networks, network] }
275 underlay_userdata: { get_file: ./underlay--user-data-foundation.yaml }
276 control_net_static_ip:
277 list_join:
278 - '.'
279 - [ { get_attr: [networks, control_net_prefix] }, '5' ]
280 instance_config_host: { get_attr: [cfg01_node, instance_address] }
281
282outputs:
283
284 control_subnet_cidr:
285 description: Control network CIDR
286 value: { get_param: control_subnet_cidr }
287
288 management_subnet_cidr:
289 description: Admin network CIDR
290 value: { get_param: management_subnet_cidr }
291
292 foundation_floating:
293 description: foundation node IP address (floating) from external network
294 value:
295 get_attr:
296 - foundation_node
297 - instance_floating_address
298...