blob: 9cf44e41c5a5b11167af95b7d4968c821f85774f [file] [log] [blame]
Gary Wu11c98742018-05-02 16:19:04 -07001#
2# Generated by scripts/gen-onap-oom-yaml.sh; MANUAL CHANGES WILL BE LOST
3#
Gary Wuccd529b2018-01-16 18:31:01 -08004heat_template_version: 2015-10-15
5description: ONAP on Kubernetes using OOM
6
7parameters:
Gary Wuccd529b2018-01-16 18:31:01 -08008 docker_proxy:
9 type: string
10
11 apt_proxy:
12 type: string
13
Gary Wuc98156d2018-01-18 12:03:26 -080014 public_net_id:
15 type: string
16 description: The ID of the Public network for floating IP address allocation
17
Gary Wuc98156d2018-01-18 12:03:26 -080018 oam_network_cidr:
19 type: string
20 description: CIDR of the OAM ONAP network
21
Gary Wu60dd0d82018-01-18 14:54:47 -080022 ubuntu_1604_image:
23 type: string
24 description: Name of the Ubuntu 16.04 image
25
Gary Wu60dd0d82018-01-18 14:54:47 -080026 rancher_vm_flavor:
27 type: string
Gary Wu11c98742018-05-02 16:19:04 -070028 description: VM flavor for Rancher
Gary Wu60dd0d82018-01-18 14:54:47 -080029
30 k8s_vm_flavor:
31 type: string
Gary Wu11c98742018-05-02 16:19:04 -070032 description: VM flavor for k8s hosts
33
34 integration_override_yaml:
35 type: string
36 description: Content for integration_override.yaml
Gary Wu60dd0d82018-01-18 14:54:47 -080037
Gary Wuccd529b2018-01-16 18:31:01 -080038resources:
Gary Wuc98156d2018-01-18 12:03:26 -080039 random-str:
40 type: OS::Heat::RandomString
41 properties:
42 length: 4
43
Gary Wubc11e5d2018-02-07 10:23:27 -080044 # ONAP security group
45 onap_sg:
46 type: OS::Neutron::SecurityGroup
47 properties:
48 name:
49 str_replace:
50 template: base_rand
51 params:
52 base: onap_sg
53 rand: { get_resource: random-str }
54 description: security group used by ONAP
55 rules:
56 # All egress traffic
57 - direction: egress
58 ethertype: IPv4
59 - direction: egress
60 ethertype: IPv6
61 # ingress traffic
62 # ICMP
63 - protocol: icmp
64 - protocol: udp
65 port_range_min: 1
66 port_range_max: 65535
67 - protocol: tcp
68 port_range_min: 1
69 port_range_max: 65535
70
71
Gary Wu52dfdcb2018-01-25 11:02:48 -080072 # ONAP management private network
73 oam_network:
74 type: OS::Neutron::Net
75 properties:
76 name:
77 str_replace:
78 template: oam_network_rand
79 params:
80 rand: { get_resource: random-str }
81
82 oam_subnet:
83 type: OS::Neutron::Subnet
84 properties:
85 name:
86 str_replace:
87 template: oam_network_rand
88 params:
89 rand: { get_resource: random-str }
90 network_id: { get_resource: oam_network }
91 cidr: { get_param: oam_network_cidr }
Gary Wu14a6b302018-05-01 15:59:28 -070092 dns_nameservers: [ "8.8.8.8" ]
Gary Wu52dfdcb2018-01-25 11:02:48 -080093
94 router:
95 type: OS::Neutron::Router
96 properties:
97 external_gateway_info:
98 network: { get_param: public_net_id }
99
100 router_interface:
101 type: OS::Neutron::RouterInterface
102 properties:
103 router_id: { get_resource: router }
104 subnet_id: { get_resource: oam_subnet }
105
Gary Wu374498a2018-02-06 17:31:04 -0800106 rancher_private_port:
107 type: OS::Neutron::Port
108 properties:
109 network: { get_resource: oam_network }
110 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800111 security_groups:
112 - { get_resource: onap_sg }
Gary Wu374498a2018-02-06 17:31:04 -0800113
114 rancher_floating_ip:
115 type: OS::Neutron::FloatingIP
116 properties:
117 floating_network_id: { get_param: public_net_id }
118 port_id: { get_resource: rancher_private_port }
119
Gary Wuccd529b2018-01-16 18:31:01 -0800120 rancher_vm:
121 type: OS::Nova::Server
122 properties:
123 name: rancher
Gary Wu558ac6e2018-01-19 14:53:12 -0800124 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800125 flavor: { get_param: rancher_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800126 key_name: onap_key
127 networks:
Gary Wu374498a2018-02-06 17:31:04 -0800128 - port: { get_resource: rancher_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800129 user_data_format: RAW
130 user_data:
131 str_replace:
Gary Wu1ff56672018-01-17 20:51:45 -0800132 template:
133 get_file: rancher_vm_entrypoint.sh
Gary Wu14a6b302018-05-01 15:59:28 -0700134 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700135 __docker_proxy__: { get_param: docker_proxy }
136 __apt_proxy__: { get_param: apt_proxy }
137 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu11c98742018-05-02 16:19:04 -0700138 __integration_override_yaml__: { get_param: integration_override_yaml }
139 __oam_network_id__: { get_resource: oam_network }
140 __oam_subnet_id__: { get_resource: oam_subnet }
Gary Wu0a671622018-05-14 12:59:03 -0700141 __k8s_1_vm_ip__: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700142 __k8s_vm_ips__: [
143 get_attr: [k8s_1_floating_ip, floating_ip_address],
144 get_attr: [k8s_2_floating_ip, floating_ip_address],
145 get_attr: [k8s_3_floating_ip, floating_ip_address],
146 get_attr: [k8s_4_floating_ip, floating_ip_address],
147 get_attr: [k8s_5_floating_ip, floating_ip_address],
148 get_attr: [k8s_6_floating_ip, floating_ip_address],
149 get_attr: [k8s_7_floating_ip, floating_ip_address],
Gary Wu7d034582018-05-12 09:08:20 -0700150 get_attr: [k8s_8_floating_ip, floating_ip_address],
151 get_attr: [k8s_9_floating_ip, floating_ip_address],
Gary Wu14a6b302018-05-01 15:59:28 -0700152 ]
153 k8s_1_private_port:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800154 type: OS::Neutron::Port
155 properties:
156 network: { get_resource: oam_network }
157 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800158 security_groups:
159 - { get_resource: onap_sg }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800160
Gary Wu14a6b302018-05-01 15:59:28 -0700161 k8s_1_floating_ip:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800162 type: OS::Neutron::FloatingIP
163 properties:
164 floating_network_id: { get_param: public_net_id }
Gary Wu14a6b302018-05-01 15:59:28 -0700165 port_id: { get_resource: k8s_1_private_port }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800166
Gary Wu14a6b302018-05-01 15:59:28 -0700167 k8s_1_vm:
Gary Wuccd529b2018-01-16 18:31:01 -0800168 type: OS::Nova::Server
169 properties:
Gary Wu14a6b302018-05-01 15:59:28 -0700170 name: k8s_1
Gary Wu558ac6e2018-01-19 14:53:12 -0800171 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800172 flavor: { get_param: k8s_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800173 key_name: onap_key
174 networks:
Gary Wu14a6b302018-05-01 15:59:28 -0700175 - port: { get_resource: k8s_1_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800176 user_data_format: RAW
177 user_data:
178 str_replace:
179 params:
180 __docker_proxy__: { get_param: docker_proxy }
181 __apt_proxy__: { get_param: apt_proxy }
Gary Wu5d325d02018-02-06 21:21:31 -0800182 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700183 template:
184 get_file: k8s_vm_entrypoint.sh
185
186 k8s_2_private_port:
187 type: OS::Neutron::Port
188 properties:
189 network: { get_resource: oam_network }
190 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
191 security_groups:
192 - { get_resource: onap_sg }
193
194 k8s_2_floating_ip:
195 type: OS::Neutron::FloatingIP
196 properties:
197 floating_network_id: { get_param: public_net_id }
198 port_id: { get_resource: k8s_2_private_port }
199
200 k8s_2_vm:
201 type: OS::Nova::Server
202 properties:
203 name: k8s_2
204 image: { get_param: ubuntu_1604_image }
205 flavor: { get_param: k8s_vm_flavor }
206 key_name: onap_key
207 networks:
208 - port: { get_resource: k8s_2_private_port }
209 user_data_format: RAW
210 user_data:
211 str_replace:
212 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700213 __docker_proxy__: { get_param: docker_proxy }
214 __apt_proxy__: { get_param: apt_proxy }
215 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
216 template:
217 get_file: k8s_vm_entrypoint.sh
218
219 k8s_3_private_port:
220 type: OS::Neutron::Port
221 properties:
222 network: { get_resource: oam_network }
223 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
224 security_groups:
225 - { get_resource: onap_sg }
226
227 k8s_3_floating_ip:
228 type: OS::Neutron::FloatingIP
229 properties:
230 floating_network_id: { get_param: public_net_id }
231 port_id: { get_resource: k8s_3_private_port }
232
233 k8s_3_vm:
234 type: OS::Nova::Server
235 properties:
236 name: k8s_3
237 image: { get_param: ubuntu_1604_image }
238 flavor: { get_param: k8s_vm_flavor }
239 key_name: onap_key
240 networks:
241 - port: { get_resource: k8s_3_private_port }
242 user_data_format: RAW
243 user_data:
244 str_replace:
245 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700246 __docker_proxy__: { get_param: docker_proxy }
247 __apt_proxy__: { get_param: apt_proxy }
248 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
249 template:
250 get_file: k8s_vm_entrypoint.sh
251
252 k8s_4_private_port:
253 type: OS::Neutron::Port
254 properties:
255 network: { get_resource: oam_network }
256 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
257 security_groups:
258 - { get_resource: onap_sg }
259
260 k8s_4_floating_ip:
261 type: OS::Neutron::FloatingIP
262 properties:
263 floating_network_id: { get_param: public_net_id }
264 port_id: { get_resource: k8s_4_private_port }
265
266 k8s_4_vm:
267 type: OS::Nova::Server
268 properties:
269 name: k8s_4
270 image: { get_param: ubuntu_1604_image }
271 flavor: { get_param: k8s_vm_flavor }
272 key_name: onap_key
273 networks:
274 - port: { get_resource: k8s_4_private_port }
275 user_data_format: RAW
276 user_data:
277 str_replace:
278 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700279 __docker_proxy__: { get_param: docker_proxy }
280 __apt_proxy__: { get_param: apt_proxy }
281 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
282 template:
283 get_file: k8s_vm_entrypoint.sh
284
285 k8s_5_private_port:
286 type: OS::Neutron::Port
287 properties:
288 network: { get_resource: oam_network }
289 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
290 security_groups:
291 - { get_resource: onap_sg }
292
293 k8s_5_floating_ip:
294 type: OS::Neutron::FloatingIP
295 properties:
296 floating_network_id: { get_param: public_net_id }
297 port_id: { get_resource: k8s_5_private_port }
298
299 k8s_5_vm:
300 type: OS::Nova::Server
301 properties:
302 name: k8s_5
303 image: { get_param: ubuntu_1604_image }
304 flavor: { get_param: k8s_vm_flavor }
305 key_name: onap_key
306 networks:
307 - port: { get_resource: k8s_5_private_port }
308 user_data_format: RAW
309 user_data:
310 str_replace:
311 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700312 __docker_proxy__: { get_param: docker_proxy }
313 __apt_proxy__: { get_param: apt_proxy }
314 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
315 template:
316 get_file: k8s_vm_entrypoint.sh
317
318 k8s_6_private_port:
319 type: OS::Neutron::Port
320 properties:
321 network: { get_resource: oam_network }
322 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
323 security_groups:
324 - { get_resource: onap_sg }
325
326 k8s_6_floating_ip:
327 type: OS::Neutron::FloatingIP
328 properties:
329 floating_network_id: { get_param: public_net_id }
330 port_id: { get_resource: k8s_6_private_port }
331
332 k8s_6_vm:
333 type: OS::Nova::Server
334 properties:
335 name: k8s_6
336 image: { get_param: ubuntu_1604_image }
337 flavor: { get_param: k8s_vm_flavor }
338 key_name: onap_key
339 networks:
340 - port: { get_resource: k8s_6_private_port }
341 user_data_format: RAW
342 user_data:
343 str_replace:
344 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700345 __docker_proxy__: { get_param: docker_proxy }
346 __apt_proxy__: { get_param: apt_proxy }
347 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
348 template:
349 get_file: k8s_vm_entrypoint.sh
350
351 k8s_7_private_port:
352 type: OS::Neutron::Port
353 properties:
354 network: { get_resource: oam_network }
355 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
356 security_groups:
357 - { get_resource: onap_sg }
358
359 k8s_7_floating_ip:
360 type: OS::Neutron::FloatingIP
361 properties:
362 floating_network_id: { get_param: public_net_id }
363 port_id: { get_resource: k8s_7_private_port }
364
365 k8s_7_vm:
366 type: OS::Nova::Server
367 properties:
368 name: k8s_7
369 image: { get_param: ubuntu_1604_image }
370 flavor: { get_param: k8s_vm_flavor }
371 key_name: onap_key
372 networks:
373 - port: { get_resource: k8s_7_private_port }
374 user_data_format: RAW
375 user_data:
376 str_replace:
377 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700378 __docker_proxy__: { get_param: docker_proxy }
379 __apt_proxy__: { get_param: apt_proxy }
380 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu1ff56672018-01-17 20:51:45 -0800381 template:
382 get_file: k8s_vm_entrypoint.sh
Gary Wu7b416392018-01-19 13:16:49 -0800383
Gary Wu7d034582018-05-12 09:08:20 -0700384 k8s_8_private_port:
385 type: OS::Neutron::Port
386 properties:
387 network: { get_resource: oam_network }
388 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
389 security_groups:
390 - { get_resource: onap_sg }
391
392 k8s_8_floating_ip:
393 type: OS::Neutron::FloatingIP
394 properties:
395 floating_network_id: { get_param: public_net_id }
396 port_id: { get_resource: k8s_8_private_port }
397
398 k8s_8_vm:
399 type: OS::Nova::Server
400 properties:
401 name: k8s_8
402 image: { get_param: ubuntu_1604_image }
403 flavor: { get_param: k8s_vm_flavor }
404 key_name: onap_key
405 networks:
406 - port: { get_resource: k8s_8_private_port }
407 user_data_format: RAW
408 user_data:
409 str_replace:
410 params:
411 __docker_proxy__: { get_param: docker_proxy }
412 __apt_proxy__: { get_param: apt_proxy }
413 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
414 template:
415 get_file: k8s_vm_entrypoint.sh
416
417 k8s_9_private_port:
418 type: OS::Neutron::Port
419 properties:
420 network: { get_resource: oam_network }
421 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
422 security_groups:
423 - { get_resource: onap_sg }
424
425 k8s_9_floating_ip:
426 type: OS::Neutron::FloatingIP
427 properties:
428 floating_network_id: { get_param: public_net_id }
429 port_id: { get_resource: k8s_9_private_port }
430
431 k8s_9_vm:
432 type: OS::Nova::Server
433 properties:
434 name: k8s_9
435 image: { get_param: ubuntu_1604_image }
436 flavor: { get_param: k8s_vm_flavor }
437 key_name: onap_key
438 networks:
439 - port: { get_resource: k8s_9_private_port }
440 user_data_format: RAW
441 user_data:
442 str_replace:
443 params:
444 __docker_proxy__: { get_param: docker_proxy }
445 __apt_proxy__: { get_param: apt_proxy }
446 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
447 template:
448 get_file: k8s_vm_entrypoint.sh
449
Gary Wu14ee41d2018-01-19 15:03:59 -0800450outputs:
Gary Wu61034082018-01-22 12:48:50 -0800451 rancher_vm_ip:
452 description: The IP address of the rancher instance
Gary Wu5d325d02018-02-06 21:21:31 -0800453 value: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu61034082018-01-22 12:48:50 -0800454
Gary Wu36e42dd2018-05-03 07:29:53 -0700455 k8s_1_vm_ip:
456 description: The IP address of the k8s_1 instance
457 value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
458
459 k8s_2_vm_ip:
460 description: The IP address of the k8s_2 instance
461 value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }
462
463 k8s_3_vm_ip:
464 description: The IP address of the k8s_3 instance
465 value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }
466
467 k8s_4_vm_ip:
468 description: The IP address of the k8s_4 instance
469 value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }
470
471 k8s_5_vm_ip:
472 description: The IP address of the k8s_5 instance
473 value: { get_attr: [k8s_5_floating_ip, floating_ip_address] }
474
475 k8s_6_vm_ip:
476 description: The IP address of the k8s_6 instance
477 value: { get_attr: [k8s_6_floating_ip, floating_ip_address] }
478
479 k8s_7_vm_ip:
480 description: The IP address of the k8s_7 instance
481 value: { get_attr: [k8s_7_floating_ip, floating_ip_address] }
482
Gary Wu7d034582018-05-12 09:08:20 -0700483 k8s_8_vm_ip:
484 description: The IP address of the k8s_8 instance
485 value: { get_attr: [k8s_8_floating_ip, floating_ip_address] }
486
487 k8s_9_vm_ip:
488 description: The IP address of the k8s_9 instance
489 value: { get_attr: [k8s_9_floating_ip, floating_ip_address] }
490