blob: 8cd8169f99bcdf3482ea04beb01044f6e0b198a7 [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 Wu81836d22018-06-22 13:48:50 -070038 gerrit_branch:
39 type: string
40 default: "master"
41
42 gerrit_refspec:
43 type: string
44 default: "refs/heads/master"
45
46 docker_manifest:
47 type: string
48 default: "docker-manifest.csv"
49
Gary Wuccd529b2018-01-16 18:31:01 -080050resources:
Gary Wuc98156d2018-01-18 12:03:26 -080051 random-str:
52 type: OS::Heat::RandomString
53 properties:
54 length: 4
55
Gary Wubc11e5d2018-02-07 10:23:27 -080056 # ONAP security group
57 onap_sg:
58 type: OS::Neutron::SecurityGroup
59 properties:
60 name:
61 str_replace:
62 template: base_rand
63 params:
64 base: onap_sg
65 rand: { get_resource: random-str }
66 description: security group used by ONAP
67 rules:
68 # All egress traffic
69 - direction: egress
70 ethertype: IPv4
71 - direction: egress
72 ethertype: IPv6
73 # ingress traffic
74 # ICMP
75 - protocol: icmp
76 - protocol: udp
77 port_range_min: 1
78 port_range_max: 65535
79 - protocol: tcp
80 port_range_min: 1
81 port_range_max: 65535
82
83
Gary Wu52dfdcb2018-01-25 11:02:48 -080084 # ONAP management private network
85 oam_network:
86 type: OS::Neutron::Net
87 properties:
88 name:
89 str_replace:
90 template: oam_network_rand
91 params:
92 rand: { get_resource: random-str }
93
94 oam_subnet:
95 type: OS::Neutron::Subnet
96 properties:
97 name:
98 str_replace:
99 template: oam_network_rand
100 params:
101 rand: { get_resource: random-str }
102 network_id: { get_resource: oam_network }
103 cidr: { get_param: oam_network_cidr }
Gary Wu14a6b302018-05-01 15:59:28 -0700104 dns_nameservers: [ "8.8.8.8" ]
Gary Wu52dfdcb2018-01-25 11:02:48 -0800105
106 router:
107 type: OS::Neutron::Router
108 properties:
109 external_gateway_info:
110 network: { get_param: public_net_id }
111
112 router_interface:
113 type: OS::Neutron::RouterInterface
114 properties:
115 router_id: { get_resource: router }
116 subnet_id: { get_resource: oam_subnet }
117
Gary Wu374498a2018-02-06 17:31:04 -0800118 rancher_private_port:
119 type: OS::Neutron::Port
120 properties:
121 network: { get_resource: oam_network }
122 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800123 security_groups:
124 - { get_resource: onap_sg }
Gary Wu374498a2018-02-06 17:31:04 -0800125
126 rancher_floating_ip:
127 type: OS::Neutron::FloatingIP
128 properties:
129 floating_network_id: { get_param: public_net_id }
130 port_id: { get_resource: rancher_private_port }
131
Gary Wuccd529b2018-01-16 18:31:01 -0800132 rancher_vm:
133 type: OS::Nova::Server
134 properties:
135 name: rancher
Gary Wu558ac6e2018-01-19 14:53:12 -0800136 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800137 flavor: { get_param: rancher_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800138 key_name: onap_key
139 networks:
Gary Wu374498a2018-02-06 17:31:04 -0800140 - port: { get_resource: rancher_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800141 user_data_format: RAW
142 user_data:
143 str_replace:
Gary Wu1ff56672018-01-17 20:51:45 -0800144 template:
145 get_file: rancher_vm_entrypoint.sh
Gary Wu14a6b302018-05-01 15:59:28 -0700146 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700147 __docker_proxy__: { get_param: docker_proxy }
148 __apt_proxy__: { get_param: apt_proxy }
149 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu11c98742018-05-02 16:19:04 -0700150 __integration_override_yaml__: { get_param: integration_override_yaml }
Gary Wu81836d22018-06-22 13:48:50 -0700151 __gerrit_branch__: { get_param: gerrit_branch }
152 __gerrit_refspec__: { get_param: gerrit_refspec }
153 __docker_manifest__: { get_param: docker_manifest }
Gary Wu11c98742018-05-02 16:19:04 -0700154 __oam_network_id__: { get_resource: oam_network }
155 __oam_subnet_id__: { get_resource: oam_subnet }
Gary Wu0a671622018-05-14 12:59:03 -0700156 __k8s_1_vm_ip__: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700157 __k8s_vm_ips__: [
158 get_attr: [k8s_1_floating_ip, floating_ip_address],
159 get_attr: [k8s_2_floating_ip, floating_ip_address],
160 get_attr: [k8s_3_floating_ip, floating_ip_address],
161 get_attr: [k8s_4_floating_ip, floating_ip_address],
162 get_attr: [k8s_5_floating_ip, floating_ip_address],
163 get_attr: [k8s_6_floating_ip, floating_ip_address],
164 get_attr: [k8s_7_floating_ip, floating_ip_address],
Gary Wu7d034582018-05-12 09:08:20 -0700165 get_attr: [k8s_8_floating_ip, floating_ip_address],
166 get_attr: [k8s_9_floating_ip, floating_ip_address],
Gary Wu276d5a42018-06-05 11:26:44 -0700167 get_attr: [k8s_10_floating_ip, floating_ip_address],
168 get_attr: [k8s_11_floating_ip, floating_ip_address],
Gary Wu14a6b302018-05-01 15:59:28 -0700169 ]
170 k8s_1_private_port:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800171 type: OS::Neutron::Port
172 properties:
173 network: { get_resource: oam_network }
174 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
Gary Wubc11e5d2018-02-07 10:23:27 -0800175 security_groups:
176 - { get_resource: onap_sg }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800177
Gary Wu14a6b302018-05-01 15:59:28 -0700178 k8s_1_floating_ip:
Gary Wu52dfdcb2018-01-25 11:02:48 -0800179 type: OS::Neutron::FloatingIP
180 properties:
181 floating_network_id: { get_param: public_net_id }
Gary Wu14a6b302018-05-01 15:59:28 -0700182 port_id: { get_resource: k8s_1_private_port }
Gary Wu52dfdcb2018-01-25 11:02:48 -0800183
Gary Wu14a6b302018-05-01 15:59:28 -0700184 k8s_1_vm:
Gary Wuccd529b2018-01-16 18:31:01 -0800185 type: OS::Nova::Server
186 properties:
Gary Wu14a6b302018-05-01 15:59:28 -0700187 name: k8s_1
Gary Wu558ac6e2018-01-19 14:53:12 -0800188 image: { get_param: ubuntu_1604_image }
Gary Wu60dd0d82018-01-18 14:54:47 -0800189 flavor: { get_param: k8s_vm_flavor }
Gary Wuccd529b2018-01-16 18:31:01 -0800190 key_name: onap_key
191 networks:
Gary Wu14a6b302018-05-01 15:59:28 -0700192 - port: { get_resource: k8s_1_private_port }
Gary Wuccd529b2018-01-16 18:31:01 -0800193 user_data_format: RAW
194 user_data:
195 str_replace:
196 params:
197 __docker_proxy__: { get_param: docker_proxy }
198 __apt_proxy__: { get_param: apt_proxy }
Gary Wu5d325d02018-02-06 21:21:31 -0800199 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu14a6b302018-05-01 15:59:28 -0700200 template:
201 get_file: k8s_vm_entrypoint.sh
202
203 k8s_2_private_port:
204 type: OS::Neutron::Port
205 properties:
206 network: { get_resource: oam_network }
207 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
208 security_groups:
209 - { get_resource: onap_sg }
210
211 k8s_2_floating_ip:
212 type: OS::Neutron::FloatingIP
213 properties:
214 floating_network_id: { get_param: public_net_id }
215 port_id: { get_resource: k8s_2_private_port }
216
217 k8s_2_vm:
218 type: OS::Nova::Server
219 properties:
220 name: k8s_2
221 image: { get_param: ubuntu_1604_image }
222 flavor: { get_param: k8s_vm_flavor }
223 key_name: onap_key
224 networks:
225 - port: { get_resource: k8s_2_private_port }
226 user_data_format: RAW
227 user_data:
228 str_replace:
229 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700230 __docker_proxy__: { get_param: docker_proxy }
231 __apt_proxy__: { get_param: apt_proxy }
232 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
233 template:
234 get_file: k8s_vm_entrypoint.sh
235
236 k8s_3_private_port:
237 type: OS::Neutron::Port
238 properties:
239 network: { get_resource: oam_network }
240 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
241 security_groups:
242 - { get_resource: onap_sg }
243
244 k8s_3_floating_ip:
245 type: OS::Neutron::FloatingIP
246 properties:
247 floating_network_id: { get_param: public_net_id }
248 port_id: { get_resource: k8s_3_private_port }
249
250 k8s_3_vm:
251 type: OS::Nova::Server
252 properties:
253 name: k8s_3
254 image: { get_param: ubuntu_1604_image }
255 flavor: { get_param: k8s_vm_flavor }
256 key_name: onap_key
257 networks:
258 - port: { get_resource: k8s_3_private_port }
259 user_data_format: RAW
260 user_data:
261 str_replace:
262 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700263 __docker_proxy__: { get_param: docker_proxy }
264 __apt_proxy__: { get_param: apt_proxy }
265 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
266 template:
267 get_file: k8s_vm_entrypoint.sh
268
269 k8s_4_private_port:
270 type: OS::Neutron::Port
271 properties:
272 network: { get_resource: oam_network }
273 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
274 security_groups:
275 - { get_resource: onap_sg }
276
277 k8s_4_floating_ip:
278 type: OS::Neutron::FloatingIP
279 properties:
280 floating_network_id: { get_param: public_net_id }
281 port_id: { get_resource: k8s_4_private_port }
282
283 k8s_4_vm:
284 type: OS::Nova::Server
285 properties:
286 name: k8s_4
287 image: { get_param: ubuntu_1604_image }
288 flavor: { get_param: k8s_vm_flavor }
289 key_name: onap_key
290 networks:
291 - port: { get_resource: k8s_4_private_port }
292 user_data_format: RAW
293 user_data:
294 str_replace:
295 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700296 __docker_proxy__: { get_param: docker_proxy }
297 __apt_proxy__: { get_param: apt_proxy }
298 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
299 template:
300 get_file: k8s_vm_entrypoint.sh
301
302 k8s_5_private_port:
303 type: OS::Neutron::Port
304 properties:
305 network: { get_resource: oam_network }
306 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
307 security_groups:
308 - { get_resource: onap_sg }
309
310 k8s_5_floating_ip:
311 type: OS::Neutron::FloatingIP
312 properties:
313 floating_network_id: { get_param: public_net_id }
314 port_id: { get_resource: k8s_5_private_port }
315
316 k8s_5_vm:
317 type: OS::Nova::Server
318 properties:
319 name: k8s_5
320 image: { get_param: ubuntu_1604_image }
321 flavor: { get_param: k8s_vm_flavor }
322 key_name: onap_key
323 networks:
324 - port: { get_resource: k8s_5_private_port }
325 user_data_format: RAW
326 user_data:
327 str_replace:
328 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700329 __docker_proxy__: { get_param: docker_proxy }
330 __apt_proxy__: { get_param: apt_proxy }
331 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
332 template:
333 get_file: k8s_vm_entrypoint.sh
334
335 k8s_6_private_port:
336 type: OS::Neutron::Port
337 properties:
338 network: { get_resource: oam_network }
339 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
340 security_groups:
341 - { get_resource: onap_sg }
342
343 k8s_6_floating_ip:
344 type: OS::Neutron::FloatingIP
345 properties:
346 floating_network_id: { get_param: public_net_id }
347 port_id: { get_resource: k8s_6_private_port }
348
349 k8s_6_vm:
350 type: OS::Nova::Server
351 properties:
352 name: k8s_6
353 image: { get_param: ubuntu_1604_image }
354 flavor: { get_param: k8s_vm_flavor }
355 key_name: onap_key
356 networks:
357 - port: { get_resource: k8s_6_private_port }
358 user_data_format: RAW
359 user_data:
360 str_replace:
361 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700362 __docker_proxy__: { get_param: docker_proxy }
363 __apt_proxy__: { get_param: apt_proxy }
364 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
365 template:
366 get_file: k8s_vm_entrypoint.sh
367
368 k8s_7_private_port:
369 type: OS::Neutron::Port
370 properties:
371 network: { get_resource: oam_network }
372 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
373 security_groups:
374 - { get_resource: onap_sg }
375
376 k8s_7_floating_ip:
377 type: OS::Neutron::FloatingIP
378 properties:
379 floating_network_id: { get_param: public_net_id }
380 port_id: { get_resource: k8s_7_private_port }
381
382 k8s_7_vm:
383 type: OS::Nova::Server
384 properties:
385 name: k8s_7
386 image: { get_param: ubuntu_1604_image }
387 flavor: { get_param: k8s_vm_flavor }
388 key_name: onap_key
389 networks:
390 - port: { get_resource: k8s_7_private_port }
391 user_data_format: RAW
392 user_data:
393 str_replace:
394 params:
Gary Wu14a6b302018-05-01 15:59:28 -0700395 __docker_proxy__: { get_param: docker_proxy }
396 __apt_proxy__: { get_param: apt_proxy }
397 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu1ff56672018-01-17 20:51:45 -0800398 template:
399 get_file: k8s_vm_entrypoint.sh
Gary Wu7b416392018-01-19 13:16:49 -0800400
Gary Wu7d034582018-05-12 09:08:20 -0700401 k8s_8_private_port:
402 type: OS::Neutron::Port
403 properties:
404 network: { get_resource: oam_network }
405 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
406 security_groups:
407 - { get_resource: onap_sg }
408
409 k8s_8_floating_ip:
410 type: OS::Neutron::FloatingIP
411 properties:
412 floating_network_id: { get_param: public_net_id }
413 port_id: { get_resource: k8s_8_private_port }
414
415 k8s_8_vm:
416 type: OS::Nova::Server
417 properties:
418 name: k8s_8
419 image: { get_param: ubuntu_1604_image }
420 flavor: { get_param: k8s_vm_flavor }
421 key_name: onap_key
422 networks:
423 - port: { get_resource: k8s_8_private_port }
424 user_data_format: RAW
425 user_data:
426 str_replace:
427 params:
428 __docker_proxy__: { get_param: docker_proxy }
429 __apt_proxy__: { get_param: apt_proxy }
430 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
431 template:
432 get_file: k8s_vm_entrypoint.sh
433
434 k8s_9_private_port:
435 type: OS::Neutron::Port
436 properties:
437 network: { get_resource: oam_network }
438 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
439 security_groups:
440 - { get_resource: onap_sg }
441
442 k8s_9_floating_ip:
443 type: OS::Neutron::FloatingIP
444 properties:
445 floating_network_id: { get_param: public_net_id }
446 port_id: { get_resource: k8s_9_private_port }
447
448 k8s_9_vm:
449 type: OS::Nova::Server
450 properties:
451 name: k8s_9
452 image: { get_param: ubuntu_1604_image }
453 flavor: { get_param: k8s_vm_flavor }
454 key_name: onap_key
455 networks:
456 - port: { get_resource: k8s_9_private_port }
457 user_data_format: RAW
458 user_data:
459 str_replace:
460 params:
461 __docker_proxy__: { get_param: docker_proxy }
462 __apt_proxy__: { get_param: apt_proxy }
463 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
464 template:
465 get_file: k8s_vm_entrypoint.sh
466
Gary Wu276d5a42018-06-05 11:26:44 -0700467 k8s_10_private_port:
468 type: OS::Neutron::Port
469 properties:
470 network: { get_resource: oam_network }
471 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
472 security_groups:
473 - { get_resource: onap_sg }
474
475 k8s_10_floating_ip:
476 type: OS::Neutron::FloatingIP
477 properties:
478 floating_network_id: { get_param: public_net_id }
479 port_id: { get_resource: k8s_10_private_port }
480
481 k8s_10_vm:
482 type: OS::Nova::Server
483 properties:
484 name: k8s_10
485 image: { get_param: ubuntu_1604_image }
486 flavor: { get_param: k8s_vm_flavor }
487 key_name: onap_key
488 networks:
489 - port: { get_resource: k8s_10_private_port }
490 user_data_format: RAW
491 user_data:
492 str_replace:
493 params:
494 __docker_proxy__: { get_param: docker_proxy }
495 __apt_proxy__: { get_param: apt_proxy }
496 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
497 template:
498 get_file: k8s_vm_entrypoint.sh
499
500 k8s_11_private_port:
501 type: OS::Neutron::Port
502 properties:
503 network: { get_resource: oam_network }
504 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
505 security_groups:
506 - { get_resource: onap_sg }
507
508 k8s_11_floating_ip:
509 type: OS::Neutron::FloatingIP
510 properties:
511 floating_network_id: { get_param: public_net_id }
512 port_id: { get_resource: k8s_11_private_port }
513
514 k8s_11_vm:
515 type: OS::Nova::Server
516 properties:
517 name: k8s_11
518 image: { get_param: ubuntu_1604_image }
519 flavor: { get_param: k8s_vm_flavor }
520 key_name: onap_key
521 networks:
522 - port: { get_resource: k8s_11_private_port }
523 user_data_format: RAW
524 user_data:
525 str_replace:
526 params:
527 __docker_proxy__: { get_param: docker_proxy }
528 __apt_proxy__: { get_param: apt_proxy }
529 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
530 template:
531 get_file: k8s_vm_entrypoint.sh
532
Gary Wu14ee41d2018-01-19 15:03:59 -0800533outputs:
Gary Wu61034082018-01-22 12:48:50 -0800534 rancher_vm_ip:
535 description: The IP address of the rancher instance
Gary Wu5d325d02018-02-06 21:21:31 -0800536 value: { get_attr: [rancher_floating_ip, floating_ip_address] }
Gary Wu61034082018-01-22 12:48:50 -0800537
Gary Wu36e42dd2018-05-03 07:29:53 -0700538 k8s_1_vm_ip:
539 description: The IP address of the k8s_1 instance
540 value: { get_attr: [k8s_1_floating_ip, floating_ip_address] }
541
542 k8s_2_vm_ip:
543 description: The IP address of the k8s_2 instance
544 value: { get_attr: [k8s_2_floating_ip, floating_ip_address] }
545
546 k8s_3_vm_ip:
547 description: The IP address of the k8s_3 instance
548 value: { get_attr: [k8s_3_floating_ip, floating_ip_address] }
549
550 k8s_4_vm_ip:
551 description: The IP address of the k8s_4 instance
552 value: { get_attr: [k8s_4_floating_ip, floating_ip_address] }
553
554 k8s_5_vm_ip:
555 description: The IP address of the k8s_5 instance
556 value: { get_attr: [k8s_5_floating_ip, floating_ip_address] }
557
558 k8s_6_vm_ip:
559 description: The IP address of the k8s_6 instance
560 value: { get_attr: [k8s_6_floating_ip, floating_ip_address] }
561
562 k8s_7_vm_ip:
563 description: The IP address of the k8s_7 instance
564 value: { get_attr: [k8s_7_floating_ip, floating_ip_address] }
565
Gary Wu7d034582018-05-12 09:08:20 -0700566 k8s_8_vm_ip:
567 description: The IP address of the k8s_8 instance
568 value: { get_attr: [k8s_8_floating_ip, floating_ip_address] }
569
570 k8s_9_vm_ip:
571 description: The IP address of the k8s_9 instance
572 value: { get_attr: [k8s_9_floating_ip, floating_ip_address] }
573
Gary Wu276d5a42018-06-05 11:26:44 -0700574 k8s_10_vm_ip:
575 description: The IP address of the k8s_10 instance
576 value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }
577
578 k8s_11_vm_ip:
579 description: The IP address of the k8s_11 instance
580 value: { get_attr: [k8s_11_floating_ip, floating_ip_address] }
581