blob: 53fe0baa30af9d7971fb81666911006cddd1f00d [file] [log] [blame]
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +01001heat_template_version: queens
2
3parameters:
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +01004 image:
5 type: string
6 description: Name of image to use for servers
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +01007 public_net_id:
8 type: string
Oleh Hryhorovb58460e2020-02-05 15:53:48 +02009 default: ''
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +010010 description: >
Oleh Hryhorovb58460e2020-02-05 15:53:48 +020011 ID of public network for which floating IP addresses will be allocated/
12 for baremetal case flat provision network for nodes
13 host_interface:
14 type: string
15 description: Interface which connects server with public network (world accessible network).
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +010016 masters_size:
17 type: number
18 description: Number of masters instances to deploy
19 default: 2
20 worker_size:
21 type: number
22 description: Number of workers to deploy
23 default: 5
24 cmp_size:
25 type: number
26 description: Number of cmp workers to deploy
27 default: 0
28 gtw_size:
29 type: number
30 description: Number of gtw workers to deploy
31 default: 0
sgudzb94b4c62020-02-05 13:21:25 +020032 lma_size:
33 type: number
34 description: Number of gtw workers to deploy
35 default: 0
36 osd_size:
37 type: number
38 description: Number of gtw workers to deploy
39 default: 0
sgudz43eb82b2020-02-11 16:36:48 +020040 ntw_size:
41 type: number
42 description: Number of contrail nodes to deploy
43 default: 0
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +010044 ucp_boot_timeout:
45 type: number
46 description: Boot timeout for UCP instance
47 default: 1200
48 cluster_public_key:
49 type: string
Oleh Hryhorov0019f592020-01-23 11:50:12 +020050 private_floating_network_cidr:
51 type: string
52 default: '10.11.12.0/24'
Oleh Hryhorovb58460e2020-02-05 15:53:48 +020053 private_floating_network_pool_start:
54 type: string
55 default: '10.11.12.100'
56 private_floating_network_pool_end:
57 type: string
58 default: '10.11.12.200'
59 private_floating_network_gateway:
60 type: string
Oleh Hryhorovd3a30242020-02-11 15:24:01 +020061 default: ''
Oleh Hryhorovb58460e2020-02-05 15:53:48 +020062 private_floating_interface:
63 description: Interface which carries floating network for child OpenStack.
64 type: string
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +010065 worker_metadata:
66 type: json
sgudzb94b4c62020-02-05 13:21:25 +020067 default: {}
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +010068 cmp_metadata:
69 type: json
sgudzb94b4c62020-02-05 13:21:25 +020070 default: {}
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +010071 gtw_metadata:
72 type: json
sgudzb94b4c62020-02-05 13:21:25 +020073 default: {}
74 lma_metadata:
75 type: json
76 default: {}
77 osd_metadata:
78 type: json
79 default: {}
sgudz43eb82b2020-02-11 16:36:48 +020080 ntw_metadata:
81 type: json
82 default: {}
sgudzfe58e8a2020-02-11 13:31:40 +020083 ucp_flavor:
84 type: string
85 default: 'system.compact.openstack.control'
86 masters_flavor:
87 type: string
88 default: 'system.compact.openstack.control'
89 workers_flavor:
90 type: string
91 default: 'system.compact.openstack.control'
92 cmps_flavor:
93 type: string
94 default: 'system.compact.openstack.control'
95 gtws_flavor:
96 type: string
97 default: 'system.compact.openstack.control'
98 lmas_flavor:
99 type: string
100 default: 'system.compact.openstack.control'
101 osds_flavor:
102 type: string
103 default: 'system.compact.openstack.control'
sgudz43eb82b2020-02-11 16:36:48 +0200104 ntws_flavor:
105 type: string
106 default: 'system.compact.openstack.control'
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200107 functions_override:
108 type: string
Mykyta Karpin5ed5fd82020-01-27 18:23:29 +0200109 docker_ee_url:
110 type: string
111 default: 'https://s3-us-west-2.amazonaws.com/internal-docker-ee-builds/docker-ee-linux'
112 docker_ee_release:
113 type: string
114 default: 'stable-19.03'
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100115
116resources:
117 key_pair:
118 type: OS::Nova::KeyPair
119 properties:
120 name: { get_param: "OS::stack_name" }
121 public_key: { get_param: cluster_public_key}
122 save_private_key: false
123
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200124 accessible_network:
125 type: MCP2::NetworkAcc
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100126 properties:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200127 public_net_id: { get_param: public_net_id }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100128
129 private_floating_network:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200130 type: MCP2::NetworkPrvFl
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100131 properties:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200132 private_floating_network_cidr: { get_param: private_floating_network_cidr }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100133
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100134 ucp:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200135 depends_on: accessible_network
136 type: MCP2::SrvInstances
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100137 properties:
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100138 metadata: {"role":"ucp"}
Mykyta Karpin5ed5fd82020-01-27 18:23:29 +0200139 docker_ee_url: { get_param: docker_ee_url }
140 docker_ee_release: { get_param: docker_ee_release }
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200141 node_type: "ucp"
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200142 key_name: { get_param: "OS::stack_name" }
143 image: { get_param: image }
144 flavor: { get_param: ucp_flavor }
145 accessible_network: { get_attr: [accessible_network, public_network] }
146 private_floating_network: { get_attr: [private_floating_network, private_floating_network_id] }
147 private_floating_subnet_id: { get_attr: [private_floating_network, private_floating_subnet_id] }
148 private_floating_interface: { get_param: private_floating_interface }
149 private_floating_network_cidr: { get_param: private_floating_network_cidr }
150 accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
151 public_net_id: { get_param: public_net_id }
152 host_interface: { get_param: host_interface }
153 functions_override: { get_param: functions_override }
154
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100155
156 masters:
157 type: OS::Heat::ResourceGroup
158 depends_on:
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200159 - ucp
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100160 properties:
161 count: { get_param: masters_size }
162 resource_def:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200163 type: MCP2::SrvInstances
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100164 properties:
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100165 metadata: {"role":"master"}
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200166 node_type: "master"
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200167 key_name: { get_param: "OS::stack_name" }
168 image: { get_param: image }
169 flavor: { get_param: masters_flavor }
Mykyta Karpin5ed5fd82020-01-27 18:23:29 +0200170 docker_ee_url: { get_param: docker_ee_url }
171 docker_ee_release: { get_param: docker_ee_release }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200172 accessible_network: { get_attr: [accessible_network, public_network] }
173 private_floating_network: { get_attr: [private_floating_network, private_floating_network_id] }
174 private_floating_subnet_id: { get_attr: [private_floating_network, private_floating_subnet_id] }
175 private_floating_interface: { get_param: private_floating_interface }
176 private_floating_network_cidr: { get_param: private_floating_network_cidr }
177 accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
178 public_net_id: { get_param: public_net_id }
179 host_interface: { get_param: host_interface }
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200180 ucp_master_host: { get_attr: [ucp, server_private_ip] }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200181 functions_override: { get_param: functions_override }
182
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100183
184 workers:
185 type: OS::Heat::ResourceGroup
186 depends_on:
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200187 - ucp
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100188 properties:
189 count: { get_param: worker_size }
190 resource_def:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200191 type: MCP2::SrvInstances
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100192 properties:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200193 metadata: { get_param: worker_metadata}
194 node_type: "worker"
195 key_name: { get_param: "OS::stack_name" }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100196 image: { get_param: image }
sgudzfe58e8a2020-02-11 13:31:40 +0200197 flavor: { get_param: workers_flavor }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100198 key_name: { get_param: "OS::stack_name" }
Mykyta Karpin5ed5fd82020-01-27 18:23:29 +0200199 docker_ee_url: { get_param: docker_ee_url }
200 docker_ee_release: { get_param: docker_ee_release }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200201 accessible_network: { get_attr: [accessible_network, public_network] }
202 private_floating_network: { get_attr: [private_floating_network, private_floating_network_id] }
203 private_floating_subnet_id: { get_attr: [private_floating_network, private_floating_subnet_id] }
204 private_floating_interface: { get_param: private_floating_interface }
205 private_floating_network_cidr: { get_param: private_floating_network_cidr }
206 accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100207 public_net_id: { get_param: public_net_id }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200208 host_interface: { get_param: host_interface }
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200209 ucp_master_host: { get_attr: [ucp, server_private_ip] }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200210 functions_override: { get_param: functions_override }
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200211
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100212 cmps:
213 type: OS::Heat::ResourceGroup
214 depends_on:
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200215 - ucp
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100216 properties:
217 count: { get_param: cmp_size }
218 resource_def:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200219 type: MCP2::SrvInstances
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100220 properties:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200221 metadata: { get_param: cmp_metadata }
222 node_type: "worker"
223 key_name: { get_param: "OS::stack_name" }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100224 image: { get_param: image }
sgudzfe58e8a2020-02-11 13:31:40 +0200225 flavor: { get_param: cmps_flavor }
Mykyta Karpin5ed5fd82020-01-27 18:23:29 +0200226 docker_ee_url: { get_param: docker_ee_url }
227 docker_ee_release: { get_param: docker_ee_release }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200228 accessible_network: { get_attr: [accessible_network, public_network] }
229 private_floating_network: { get_attr: [private_floating_network, private_floating_network_id] }
230 private_floating_subnet_id: { get_attr: [private_floating_network, private_floating_subnet_id] }
231 private_floating_interface: { get_param: private_floating_interface }
232 private_floating_network_cidr: { get_param: private_floating_network_cidr }
233 accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100234 public_net_id: { get_param: public_net_id }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200235 host_interface: { get_param: host_interface }
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200236 ucp_master_host: { get_attr: [ucp, server_private_ip] }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200237 functions_override: { get_param: functions_override }
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200238
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100239 gtws:
240 type: OS::Heat::ResourceGroup
241 depends_on:
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200242 - ucp
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100243 properties:
244 count: { get_param: gtw_size }
245 resource_def:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200246 type: MCP2::SrvInstances
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100247 properties:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200248 metadata: { get_param: gtw_metadata }
249 node_type: "worker"
250 key_name: { get_param: "OS::stack_name" }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100251 image: { get_param: image }
sgudzfe58e8a2020-02-11 13:31:40 +0200252 flavor: { get_param: gtws_flavor }
Mykyta Karpin5ed5fd82020-01-27 18:23:29 +0200253 docker_ee_url: { get_param: docker_ee_url }
254 docker_ee_release: { get_param: docker_ee_release }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200255 accessible_network: { get_attr: [accessible_network, public_network] }
256 private_floating_network: { get_attr: [private_floating_network, private_floating_network_id] }
257 private_floating_subnet_id: { get_attr: [private_floating_network, private_floating_subnet_id] }
258 private_floating_interface: { get_param: private_floating_interface }
259 private_floating_network_cidr: { get_param: private_floating_network_cidr }
260 accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100261 public_net_id: { get_param: public_net_id }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200262 host_interface: { get_param: host_interface }
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200263 ucp_master_host: { get_attr: [ucp, server_private_ip] }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200264 functions_override: { get_param: functions_override }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100265
sgudzb94b4c62020-02-05 13:21:25 +0200266 lmas:
267 type: OS::Heat::ResourceGroup
268 depends_on:
269 - ucp
270 properties:
271 count: { get_param: lma_size }
272 resource_def:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200273 type: MCP2::SrvInstances
sgudzb94b4c62020-02-05 13:21:25 +0200274 properties:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200275 metadata: { get_param: lma_metadata }
276 node_type: "worker"
277 key_name: { get_param: "OS::stack_name" }
sgudzb94b4c62020-02-05 13:21:25 +0200278 image: { get_param: image }
sgudzfe58e8a2020-02-11 13:31:40 +0200279 flavor: { get_param: lmas_flavor }
Mykyta Karpin5ed5fd82020-01-27 18:23:29 +0200280 docker_ee_url: { get_param: docker_ee_url }
281 docker_ee_release: { get_param: docker_ee_release }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200282 accessible_network: { get_attr: [accessible_network, public_network] }
283 private_floating_network: { get_attr: [private_floating_network, private_floating_network_id] }
284 private_floating_subnet_id: { get_attr: [private_floating_network, private_floating_subnet_id] }
285 private_floating_interface: { get_param: private_floating_interface }
286 private_floating_network_cidr: { get_param: private_floating_network_cidr }
287 accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
sgudzb94b4c62020-02-05 13:21:25 +0200288 public_net_id: { get_param: public_net_id }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200289 host_interface: { get_param: host_interface }
sgudzb94b4c62020-02-05 13:21:25 +0200290 ucp_master_host: { get_attr: [ucp, server_private_ip] }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200291 functions_override: { get_param: functions_override }
sgudzb94b4c62020-02-05 13:21:25 +0200292
293 osds:
294 type: OS::Heat::ResourceGroup
295 depends_on:
296 - ucp
297 properties:
298 count: { get_param: osd_size }
299 resource_def:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200300 type: MCP2::SrvInstances
sgudzb94b4c62020-02-05 13:21:25 +0200301 properties:
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200302 metadata: { get_param: osd_metadata }
303 node_type: "worker"
304 key_name: { get_param: "OS::stack_name" }
sgudzb94b4c62020-02-05 13:21:25 +0200305 image: { get_param: image }
sgudzfe58e8a2020-02-11 13:31:40 +0200306 flavor: { get_param: osds_flavor }
Mykyta Karpin5ed5fd82020-01-27 18:23:29 +0200307 docker_ee_url: { get_param: docker_ee_url }
308 docker_ee_release: { get_param: docker_ee_release }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200309 accessible_network: { get_attr: [accessible_network, public_network] }
310 private_floating_network: { get_attr: [private_floating_network, private_floating_network_id] }
311 private_floating_subnet_id: { get_attr: [private_floating_network, private_floating_subnet_id] }
312 private_floating_interface: { get_param: private_floating_interface }
313 private_floating_network_cidr: { get_param: private_floating_network_cidr }
314 accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
sgudzb94b4c62020-02-05 13:21:25 +0200315 public_net_id: { get_param: public_net_id }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200316 host_interface: { get_param: host_interface }
sgudzb94b4c62020-02-05 13:21:25 +0200317 ucp_master_host: { get_attr: [ucp, server_private_ip] }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200318 functions_override: { get_param: functions_override }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100319
sgudz43eb82b2020-02-11 16:36:48 +0200320 ntws:
321 type: OS::Heat::ResourceGroup
322 depends_on:
323 - ucp
324 properties:
325 count: { get_param: ntw_size }
326 resource_def:
327 type: MCP2::SrvInstances
328 properties:
329 metadata: { get_param: ntw_metadata }
330 node_type: "worker"
331 key_name: { get_param: "OS::stack_name" }
332 image: { get_param: image }
333 flavor: { get_param: ntws_flavor }
334 docker_ee_url: { get_param: docker_ee_url }
335 docker_ee_release: { get_param: docker_ee_release }
336 accessible_network: { get_attr: [accessible_network, public_network] }
337 private_floating_network: { get_attr: [private_floating_network, private_floating_network_id] }
338 private_floating_subnet_id: { get_attr: [private_floating_network, private_floating_subnet_id] }
339 private_floating_interface: { get_param: private_floating_interface }
340 private_floating_network_cidr: { get_param: private_floating_network_cidr }
341 accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
342 public_net_id: { get_param: public_net_id }
343 host_interface: { get_param: host_interface }
344 ucp_master_host: { get_attr: [ucp, server_private_ip] }
345 functions_override: { get_param: functions_override }
346
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100347outputs:
348 ucp_ips:
349 description: Private IP addresses of the deployed ucp instances
350 value: { get_attr: [ucp, server_public_ip] }
351 masters_ips:
352 description: Private IP addresses of the deployed masters instances
353 value: { get_attr: [masters, server_public_ip] }
354 workers_ips:
355 description: Private IP addresses of the deployed worker instances
356 value: { get_attr: [workers, server_public_ip] }
357 cmps_ips:
358 description: Private IP addresses of the deployed cmp instances
359 value: { get_attr: [cmps, server_public_ip] }
360 gtws_ips:
361 description: Private IP addresses of the deployed gtw instances
362 value: { get_attr: [gtws, server_public_ip] }
sgudzb94b4c62020-02-05 13:21:25 +0200363 lmas_ips:
364 description: Private IP addresses of the deployed lma instances
365 value: { get_attr: [lmas, server_public_ip] }
366 osds_ips:
367 description: Private IP addresses of the deployed osd instances
368 value: { get_attr: [osds, server_public_ip] }
sgudz43eb82b2020-02-11 16:36:48 +0200369 ntws_ips:
370 description: Private IP addresses of the deployed contrail instances
371 value: { get_attr: [ntws, server_public_ip] }
Oleh Hryhorov404e9572020-01-21 18:57:22 +0200372 worker_private_floating_ips:
373 description: IPs might be used as gateway
374 value: { get_attr: [workers, server_private_floating_ip] }
Oleh Hryhorov0019f592020-01-23 11:50:12 +0200375 private_floating_cidr:
376 value: { get_param: private_floating_network_cidr }
Oleh Hryhorovb58460e2020-02-05 15:53:48 +0200377 private_floating_network_pool_start:
378 value: { get_param: private_floating_network_pool_start }
379 private_floating_network_pool_end:
380 value: { get_param: private_floating_network_pool_end }
381 private_floating_network_gateway:
382 value: { get_param: private_floating_network_gateway }
383