blob: 6e1f72ac91d98c09df164dc34b91aa000945de87 [file] [log] [blame]
Gary Wu950a3232019-03-26 13:08:29 -07001#
2# Generated by scripts/gen-onap-oom-yaml.sh; MANUAL CHANGES WILL BE LOST
3#
4heat_template_version: 2015-10-15
5description: ONAP on RKE Kubernetes using OOM
6
7parameters:
8 docker_proxy:
9 type: string
10
11 apt_proxy:
12 type: string
13
14 public_net_id:
15 type: string
16 description: The ID of the Public network for floating IP address allocation
17
18 oam_network_cidr:
19 type: string
20 description: CIDR of the OAM ONAP network
21
22 ubuntu_1804_image:
23 type: string
24 description: Name of the Ubuntu 18.04 image
25
26 rancher_vm_flavor:
27 type: string
28 description: VM flavor for Rancher
29
30 k8s_vm_flavor:
31 type: string
32 description: VM flavor for k8s hosts
33
34 etcd_vm_flavor:
35 type: string
36 description: VM flavor for etcd hosts
37
38 orch_vm_flavor:
39 type: string
40 description: VM flavor for orch hosts
41
42 integration_override_yaml:
43 type: string
44 description: Content for integration_override.yaml
45
46 integration_gerrit_branch:
47 type: string
48 default: "master"
49
50 integration_gerrit_refspec:
51 type: string
52 default: ""
53
54 oom_gerrit_branch:
55 type: string
56 default: "master"
57
58 oom_gerrit_refspec:
59 type: string
60 default: ""
61
62 docker_manifest:
63 type: string
64 default: ""
65
66 key_name:
67 type: string
68 default: "onap_key"
69
70 docker_version:
71 type: string
72 default: "17.03.2"
73
74 rancher_version:
75 type: string
76 default: "1.6.26"
77
78 rancher_agent_version:
79 type: string
80 default: "1.2.11"
81
82 kubectl_version:
83 type: string
84 default: "1.13.4"
85
86 helm_version:
87 type: string
88 default: "2.9.1"
89
90 helm_deploy_delay:
91 type: string
92 default: "3m"
93
94 use_ramdisk:
95 type: string
96 description: Set to "true" if you want to use a RAM disk for /dockerdata-nfs/.
97 default: "false"
98
99 mtu:
100 type: number
101 default: 1500
102
103 portal_hostname:
104 type: string
105 description: The FQDN of the k8s host that will be used for the Portal UI component URLs; this needs to be resolveable at the client
106 default: "portal.api.simpledemo.onap.org"
107
108resources:
109 random-str:
110 type: OS::Heat::RandomString
111 properties:
112 length: 4
113
114 # ONAP security group
115 onap_sg:
116 type: OS::Neutron::SecurityGroup
117 properties:
118 name:
119 str_replace:
120 template: base_rand
121 params:
122 base: onap_sg
123 rand: { get_resource: random-str }
124 description: security group used by ONAP
125 rules:
126 # All egress traffic
127 - direction: egress
128 ethertype: IPv4
129 - direction: egress
130 ethertype: IPv6
131 # ingress traffic
132 # ICMP
133 - protocol: icmp
134 - protocol: udp
135 port_range_min: 1
136 port_range_max: 65535
137 - protocol: tcp
138 port_range_min: 1
139 port_range_max: 65535
140 # Protocols used for vLB/vDNS use case
141 - protocol: 47
142 - protocol: 53
143 - protocol: 132
144
145
146 # ONAP management private network
147 oam_network:
148 type: OS::Neutron::Net
149 properties:
150 name:
151 str_replace:
152 template: oam_network_rand
153 params:
154 rand: { get_resource: random-str }
155
156 oam_subnet:
157 type: OS::Neutron::Subnet
158 properties:
159 name:
160 str_replace:
161 template: oam_network_rand
162 params:
163 rand: { get_resource: random-str }
164 network_id: { get_resource: oam_network }
165 cidr: { get_param: oam_network_cidr }
166 dns_nameservers: [ "8.8.8.8" ]
167
168 router:
169 type: OS::Neutron::Router
170 properties:
171 name:
172 list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
173 external_gateway_info:
174 network: { get_param: public_net_id }
175
176 router_interface:
177 type: OS::Neutron::RouterInterface
178 properties:
179 router_id: { get_resource: router }
180 subnet_id: { get_resource: oam_subnet }
181
182 rancher_private_port:
183 type: OS::Neutron::Port
184 properties:
185 network: { get_resource: oam_network }
186 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
187 security_groups:
188 - { get_resource: onap_sg }
189
190 rancher_floating_ip:
191 type: OS::Neutron::FloatingIP
192 properties:
193 floating_network_id: { get_param: public_net_id }
194 port_id: { get_resource: rancher_private_port }
195
196 rancher_vm:
197 type: OS::Nova::Server
198 properties:
199 name:
200 list_join: ['-', [{ get_param: 'OS::stack_name' }, 'rancher']]
201 image: { get_param: ubuntu_1804_image }
202 flavor: { get_param: rancher_vm_flavor }
203 key_name: { get_param: key_name }
204 networks:
205 - port: { get_resource: rancher_private_port }
206 user_data_format: RAW
207 user_data:
208 str_replace:
209 template:
210 get_file: rancher_vm_entrypoint.sh
211 params:
212 __docker_proxy__: { get_param: docker_proxy }
213 __apt_proxy__: { get_param: apt_proxy }
214 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
215 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
216 __integration_override_yaml__: { get_param: integration_override_yaml }
217 __integration_gerrit_branch__: { get_param: integration_gerrit_branch }
218 __integration_gerrit_refspec__: { get_param: integration_gerrit_refspec }
219 __oom_gerrit_branch__: { get_param: oom_gerrit_branch }
220 __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec }
221 __docker_manifest__: { get_param: docker_manifest }
222 __docker_version__: { get_param: docker_version }
223 __rancher_version__: { get_param: rancher_version }
224 __rancher_agent_version__: { get_param: rancher_agent_version }
225 __kubectl_version__: { get_param: kubectl_version }
226 __helm_version__: { get_param: helm_version }
227 __helm_deploy_delay__: { get_param: helm_deploy_delay }
228 __use_ramdisk__: { get_param: use_ramdisk }
229 __mtu__: { get_param: mtu }
230 __portal_hostname__: { get_param: portal_hostname }
231 __public_net_id__: { get_param: public_net_id }
232 __oam_network_cidr__: { get_param: oam_network_cidr }
233 __oam_network_id__: { get_resource: oam_network }
234 __oam_subnet_id__: { get_resource: oam_subnet }
235 __sec_group__: { get_resource: onap_sg }
236 __k8s_01_vm_ip__: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
237 __k8s_vm_ips__: [
238 get_attr: [k8s_01_floating_ip, floating_ip_address],
239 get_attr: [k8s_02_floating_ip, floating_ip_address],
240 get_attr: [k8s_03_floating_ip, floating_ip_address],
241 get_attr: [k8s_04_floating_ip, floating_ip_address],
242 get_attr: [k8s_05_floating_ip, floating_ip_address],
243 get_attr: [k8s_06_floating_ip, floating_ip_address],
244 ]
245 __k8s_private_ips__: [
246 get_attr: [k8s_01_floating_ip, fixed_ip_address],
247 get_attr: [k8s_02_floating_ip, fixed_ip_address],
248 get_attr: [k8s_03_floating_ip, fixed_ip_address],
249 get_attr: [k8s_04_floating_ip, fixed_ip_address],
250 get_attr: [k8s_05_floating_ip, fixed_ip_address],
251 get_attr: [k8s_06_floating_ip, fixed_ip_address],
252 ]
253 k8s_01_private_port:
254 type: OS::Neutron::Port
255 properties:
256 network: { get_resource: oam_network }
257 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
258 security_groups:
259 - { get_resource: onap_sg }
260
261 k8s_01_floating_ip:
262 type: OS::Neutron::FloatingIP
263 properties:
264 floating_network_id: { get_param: public_net_id }
265 port_id: { get_resource: k8s_01_private_port }
266
267 k8s_01_vm_scripts:
268 type: OS::Heat::CloudConfig
269 properties:
270 cloud_config:
271 power_state:
272 mode: reboot
273 runcmd:
274 - [ /opt/k8s_vm_install.sh ]
275 write_files:
276 - path: /opt/k8s_vm_install.sh
277 permissions: '0755'
278 content:
279 str_replace:
280 params:
281 __docker_proxy__: { get_param: docker_proxy }
282 __apt_proxy__: { get_param: apt_proxy }
283 __docker_version__: { get_param: docker_version }
284 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
285 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
286 __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
287 __mtu__: { get_param: mtu }
288 template:
289 get_file: k8s_vm_install.sh
290 - path: /opt/k8s_vm_init.sh
291 permissions: '0755'
292 content:
293 str_replace:
294 params:
295 __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
296 __host_label__: 'compute'
297 template:
298 get_file: k8s_vm_init.sh
299 - path: /etc/init.d/k8s_vm_init_serv
300 permissions: '0755'
301 content:
302 get_file: k8s_vm_init_serv.sh
303
304 k8s_01_vm_config:
305 type: OS::Heat::MultipartMime
306 properties:
307 parts:
308 - config: { get_resource: k8s_01_vm_scripts }
309
310 k8s_01_vm:
311 type: OS::Nova::Server
312 properties:
313 name:
314 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '01' ] ]
315 image: { get_param: ubuntu_1804_image }
316 flavor: { get_param: k8s_vm_flavor }
317 key_name: { get_param: key_name }
318 networks:
319 - port: { get_resource: k8s_01_private_port }
320 user_data_format: SOFTWARE_CONFIG
321 user_data: { get_resource: k8s_01_vm_config }
322
323 k8s_02_private_port:
324 type: OS::Neutron::Port
325 properties:
326 network: { get_resource: oam_network }
327 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
328 security_groups:
329 - { get_resource: onap_sg }
330
331 k8s_02_floating_ip:
332 type: OS::Neutron::FloatingIP
333 properties:
334 floating_network_id: { get_param: public_net_id }
335 port_id: { get_resource: k8s_02_private_port }
336
337 k8s_02_vm_scripts:
338 type: OS::Heat::CloudConfig
339 properties:
340 cloud_config:
341 power_state:
342 mode: reboot
343 runcmd:
344 - [ /opt/k8s_vm_install.sh ]
345 write_files:
346 - path: /opt/k8s_vm_install.sh
347 permissions: '0755'
348 content:
349 str_replace:
350 params:
351 __docker_proxy__: { get_param: docker_proxy }
352 __apt_proxy__: { get_param: apt_proxy }
353 __docker_version__: { get_param: docker_version }
354 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
355 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
356 __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
357 __mtu__: { get_param: mtu }
358 template:
359 get_file: k8s_vm_install.sh
360 - path: /opt/k8s_vm_init.sh
361 permissions: '0755'
362 content:
363 str_replace:
364 params:
365 __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
366 __host_label__: 'compute'
367 template:
368 get_file: k8s_vm_init.sh
369 - path: /etc/init.d/k8s_vm_init_serv
370 permissions: '0755'
371 content:
372 get_file: k8s_vm_init_serv.sh
373
374 k8s_02_vm_config:
375 type: OS::Heat::MultipartMime
376 properties:
377 parts:
378 - config: { get_resource: k8s_02_vm_scripts }
379
380 k8s_02_vm:
381 type: OS::Nova::Server
382 properties:
383 name:
384 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '02' ] ]
385 image: { get_param: ubuntu_1804_image }
386 flavor: { get_param: k8s_vm_flavor }
387 key_name: { get_param: key_name }
388 networks:
389 - port: { get_resource: k8s_02_private_port }
390 user_data_format: SOFTWARE_CONFIG
391 user_data: { get_resource: k8s_02_vm_config }
392
393 k8s_03_private_port:
394 type: OS::Neutron::Port
395 properties:
396 network: { get_resource: oam_network }
397 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
398 security_groups:
399 - { get_resource: onap_sg }
400
401 k8s_03_floating_ip:
402 type: OS::Neutron::FloatingIP
403 properties:
404 floating_network_id: { get_param: public_net_id }
405 port_id: { get_resource: k8s_03_private_port }
406
407 k8s_03_vm_scripts:
408 type: OS::Heat::CloudConfig
409 properties:
410 cloud_config:
411 power_state:
412 mode: reboot
413 runcmd:
414 - [ /opt/k8s_vm_install.sh ]
415 write_files:
416 - path: /opt/k8s_vm_install.sh
417 permissions: '0755'
418 content:
419 str_replace:
420 params:
421 __docker_proxy__: { get_param: docker_proxy }
422 __apt_proxy__: { get_param: apt_proxy }
423 __docker_version__: { get_param: docker_version }
424 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
425 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
426 __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
427 __mtu__: { get_param: mtu }
428 template:
429 get_file: k8s_vm_install.sh
430 - path: /opt/k8s_vm_init.sh
431 permissions: '0755'
432 content:
433 str_replace:
434 params:
435 __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
436 __host_label__: 'compute'
437 template:
438 get_file: k8s_vm_init.sh
439 - path: /etc/init.d/k8s_vm_init_serv
440 permissions: '0755'
441 content:
442 get_file: k8s_vm_init_serv.sh
443
444 k8s_03_vm_config:
445 type: OS::Heat::MultipartMime
446 properties:
447 parts:
448 - config: { get_resource: k8s_03_vm_scripts }
449
450 k8s_03_vm:
451 type: OS::Nova::Server
452 properties:
453 name:
454 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '03' ] ]
455 image: { get_param: ubuntu_1804_image }
456 flavor: { get_param: k8s_vm_flavor }
457 key_name: { get_param: key_name }
458 networks:
459 - port: { get_resource: k8s_03_private_port }
460 user_data_format: SOFTWARE_CONFIG
461 user_data: { get_resource: k8s_03_vm_config }
462
463 k8s_04_private_port:
464 type: OS::Neutron::Port
465 properties:
466 network: { get_resource: oam_network }
467 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
468 security_groups:
469 - { get_resource: onap_sg }
470
471 k8s_04_floating_ip:
472 type: OS::Neutron::FloatingIP
473 properties:
474 floating_network_id: { get_param: public_net_id }
475 port_id: { get_resource: k8s_04_private_port }
476
477 k8s_04_vm_scripts:
478 type: OS::Heat::CloudConfig
479 properties:
480 cloud_config:
481 power_state:
482 mode: reboot
483 runcmd:
484 - [ /opt/k8s_vm_install.sh ]
485 write_files:
486 - path: /opt/k8s_vm_install.sh
487 permissions: '0755'
488 content:
489 str_replace:
490 params:
491 __docker_proxy__: { get_param: docker_proxy }
492 __apt_proxy__: { get_param: apt_proxy }
493 __docker_version__: { get_param: docker_version }
494 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
495 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
496 __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
497 __mtu__: { get_param: mtu }
498 template:
499 get_file: k8s_vm_install.sh
500 - path: /opt/k8s_vm_init.sh
501 permissions: '0755'
502 content:
503 str_replace:
504 params:
505 __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
506 __host_label__: 'compute'
507 template:
508 get_file: k8s_vm_init.sh
509 - path: /etc/init.d/k8s_vm_init_serv
510 permissions: '0755'
511 content:
512 get_file: k8s_vm_init_serv.sh
513
514 k8s_04_vm_config:
515 type: OS::Heat::MultipartMime
516 properties:
517 parts:
518 - config: { get_resource: k8s_04_vm_scripts }
519
520 k8s_04_vm:
521 type: OS::Nova::Server
522 properties:
523 name:
524 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '04' ] ]
525 image: { get_param: ubuntu_1804_image }
526 flavor: { get_param: k8s_vm_flavor }
527 key_name: { get_param: key_name }
528 networks:
529 - port: { get_resource: k8s_04_private_port }
530 user_data_format: SOFTWARE_CONFIG
531 user_data: { get_resource: k8s_04_vm_config }
532
533 k8s_05_private_port:
534 type: OS::Neutron::Port
535 properties:
536 network: { get_resource: oam_network }
537 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
538 security_groups:
539 - { get_resource: onap_sg }
540
541 k8s_05_floating_ip:
542 type: OS::Neutron::FloatingIP
543 properties:
544 floating_network_id: { get_param: public_net_id }
545 port_id: { get_resource: k8s_05_private_port }
546
547 k8s_05_vm_scripts:
548 type: OS::Heat::CloudConfig
549 properties:
550 cloud_config:
551 power_state:
552 mode: reboot
553 runcmd:
554 - [ /opt/k8s_vm_install.sh ]
555 write_files:
556 - path: /opt/k8s_vm_install.sh
557 permissions: '0755'
558 content:
559 str_replace:
560 params:
561 __docker_proxy__: { get_param: docker_proxy }
562 __apt_proxy__: { get_param: apt_proxy }
563 __docker_version__: { get_param: docker_version }
564 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
565 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
566 __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
567 __mtu__: { get_param: mtu }
568 template:
569 get_file: k8s_vm_install.sh
570 - path: /opt/k8s_vm_init.sh
571 permissions: '0755'
572 content:
573 str_replace:
574 params:
575 __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
576 __host_label__: 'compute'
577 template:
578 get_file: k8s_vm_init.sh
579 - path: /etc/init.d/k8s_vm_init_serv
580 permissions: '0755'
581 content:
582 get_file: k8s_vm_init_serv.sh
583
584 k8s_05_vm_config:
585 type: OS::Heat::MultipartMime
586 properties:
587 parts:
588 - config: { get_resource: k8s_05_vm_scripts }
589
590 k8s_05_vm:
591 type: OS::Nova::Server
592 properties:
593 name:
594 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '05' ] ]
595 image: { get_param: ubuntu_1804_image }
596 flavor: { get_param: k8s_vm_flavor }
597 key_name: { get_param: key_name }
598 networks:
599 - port: { get_resource: k8s_05_private_port }
600 user_data_format: SOFTWARE_CONFIG
601 user_data: { get_resource: k8s_05_vm_config }
602
603 k8s_06_private_port:
604 type: OS::Neutron::Port
605 properties:
606 network: { get_resource: oam_network }
607 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
608 security_groups:
609 - { get_resource: onap_sg }
610
611 k8s_06_floating_ip:
612 type: OS::Neutron::FloatingIP
613 properties:
614 floating_network_id: { get_param: public_net_id }
615 port_id: { get_resource: k8s_06_private_port }
616
617 k8s_06_vm_scripts:
618 type: OS::Heat::CloudConfig
619 properties:
620 cloud_config:
621 power_state:
622 mode: reboot
623 runcmd:
624 - [ /opt/k8s_vm_install.sh ]
625 write_files:
626 - path: /opt/k8s_vm_install.sh
627 permissions: '0755'
628 content:
629 str_replace:
630 params:
631 __docker_proxy__: { get_param: docker_proxy }
632 __apt_proxy__: { get_param: apt_proxy }
633 __docker_version__: { get_param: docker_version }
634 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
635 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
636 __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
637 __mtu__: { get_param: mtu }
638 template:
639 get_file: k8s_vm_install.sh
640 - path: /opt/k8s_vm_init.sh
641 permissions: '0755'
642 content:
643 str_replace:
644 params:
645 __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
646 __host_label__: 'compute'
647 template:
648 get_file: k8s_vm_init.sh
649 - path: /etc/init.d/k8s_vm_init_serv
650 permissions: '0755'
651 content:
652 get_file: k8s_vm_init_serv.sh
653
654 k8s_06_vm_config:
655 type: OS::Heat::MultipartMime
656 properties:
657 parts:
658 - config: { get_resource: k8s_06_vm_scripts }
659
660 k8s_06_vm:
661 type: OS::Nova::Server
662 properties:
663 name:
664 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '06' ] ]
665 image: { get_param: ubuntu_1804_image }
666 flavor: { get_param: k8s_vm_flavor }
667 key_name: { get_param: key_name }
668 networks:
669 - port: { get_resource: k8s_06_private_port }
670 user_data_format: SOFTWARE_CONFIG
671 user_data: { get_resource: k8s_06_vm_config }
672
673 orch_1_private_port:
674 type: OS::Neutron::Port
675 properties:
676 network: { get_resource: oam_network }
677 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
678 security_groups:
679 - { get_resource: onap_sg }
680
681 orch_1_floating_ip:
682 type: OS::Neutron::FloatingIP
683 properties:
684 floating_network_id: { get_param: public_net_id }
685 port_id: { get_resource: orch_1_private_port }
686
687 orch_1_vm_scripts:
688 type: OS::Heat::CloudConfig
689 properties:
690 cloud_config:
691 power_state:
692 mode: reboot
693 runcmd:
694 - [ /opt/k8s_vm_install.sh ]
695 write_files:
696 - path: /opt/k8s_vm_install.sh
697 permissions: '0755'
698 content:
699 str_replace:
700 params:
701 __docker_proxy__: { get_param: docker_proxy }
702 __apt_proxy__: { get_param: apt_proxy }
703 __docker_version__: { get_param: docker_version }
704 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
705 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
706 __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
707 __mtu__: { get_param: mtu }
708 template:
709 get_file: k8s_vm_install.sh
710 - path: /opt/k8s_vm_init.sh
711 permissions: '0755'
712 content:
713 str_replace:
714 params:
715 __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
716 __host_label__: 'orchestration'
717 template:
718 get_file: k8s_vm_init.sh
719 - path: /etc/init.d/k8s_vm_init_serv
720 permissions: '0755'
721 content:
722 get_file: k8s_vm_init_serv.sh
723
724 orch_1_vm_config:
725 type: OS::Heat::MultipartMime
726 properties:
727 parts:
728 - config: { get_resource: orch_1_vm_scripts }
729
730 orch_1_vm:
731 type: OS::Nova::Server
732 properties:
733 name:
734 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '1' ] ]
735 image: { get_param: ubuntu_1804_image }
736 flavor: { get_param: orch_vm_flavor }
737 key_name: { get_param: key_name }
738 networks:
739 - port: { get_resource: orch_1_private_port }
740 user_data_format: SOFTWARE_CONFIG
741 user_data: { get_resource: orch_1_vm_config }
742
743 orch_2_private_port:
744 type: OS::Neutron::Port
745 properties:
746 network: { get_resource: oam_network }
747 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
748 security_groups:
749 - { get_resource: onap_sg }
750
751 orch_2_floating_ip:
752 type: OS::Neutron::FloatingIP
753 properties:
754 floating_network_id: { get_param: public_net_id }
755 port_id: { get_resource: orch_2_private_port }
756
757 orch_2_vm_scripts:
758 type: OS::Heat::CloudConfig
759 properties:
760 cloud_config:
761 power_state:
762 mode: reboot
763 runcmd:
764 - [ /opt/k8s_vm_install.sh ]
765 write_files:
766 - path: /opt/k8s_vm_install.sh
767 permissions: '0755'
768 content:
769 str_replace:
770 params:
771 __docker_proxy__: { get_param: docker_proxy }
772 __apt_proxy__: { get_param: apt_proxy }
773 __docker_version__: { get_param: docker_version }
774 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
775 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
776 __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
777 __mtu__: { get_param: mtu }
778 template:
779 get_file: k8s_vm_install.sh
780 - path: /opt/k8s_vm_init.sh
781 permissions: '0755'
782 content:
783 str_replace:
784 params:
785 __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
786 __host_label__: 'orchestration'
787 template:
788 get_file: k8s_vm_init.sh
789 - path: /etc/init.d/k8s_vm_init_serv
790 permissions: '0755'
791 content:
792 get_file: k8s_vm_init_serv.sh
793
794 orch_2_vm_config:
795 type: OS::Heat::MultipartMime
796 properties:
797 parts:
798 - config: { get_resource: orch_2_vm_scripts }
799
800 orch_2_vm:
801 type: OS::Nova::Server
802 properties:
803 name:
804 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '2' ] ]
805 image: { get_param: ubuntu_1804_image }
806 flavor: { get_param: orch_vm_flavor }
807 key_name: { get_param: key_name }
808 networks:
809 - port: { get_resource: orch_2_private_port }
810 user_data_format: SOFTWARE_CONFIG
811 user_data: { get_resource: orch_2_vm_config }
812
813 orch_3_private_port:
814 type: OS::Neutron::Port
815 properties:
816 network: { get_resource: oam_network }
817 fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
818 security_groups:
819 - { get_resource: onap_sg }
820
821 orch_3_floating_ip:
822 type: OS::Neutron::FloatingIP
823 properties:
824 floating_network_id: { get_param: public_net_id }
825 port_id: { get_resource: orch_3_private_port }
826
827 orch_3_vm_scripts:
828 type: OS::Heat::CloudConfig
829 properties:
830 cloud_config:
831 power_state:
832 mode: reboot
833 runcmd:
834 - [ /opt/k8s_vm_install.sh ]
835 write_files:
836 - path: /opt/k8s_vm_install.sh
837 permissions: '0755'
838 content:
839 str_replace:
840 params:
841 __docker_proxy__: { get_param: docker_proxy }
842 __apt_proxy__: { get_param: apt_proxy }
843 __docker_version__: { get_param: docker_version }
844 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
845 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
846 __host_private_ip_addr__: { get_attr: [orch_3_floating_ip, fixed_ip_address] }
847 __mtu__: { get_param: mtu }
848 template:
849 get_file: k8s_vm_install.sh
850 - path: /opt/k8s_vm_init.sh
851 permissions: '0755'
852 content:
853 str_replace:
854 params:
855 __host_private_ip_addr__: { get_attr: [orch_3_floating_ip, fixed_ip_address] }
856 __host_label__: 'orchestration'
857 template:
858 get_file: k8s_vm_init.sh
859 - path: /etc/init.d/k8s_vm_init_serv
860 permissions: '0755'
861 content:
862 get_file: k8s_vm_init_serv.sh
863
864 orch_3_vm_config:
865 type: OS::Heat::MultipartMime
866 properties:
867 parts:
868 - config: { get_resource: orch_3_vm_scripts }
869
870 orch_3_vm:
871 type: OS::Nova::Server
872 properties:
873 name:
874 list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '3' ] ]
875 image: { get_param: ubuntu_1804_image }
876 flavor: { get_param: orch_vm_flavor }
877 key_name: { get_param: key_name }
878 networks:
879 - port: { get_resource: orch_3_private_port }
880 user_data_format: SOFTWARE_CONFIG
881 user_data: { get_resource: orch_3_vm_config }
882
883outputs:
Gary Wu0bc69832019-03-27 13:58:46 -0700884 docker_proxy:
885 value: { get_param: docker_proxy }
886
Gary Wu950a3232019-03-26 13:08:29 -0700887 rancher_vm_ip:
888 description: The IP address of the rancher instance
889 value: { get_attr: [rancher_floating_ip, floating_ip_address] }
890
891 k8s_01_vm_ip:
892 description: The IP address of the k8s_01 instance
893 value: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
894
895 k8s_01_vm_private_ip:
896 description: The private IP address of the k8s_01 instance
897 value: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
898
899 k8s_02_vm_ip:
900 description: The IP address of the k8s_02 instance
901 value: { get_attr: [k8s_02_floating_ip, floating_ip_address] }
902
903 k8s_02_vm_private_ip:
904 description: The private IP address of the k8s_02 instance
905 value: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
906
907 k8s_03_vm_ip:
908 description: The IP address of the k8s_03 instance
909 value: { get_attr: [k8s_03_floating_ip, floating_ip_address] }
910
911 k8s_03_vm_private_ip:
912 description: The private IP address of the k8s_03 instance
913 value: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
914
915 k8s_04_vm_ip:
916 description: The IP address of the k8s_04 instance
917 value: { get_attr: [k8s_04_floating_ip, floating_ip_address] }
918
919 k8s_04_vm_private_ip:
920 description: The private IP address of the k8s_04 instance
921 value: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
922
923 k8s_05_vm_ip:
924 description: The IP address of the k8s_05 instance
925 value: { get_attr: [k8s_05_floating_ip, floating_ip_address] }
926
927 k8s_05_vm_private_ip:
928 description: The private IP address of the k8s_05 instance
929 value: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
930
931 k8s_06_vm_ip:
932 description: The IP address of the k8s_06 instance
933 value: { get_attr: [k8s_06_floating_ip, floating_ip_address] }
934
935 k8s_06_vm_private_ip:
936 description: The private IP address of the k8s_06 instance
937 value: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
938
939 orch_1_vm_ip:
940 description: The IP address of the orch_1 instance
941 value: { get_attr: [orch_1_floating_ip, floating_ip_address] }
942
943 orch_1_vm_private_ip:
944 description: The private IP address of the orch_1 instance
945 value: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
946
947 orch_2_vm_ip:
948 description: The IP address of the orch_2 instance
949 value: { get_attr: [orch_2_floating_ip, floating_ip_address] }
950
951 orch_2_vm_private_ip:
952 description: The private IP address of the orch_2 instance
953 value: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
954
955 orch_3_vm_ip:
956 description: The IP address of the orch_3 instance
957 value: { get_attr: [orch_3_floating_ip, floating_ip_address] }
958
959 orch_3_vm_private_ip:
960 description: The private IP address of the orch_3 instance
961 value: { get_attr: [orch_3_floating_ip, fixed_ip_address] }
962