Bump infra components version up
[integration.git] / deployment / heat / onap-rke / onap-oom.yaml
1 #
2 # Generated by scripts/gen-onap-oom-yaml.sh; MANUAL CHANGES WILL BE LOST
3 #
4 heat_template_version: 2015-10-15
5 description: ONAP on RKE Kubernetes using OOM
6
7 parameters:
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   oam_ext_network_cidr:
23     type: string
24     description: CIDR of the onap_oam_ext network
25
26   oam_ext_network_host_route:
27     type: json
28     description: >
29         host routes
30         "destination": '10.12.0.0/16'
31         "nexthop": '10.100.0.1'
32     default:
33         "destination": '10.12.0.0/16'
34         "nexthop": '10.100.0.1'
35
36   ubuntu_1804_image:
37     type: string
38     description: Name of the Ubuntu 18.04 image
39
40   nfs_vm_flavor:
41     type: string
42     description: VM flavor for Nfs
43
44   k8s_vm_flavor:
45     type: string
46     description: VM flavor for k8s hosts
47
48   orch_vm_flavor:
49     type: string
50     description: VM flavor for orch hosts
51
52   integration_override_yaml:
53     type: string
54     description: Content for integration_override.yaml
55
56   integration_gerrit_branch:
57     type: string
58     default: "master"
59
60   integration_gerrit_refspec:
61     type: string
62     default: ""
63
64   oom_gerrit_branch:
65     type: string
66     default: "master"
67
68   oom_gerrit_refspec:
69     type: string
70     default: ""
71
72   key_name:
73     type: string
74     default: "onap_key"
75
76   docker_version:
77     type: string
78     default: "18.09.5"
79
80   kubectl_version:
81     type: string
82     default: "1.15.3"
83
84   helm_version:
85     type: string
86     default: "2.14.2"
87
88   helm_deploy_delay:
89     type: string
90     default: "3m"
91
92   mtu:
93     type: number
94     default: 1500
95
96   portal_hostname:
97     type: string
98     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
99     default: "portal.api.simpledemo.onap.org"
100
101 resources:
102   random-str:
103     type: OS::Heat::RandomString
104     properties:
105       length: 4
106
107   # ONAP security group
108   onap_sg:
109     type: OS::Neutron::SecurityGroup
110     properties:
111       name:
112         str_replace:
113           template: base_rand
114           params:
115             base: onap_sg
116             rand: { get_resource: random-str }
117       description: security group used by ONAP
118       rules:
119         # All egress traffic
120         - direction: egress
121           ethertype: IPv4
122         - direction: egress
123           ethertype: IPv6
124         # ingress traffic
125         # ICMP
126         - protocol: icmp
127         - protocol: udp
128           port_range_min: 1
129           port_range_max: 65535
130         - protocol: tcp
131           port_range_min: 1
132           port_range_max: 65535
133         # Protocols used for vLB/vDNS use case
134         - protocol: 47
135         - protocol: 53
136         - protocol: 132
137
138   router:
139     type: OS::Neutron::Router
140     properties:
141       name:
142         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
143       external_gateway_info:
144         network: { get_param: public_net_id }
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   oam_router_interface:
169     type: OS::Neutron::RouterInterface
170     properties:
171       router_id: { get_resource: router }
172       subnet_id: { get_resource: oam_subnet }
173
174   oam_ext_network:
175     type: OS::Neutron::Net
176     properties:
177       name: onap_oam_ext
178
179   oam_ext_subnet:
180     type: OS::Neutron::Subnet
181     properties:
182       name: onap_oam_ext
183       network_id: { get_resource: oam_ext_network }
184       cidr: { get_param: oam_ext_network_cidr }
185       enable_dhcp: true
186       host_routes:
187       - { get_param: oam_ext_network_host_route }
188       dns_nameservers: [ "8.8.8.8" ]
189
190   oam_ext_router_interface:
191     type: OS::Neutron::RouterInterface
192     properties:
193       router_id: { get_resource: router }
194       subnet_id: { get_resource: oam_ext_subnet }
195
196   nfs_private_port:
197     type: OS::Neutron::Port
198     properties:
199       network: { get_resource: oam_network }
200       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
201       security_groups:
202       - { get_resource: onap_sg }
203
204   nfs_floating_ip:
205     type: OS::Neutron::FloatingIP
206     properties:
207       floating_network_id: { get_param: public_net_id }
208       port_id: { get_resource: nfs_private_port }
209   nfs_volume:
210     type: OS::Cinder::Volume
211     properties:
212       size: 200
213
214   nfs_volume_att:
215     type: OS::Cinder::VolumeAttachment
216     properties:
217       instance_uuid: { get_resource: nfs_vm }
218       volume_id: { get_resource: nfs_volume }
219
220   nfs_vm:
221     type: OS::Nova::Server
222     properties:
223       name:
224         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'nfs']]
225       image: { get_param: ubuntu_1804_image }
226       flavor: { get_param: nfs_vm_flavor }
227       key_name: { get_param: key_name }
228       networks:
229       - port: { get_resource: nfs_private_port }
230       user_data_format: RAW
231       user_data:
232         str_replace:
233           template:
234             get_file: nfs_vm_entrypoint.sh
235           params:
236             __nfs_volume_id__: { get_resource: nfs_volume }
237             __docker_proxy__: { get_param: docker_proxy }
238             __apt_proxy__: { get_param: apt_proxy }
239             __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
240             __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
241             __integration_override_yaml__: { get_param: integration_override_yaml }
242             __integration_gerrit_branch__: { get_param: integration_gerrit_branch }
243             __integration_gerrit_refspec__: { get_param: integration_gerrit_refspec }
244             __oom_gerrit_branch__: { get_param: oom_gerrit_branch }
245             __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec }
246             __docker_version__: { get_param: docker_version }
247             __kubectl_version__: { get_param: kubectl_version }
248             __helm_version__: { get_param: helm_version }
249             __helm_deploy_delay__: { get_param: helm_deploy_delay }
250             __mtu__: { get_param: mtu }
251             __portal_hostname__: { get_param: portal_hostname }
252             __public_net_id__: { get_param: public_net_id }
253             __oam_network_cidr__: { get_param: oam_network_cidr }
254             __oam_network_id__: { get_resource: oam_network }
255             __oam_subnet_id__: { get_resource: oam_subnet }
256             __sec_group__: { get_resource: onap_sg }
257             __k8s_01_vm_ip__: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
258             __k8s_vm_ips__: [
259               get_attr: [k8s_01_floating_ip, floating_ip_address],
260               get_attr: [k8s_02_floating_ip, floating_ip_address],
261               get_attr: [k8s_03_floating_ip, floating_ip_address],
262               get_attr: [k8s_04_floating_ip, floating_ip_address],
263               get_attr: [k8s_05_floating_ip, floating_ip_address],
264               get_attr: [k8s_06_floating_ip, floating_ip_address],
265               get_attr: [k8s_07_floating_ip, floating_ip_address],
266               get_attr: [k8s_08_floating_ip, floating_ip_address],
267               get_attr: [k8s_09_floating_ip, floating_ip_address],
268             ]
269             __k8s_private_ips__: [
270               get_attr: [k8s_01_floating_ip, fixed_ip_address],
271               get_attr: [k8s_02_floating_ip, fixed_ip_address],
272               get_attr: [k8s_03_floating_ip, fixed_ip_address],
273               get_attr: [k8s_04_floating_ip, fixed_ip_address],
274               get_attr: [k8s_05_floating_ip, fixed_ip_address],
275               get_attr: [k8s_06_floating_ip, fixed_ip_address],
276               get_attr: [k8s_07_floating_ip, fixed_ip_address],
277               get_attr: [k8s_08_floating_ip, fixed_ip_address],
278               get_attr: [k8s_09_floating_ip, fixed_ip_address],
279             ]
280   k8s_01_private_port:
281     type: OS::Neutron::Port
282     properties:
283       network: { get_resource: oam_network }
284       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
285       security_groups:
286       - { get_resource: onap_sg }
287
288   k8s_01_floating_ip:
289     type: OS::Neutron::FloatingIP
290     properties:
291       floating_network_id: { get_param: public_net_id }
292       port_id: { get_resource: k8s_01_private_port }
293
294   k8s_01_vm_scripts:
295     type: OS::Heat::CloudConfig
296     properties:
297       cloud_config:
298         power_state:
299           mode: reboot
300         runcmd:
301         - [ /opt/k8s_vm_install.sh ]
302         write_files:
303         - path: /opt/k8s_vm_install.sh
304           permissions: '0755'
305           content:
306             str_replace:
307               params:
308                 __docker_proxy__: { get_param: docker_proxy }
309                 __apt_proxy__: { get_param: apt_proxy }
310                 __docker_version__: { get_param: docker_version }
311                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
312                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
313                 __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
314                 __mtu__: { get_param: mtu }
315               template:
316                 get_file: k8s_vm_install.sh
317         - path: /opt/k8s_vm_init.sh
318           permissions: '0755'
319           content:
320             str_replace:
321               params:
322                 __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
323                 __host_label__: 'compute'
324               template:
325                 get_file: k8s_vm_init.sh
326         - path: /etc/init.d/k8s_vm_init_serv
327           permissions: '0755'
328           content:
329             get_file: k8s_vm_init_serv.sh
330
331   k8s_01_vm_config:
332     type: OS::Heat::MultipartMime
333     properties:
334       parts:
335       - config: { get_resource: k8s_01_vm_scripts }
336
337   k8s_01_vm:
338     type: OS::Nova::Server
339     properties:
340       name:
341         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '01' ] ]
342       image: { get_param: ubuntu_1804_image }
343       flavor: { get_param: k8s_vm_flavor }
344       key_name: { get_param: key_name }
345       networks:
346       - port: { get_resource: k8s_01_private_port }
347       user_data_format: SOFTWARE_CONFIG
348       user_data: { get_resource: k8s_01_vm_config }
349   k8s_02_private_port:
350     type: OS::Neutron::Port
351     properties:
352       network: { get_resource: oam_network }
353       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
354       security_groups:
355       - { get_resource: onap_sg }
356
357   k8s_02_floating_ip:
358     type: OS::Neutron::FloatingIP
359     properties:
360       floating_network_id: { get_param: public_net_id }
361       port_id: { get_resource: k8s_02_private_port }
362
363   k8s_02_vm_scripts:
364     type: OS::Heat::CloudConfig
365     properties:
366       cloud_config:
367         power_state:
368           mode: reboot
369         runcmd:
370         - [ /opt/k8s_vm_install.sh ]
371         write_files:
372         - path: /opt/k8s_vm_install.sh
373           permissions: '0755'
374           content:
375             str_replace:
376               params:
377                 __docker_proxy__: { get_param: docker_proxy }
378                 __apt_proxy__: { get_param: apt_proxy }
379                 __docker_version__: { get_param: docker_version }
380                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
381                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
382                 __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
383                 __mtu__: { get_param: mtu }
384               template:
385                 get_file: k8s_vm_install.sh
386         - path: /opt/k8s_vm_init.sh
387           permissions: '0755'
388           content:
389             str_replace:
390               params:
391                 __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
392                 __host_label__: 'compute'
393               template:
394                 get_file: k8s_vm_init.sh
395         - path: /etc/init.d/k8s_vm_init_serv
396           permissions: '0755'
397           content:
398             get_file: k8s_vm_init_serv.sh
399
400   k8s_02_vm_config:
401     type: OS::Heat::MultipartMime
402     properties:
403       parts:
404       - config: { get_resource: k8s_02_vm_scripts }
405
406   k8s_02_vm:
407     type: OS::Nova::Server
408     properties:
409       name:
410         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '02' ] ]
411       image: { get_param: ubuntu_1804_image }
412       flavor: { get_param: k8s_vm_flavor }
413       key_name: { get_param: key_name }
414       networks:
415       - port: { get_resource: k8s_02_private_port }
416       user_data_format: SOFTWARE_CONFIG
417       user_data: { get_resource: k8s_02_vm_config }
418   k8s_03_private_port:
419     type: OS::Neutron::Port
420     properties:
421       network: { get_resource: oam_network }
422       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
423       security_groups:
424       - { get_resource: onap_sg }
425
426   k8s_03_floating_ip:
427     type: OS::Neutron::FloatingIP
428     properties:
429       floating_network_id: { get_param: public_net_id }
430       port_id: { get_resource: k8s_03_private_port }
431
432   k8s_03_vm_scripts:
433     type: OS::Heat::CloudConfig
434     properties:
435       cloud_config:
436         power_state:
437           mode: reboot
438         runcmd:
439         - [ /opt/k8s_vm_install.sh ]
440         write_files:
441         - path: /opt/k8s_vm_install.sh
442           permissions: '0755'
443           content:
444             str_replace:
445               params:
446                 __docker_proxy__: { get_param: docker_proxy }
447                 __apt_proxy__: { get_param: apt_proxy }
448                 __docker_version__: { get_param: docker_version }
449                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
450                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
451                 __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
452                 __mtu__: { get_param: mtu }
453               template:
454                 get_file: k8s_vm_install.sh
455         - path: /opt/k8s_vm_init.sh
456           permissions: '0755'
457           content:
458             str_replace:
459               params:
460                 __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
461                 __host_label__: 'compute'
462               template:
463                 get_file: k8s_vm_init.sh
464         - path: /etc/init.d/k8s_vm_init_serv
465           permissions: '0755'
466           content:
467             get_file: k8s_vm_init_serv.sh
468
469   k8s_03_vm_config:
470     type: OS::Heat::MultipartMime
471     properties:
472       parts:
473       - config: { get_resource: k8s_03_vm_scripts }
474
475   k8s_03_vm:
476     type: OS::Nova::Server
477     properties:
478       name:
479         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '03' ] ]
480       image: { get_param: ubuntu_1804_image }
481       flavor: { get_param: k8s_vm_flavor }
482       key_name: { get_param: key_name }
483       networks:
484       - port: { get_resource: k8s_03_private_port }
485       user_data_format: SOFTWARE_CONFIG
486       user_data: { get_resource: k8s_03_vm_config }
487   k8s_04_private_port:
488     type: OS::Neutron::Port
489     properties:
490       network: { get_resource: oam_network }
491       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
492       security_groups:
493       - { get_resource: onap_sg }
494
495   k8s_04_floating_ip:
496     type: OS::Neutron::FloatingIP
497     properties:
498       floating_network_id: { get_param: public_net_id }
499       port_id: { get_resource: k8s_04_private_port }
500
501   k8s_04_vm_scripts:
502     type: OS::Heat::CloudConfig
503     properties:
504       cloud_config:
505         power_state:
506           mode: reboot
507         runcmd:
508         - [ /opt/k8s_vm_install.sh ]
509         write_files:
510         - path: /opt/k8s_vm_install.sh
511           permissions: '0755'
512           content:
513             str_replace:
514               params:
515                 __docker_proxy__: { get_param: docker_proxy }
516                 __apt_proxy__: { get_param: apt_proxy }
517                 __docker_version__: { get_param: docker_version }
518                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
519                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
520                 __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
521                 __mtu__: { get_param: mtu }
522               template:
523                 get_file: k8s_vm_install.sh
524         - path: /opt/k8s_vm_init.sh
525           permissions: '0755'
526           content:
527             str_replace:
528               params:
529                 __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
530                 __host_label__: 'compute'
531               template:
532                 get_file: k8s_vm_init.sh
533         - path: /etc/init.d/k8s_vm_init_serv
534           permissions: '0755'
535           content:
536             get_file: k8s_vm_init_serv.sh
537
538   k8s_04_vm_config:
539     type: OS::Heat::MultipartMime
540     properties:
541       parts:
542       - config: { get_resource: k8s_04_vm_scripts }
543
544   k8s_04_vm:
545     type: OS::Nova::Server
546     properties:
547       name:
548         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '04' ] ]
549       image: { get_param: ubuntu_1804_image }
550       flavor: { get_param: k8s_vm_flavor }
551       key_name: { get_param: key_name }
552       networks:
553       - port: { get_resource: k8s_04_private_port }
554       user_data_format: SOFTWARE_CONFIG
555       user_data: { get_resource: k8s_04_vm_config }
556   k8s_05_private_port:
557     type: OS::Neutron::Port
558     properties:
559       network: { get_resource: oam_network }
560       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
561       security_groups:
562       - { get_resource: onap_sg }
563
564   k8s_05_floating_ip:
565     type: OS::Neutron::FloatingIP
566     properties:
567       floating_network_id: { get_param: public_net_id }
568       port_id: { get_resource: k8s_05_private_port }
569
570   k8s_05_vm_scripts:
571     type: OS::Heat::CloudConfig
572     properties:
573       cloud_config:
574         power_state:
575           mode: reboot
576         runcmd:
577         - [ /opt/k8s_vm_install.sh ]
578         write_files:
579         - path: /opt/k8s_vm_install.sh
580           permissions: '0755'
581           content:
582             str_replace:
583               params:
584                 __docker_proxy__: { get_param: docker_proxy }
585                 __apt_proxy__: { get_param: apt_proxy }
586                 __docker_version__: { get_param: docker_version }
587                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
588                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
589                 __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
590                 __mtu__: { get_param: mtu }
591               template:
592                 get_file: k8s_vm_install.sh
593         - path: /opt/k8s_vm_init.sh
594           permissions: '0755'
595           content:
596             str_replace:
597               params:
598                 __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
599                 __host_label__: 'compute'
600               template:
601                 get_file: k8s_vm_init.sh
602         - path: /etc/init.d/k8s_vm_init_serv
603           permissions: '0755'
604           content:
605             get_file: k8s_vm_init_serv.sh
606
607   k8s_05_vm_config:
608     type: OS::Heat::MultipartMime
609     properties:
610       parts:
611       - config: { get_resource: k8s_05_vm_scripts }
612
613   k8s_05_vm:
614     type: OS::Nova::Server
615     properties:
616       name:
617         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '05' ] ]
618       image: { get_param: ubuntu_1804_image }
619       flavor: { get_param: k8s_vm_flavor }
620       key_name: { get_param: key_name }
621       networks:
622       - port: { get_resource: k8s_05_private_port }
623       user_data_format: SOFTWARE_CONFIG
624       user_data: { get_resource: k8s_05_vm_config }
625   k8s_06_private_port:
626     type: OS::Neutron::Port
627     properties:
628       network: { get_resource: oam_network }
629       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
630       security_groups:
631       - { get_resource: onap_sg }
632
633   k8s_06_floating_ip:
634     type: OS::Neutron::FloatingIP
635     properties:
636       floating_network_id: { get_param: public_net_id }
637       port_id: { get_resource: k8s_06_private_port }
638
639   k8s_06_vm_scripts:
640     type: OS::Heat::CloudConfig
641     properties:
642       cloud_config:
643         power_state:
644           mode: reboot
645         runcmd:
646         - [ /opt/k8s_vm_install.sh ]
647         write_files:
648         - path: /opt/k8s_vm_install.sh
649           permissions: '0755'
650           content:
651             str_replace:
652               params:
653                 __docker_proxy__: { get_param: docker_proxy }
654                 __apt_proxy__: { get_param: apt_proxy }
655                 __docker_version__: { get_param: docker_version }
656                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
657                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
658                 __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
659                 __mtu__: { get_param: mtu }
660               template:
661                 get_file: k8s_vm_install.sh
662         - path: /opt/k8s_vm_init.sh
663           permissions: '0755'
664           content:
665             str_replace:
666               params:
667                 __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
668                 __host_label__: 'compute'
669               template:
670                 get_file: k8s_vm_init.sh
671         - path: /etc/init.d/k8s_vm_init_serv
672           permissions: '0755'
673           content:
674             get_file: k8s_vm_init_serv.sh
675
676   k8s_06_vm_config:
677     type: OS::Heat::MultipartMime
678     properties:
679       parts:
680       - config: { get_resource: k8s_06_vm_scripts }
681
682   k8s_06_vm:
683     type: OS::Nova::Server
684     properties:
685       name:
686         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '06' ] ]
687       image: { get_param: ubuntu_1804_image }
688       flavor: { get_param: k8s_vm_flavor }
689       key_name: { get_param: key_name }
690       networks:
691       - port: { get_resource: k8s_06_private_port }
692       user_data_format: SOFTWARE_CONFIG
693       user_data: { get_resource: k8s_06_vm_config }
694   k8s_07_private_port:
695     type: OS::Neutron::Port
696     properties:
697       network: { get_resource: oam_network }
698       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
699       security_groups:
700       - { get_resource: onap_sg }
701
702   k8s_07_floating_ip:
703     type: OS::Neutron::FloatingIP
704     properties:
705       floating_network_id: { get_param: public_net_id }
706       port_id: { get_resource: k8s_07_private_port }
707
708   k8s_07_vm_scripts:
709     type: OS::Heat::CloudConfig
710     properties:
711       cloud_config:
712         power_state:
713           mode: reboot
714         runcmd:
715         - [ /opt/k8s_vm_install.sh ]
716         write_files:
717         - path: /opt/k8s_vm_install.sh
718           permissions: '0755'
719           content:
720             str_replace:
721               params:
722                 __docker_proxy__: { get_param: docker_proxy }
723                 __apt_proxy__: { get_param: apt_proxy }
724                 __docker_version__: { get_param: docker_version }
725                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
726                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
727                 __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
728                 __mtu__: { get_param: mtu }
729               template:
730                 get_file: k8s_vm_install.sh
731         - path: /opt/k8s_vm_init.sh
732           permissions: '0755'
733           content:
734             str_replace:
735               params:
736                 __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
737                 __host_label__: 'compute'
738               template:
739                 get_file: k8s_vm_init.sh
740         - path: /etc/init.d/k8s_vm_init_serv
741           permissions: '0755'
742           content:
743             get_file: k8s_vm_init_serv.sh
744
745   k8s_07_vm_config:
746     type: OS::Heat::MultipartMime
747     properties:
748       parts:
749       - config: { get_resource: k8s_07_vm_scripts }
750
751   k8s_07_vm:
752     type: OS::Nova::Server
753     properties:
754       name:
755         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '07' ] ]
756       image: { get_param: ubuntu_1804_image }
757       flavor: { get_param: k8s_vm_flavor }
758       key_name: { get_param: key_name }
759       networks:
760       - port: { get_resource: k8s_07_private_port }
761       user_data_format: SOFTWARE_CONFIG
762       user_data: { get_resource: k8s_07_vm_config }
763   k8s_08_private_port:
764     type: OS::Neutron::Port
765     properties:
766       network: { get_resource: oam_network }
767       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
768       security_groups:
769       - { get_resource: onap_sg }
770
771   k8s_08_floating_ip:
772     type: OS::Neutron::FloatingIP
773     properties:
774       floating_network_id: { get_param: public_net_id }
775       port_id: { get_resource: k8s_08_private_port }
776
777   k8s_08_vm_scripts:
778     type: OS::Heat::CloudConfig
779     properties:
780       cloud_config:
781         power_state:
782           mode: reboot
783         runcmd:
784         - [ /opt/k8s_vm_install.sh ]
785         write_files:
786         - path: /opt/k8s_vm_install.sh
787           permissions: '0755'
788           content:
789             str_replace:
790               params:
791                 __docker_proxy__: { get_param: docker_proxy }
792                 __apt_proxy__: { get_param: apt_proxy }
793                 __docker_version__: { get_param: docker_version }
794                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
795                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
796                 __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
797                 __mtu__: { get_param: mtu }
798               template:
799                 get_file: k8s_vm_install.sh
800         - path: /opt/k8s_vm_init.sh
801           permissions: '0755'
802           content:
803             str_replace:
804               params:
805                 __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
806                 __host_label__: 'compute'
807               template:
808                 get_file: k8s_vm_init.sh
809         - path: /etc/init.d/k8s_vm_init_serv
810           permissions: '0755'
811           content:
812             get_file: k8s_vm_init_serv.sh
813
814   k8s_08_vm_config:
815     type: OS::Heat::MultipartMime
816     properties:
817       parts:
818       - config: { get_resource: k8s_08_vm_scripts }
819
820   k8s_08_vm:
821     type: OS::Nova::Server
822     properties:
823       name:
824         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '08' ] ]
825       image: { get_param: ubuntu_1804_image }
826       flavor: { get_param: k8s_vm_flavor }
827       key_name: { get_param: key_name }
828       networks:
829       - port: { get_resource: k8s_08_private_port }
830       user_data_format: SOFTWARE_CONFIG
831       user_data: { get_resource: k8s_08_vm_config }
832   k8s_09_private_port:
833     type: OS::Neutron::Port
834     properties:
835       network: { get_resource: oam_network }
836       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
837       security_groups:
838       - { get_resource: onap_sg }
839
840   k8s_09_floating_ip:
841     type: OS::Neutron::FloatingIP
842     properties:
843       floating_network_id: { get_param: public_net_id }
844       port_id: { get_resource: k8s_09_private_port }
845
846   k8s_09_vm_scripts:
847     type: OS::Heat::CloudConfig
848     properties:
849       cloud_config:
850         power_state:
851           mode: reboot
852         runcmd:
853         - [ /opt/k8s_vm_install.sh ]
854         write_files:
855         - path: /opt/k8s_vm_install.sh
856           permissions: '0755'
857           content:
858             str_replace:
859               params:
860                 __docker_proxy__: { get_param: docker_proxy }
861                 __apt_proxy__: { get_param: apt_proxy }
862                 __docker_version__: { get_param: docker_version }
863                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
864                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
865                 __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
866                 __mtu__: { get_param: mtu }
867               template:
868                 get_file: k8s_vm_install.sh
869         - path: /opt/k8s_vm_init.sh
870           permissions: '0755'
871           content:
872             str_replace:
873               params:
874                 __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
875                 __host_label__: 'compute'
876               template:
877                 get_file: k8s_vm_init.sh
878         - path: /etc/init.d/k8s_vm_init_serv
879           permissions: '0755'
880           content:
881             get_file: k8s_vm_init_serv.sh
882
883   k8s_09_vm_config:
884     type: OS::Heat::MultipartMime
885     properties:
886       parts:
887       - config: { get_resource: k8s_09_vm_scripts }
888
889   k8s_09_vm:
890     type: OS::Nova::Server
891     properties:
892       name:
893         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '09' ] ]
894       image: { get_param: ubuntu_1804_image }
895       flavor: { get_param: k8s_vm_flavor }
896       key_name: { get_param: key_name }
897       networks:
898       - port: { get_resource: k8s_09_private_port }
899       user_data_format: SOFTWARE_CONFIG
900       user_data: { get_resource: k8s_09_vm_config }
901   orch_1_private_port:
902     type: OS::Neutron::Port
903     properties:
904       network: { get_resource: oam_network }
905       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
906       security_groups:
907       - { get_resource: onap_sg }
908
909   orch_1_floating_ip:
910     type: OS::Neutron::FloatingIP
911     properties:
912       floating_network_id: { get_param: public_net_id }
913       port_id: { get_resource: orch_1_private_port }
914
915   orch_1_vm_scripts:
916     type: OS::Heat::CloudConfig
917     properties:
918       cloud_config:
919         power_state:
920           mode: reboot
921         runcmd:
922         - [ /opt/k8s_vm_install.sh ]
923         write_files:
924         - path: /opt/k8s_vm_install.sh
925           permissions: '0755'
926           content:
927             str_replace:
928               params:
929                 __docker_proxy__: { get_param: docker_proxy }
930                 __apt_proxy__: { get_param: apt_proxy }
931                 __docker_version__: { get_param: docker_version }
932                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
933                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
934                 __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
935                 __mtu__: { get_param: mtu }
936               template:
937                 get_file: k8s_vm_install.sh
938         - path: /opt/k8s_vm_init.sh
939           permissions: '0755'
940           content:
941             str_replace:
942               params:
943                 __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
944                 __host_label__: 'orchestration'
945               template:
946                 get_file: k8s_vm_init.sh
947         - path: /etc/init.d/k8s_vm_init_serv
948           permissions: '0755'
949           content:
950             get_file: k8s_vm_init_serv.sh
951
952   orch_1_vm_config:
953     type: OS::Heat::MultipartMime
954     properties:
955       parts:
956       - config: { get_resource: orch_1_vm_scripts }
957
958   orch_1_vm:
959     type: OS::Nova::Server
960     properties:
961       name:
962         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '1' ] ]
963       image: { get_param: ubuntu_1804_image }
964       flavor: { get_param: orch_vm_flavor }
965       key_name: { get_param: key_name }
966       networks:
967       - port: { get_resource: orch_1_private_port }
968       user_data_format: SOFTWARE_CONFIG
969       user_data: { get_resource: orch_1_vm_config }
970   orch_2_private_port:
971     type: OS::Neutron::Port
972     properties:
973       network: { get_resource: oam_network }
974       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
975       security_groups:
976       - { get_resource: onap_sg }
977
978   orch_2_floating_ip:
979     type: OS::Neutron::FloatingIP
980     properties:
981       floating_network_id: { get_param: public_net_id }
982       port_id: { get_resource: orch_2_private_port }
983
984   orch_2_vm_scripts:
985     type: OS::Heat::CloudConfig
986     properties:
987       cloud_config:
988         power_state:
989           mode: reboot
990         runcmd:
991         - [ /opt/k8s_vm_install.sh ]
992         write_files:
993         - path: /opt/k8s_vm_install.sh
994           permissions: '0755'
995           content:
996             str_replace:
997               params:
998                 __docker_proxy__: { get_param: docker_proxy }
999                 __apt_proxy__: { get_param: apt_proxy }
1000                 __docker_version__: { get_param: docker_version }
1001                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
1002                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
1003                 __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
1004                 __mtu__: { get_param: mtu }
1005               template:
1006                 get_file: k8s_vm_install.sh
1007         - path: /opt/k8s_vm_init.sh
1008           permissions: '0755'
1009           content:
1010             str_replace:
1011               params:
1012                 __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
1013                 __host_label__: 'orchestration'
1014               template:
1015                 get_file: k8s_vm_init.sh
1016         - path: /etc/init.d/k8s_vm_init_serv
1017           permissions: '0755'
1018           content:
1019             get_file: k8s_vm_init_serv.sh
1020
1021   orch_2_vm_config:
1022     type: OS::Heat::MultipartMime
1023     properties:
1024       parts:
1025       - config: { get_resource: orch_2_vm_scripts }
1026
1027   orch_2_vm:
1028     type: OS::Nova::Server
1029     properties:
1030       name:
1031         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '2' ] ]
1032       image: { get_param: ubuntu_1804_image }
1033       flavor: { get_param: orch_vm_flavor }
1034       key_name: { get_param: key_name }
1035       networks:
1036       - port: { get_resource: orch_2_private_port }
1037       user_data_format: SOFTWARE_CONFIG
1038       user_data: { get_resource: orch_2_vm_config }
1039   orch_3_private_port:
1040     type: OS::Neutron::Port
1041     properties:
1042       network: { get_resource: oam_network }
1043       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1044       security_groups:
1045       - { get_resource: onap_sg }
1046
1047   orch_3_floating_ip:
1048     type: OS::Neutron::FloatingIP
1049     properties:
1050       floating_network_id: { get_param: public_net_id }
1051       port_id: { get_resource: orch_3_private_port }
1052
1053   orch_3_vm_scripts:
1054     type: OS::Heat::CloudConfig
1055     properties:
1056       cloud_config:
1057         power_state:
1058           mode: reboot
1059         runcmd:
1060         - [ /opt/k8s_vm_install.sh ]
1061         write_files:
1062         - path: /opt/k8s_vm_install.sh
1063           permissions: '0755'
1064           content:
1065             str_replace:
1066               params:
1067                 __docker_proxy__: { get_param: docker_proxy }
1068                 __apt_proxy__: { get_param: apt_proxy }
1069                 __docker_version__: { get_param: docker_version }
1070                 __nfs_ip_addr__: { get_attr: [nfs_floating_ip, floating_ip_address] }
1071                 __nfs_private_ip_addr__: { get_attr: [nfs_floating_ip, fixed_ip_address] }
1072                 __host_private_ip_addr__: { get_attr: [orch_3_floating_ip, fixed_ip_address] }
1073                 __mtu__: { get_param: mtu }
1074               template:
1075                 get_file: k8s_vm_install.sh
1076         - path: /opt/k8s_vm_init.sh
1077           permissions: '0755'
1078           content:
1079             str_replace:
1080               params:
1081                 __host_private_ip_addr__: { get_attr: [orch_3_floating_ip, fixed_ip_address] }
1082                 __host_label__: 'orchestration'
1083               template:
1084                 get_file: k8s_vm_init.sh
1085         - path: /etc/init.d/k8s_vm_init_serv
1086           permissions: '0755'
1087           content:
1088             get_file: k8s_vm_init_serv.sh
1089
1090   orch_3_vm_config:
1091     type: OS::Heat::MultipartMime
1092     properties:
1093       parts:
1094       - config: { get_resource: orch_3_vm_scripts }
1095
1096   orch_3_vm:
1097     type: OS::Nova::Server
1098     properties:
1099       name:
1100         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '3' ] ]
1101       image: { get_param: ubuntu_1804_image }
1102       flavor: { get_param: orch_vm_flavor }
1103       key_name: { get_param: key_name }
1104       networks:
1105       - port: { get_resource: orch_3_private_port }
1106       user_data_format: SOFTWARE_CONFIG
1107       user_data: { get_resource: orch_3_vm_config }
1108 outputs:
1109   docker_proxy:
1110     value: { get_param: docker_proxy }
1111
1112   nfs_vm_ip:
1113     description: The IP address of the nfs instance
1114     value: { get_attr: [nfs_floating_ip, floating_ip_address] }
1115
1116   nfs_vm_private_ip:
1117     description: The private IP address of the nfs instance
1118     value: { get_attr: [nfs_floating_ip, fixed_ip_address] }
1119
1120   k8s_01_vm_ip:
1121     description: The IP address of the k8s_01 instance
1122     value: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
1123
1124   k8s_01_vm_private_ip:
1125     description: The private IP address of the k8s_01 instance
1126     value: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
1127
1128   k8s_02_vm_ip:
1129     description: The IP address of the k8s_02 instance
1130     value: { get_attr: [k8s_02_floating_ip, floating_ip_address] }
1131
1132   k8s_02_vm_private_ip:
1133     description: The private IP address of the k8s_02 instance
1134     value: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
1135
1136   k8s_03_vm_ip:
1137     description: The IP address of the k8s_03 instance
1138     value: { get_attr: [k8s_03_floating_ip, floating_ip_address] }
1139
1140   k8s_03_vm_private_ip:
1141     description: The private IP address of the k8s_03 instance
1142     value: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
1143
1144   k8s_04_vm_ip:
1145     description: The IP address of the k8s_04 instance
1146     value: { get_attr: [k8s_04_floating_ip, floating_ip_address] }
1147
1148   k8s_04_vm_private_ip:
1149     description: The private IP address of the k8s_04 instance
1150     value: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
1151
1152   k8s_05_vm_ip:
1153     description: The IP address of the k8s_05 instance
1154     value: { get_attr: [k8s_05_floating_ip, floating_ip_address] }
1155
1156   k8s_05_vm_private_ip:
1157     description: The private IP address of the k8s_05 instance
1158     value: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
1159
1160   k8s_06_vm_ip:
1161     description: The IP address of the k8s_06 instance
1162     value: { get_attr: [k8s_06_floating_ip, floating_ip_address] }
1163
1164   k8s_06_vm_private_ip:
1165     description: The private IP address of the k8s_06 instance
1166     value: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
1167
1168   k8s_07_vm_ip:
1169     description: The IP address of the k8s_07 instance
1170     value: { get_attr: [k8s_07_floating_ip, floating_ip_address] }
1171
1172   k8s_07_vm_private_ip:
1173     description: The private IP address of the k8s_07 instance
1174     value: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
1175
1176   k8s_08_vm_ip:
1177     description: The IP address of the k8s_08 instance
1178     value: { get_attr: [k8s_08_floating_ip, floating_ip_address] }
1179
1180   k8s_08_vm_private_ip:
1181     description: The private IP address of the k8s_08 instance
1182     value: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
1183
1184   k8s_09_vm_ip:
1185     description: The IP address of the k8s_09 instance
1186     value: { get_attr: [k8s_09_floating_ip, floating_ip_address] }
1187
1188   k8s_09_vm_private_ip:
1189     description: The private IP address of the k8s_09 instance
1190     value: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
1191
1192   orch_1_vm_ip:
1193     description: The IP address of the orch_1 instance
1194     value: { get_attr: [orch_1_floating_ip, floating_ip_address] }
1195
1196   orch_1_vm_private_ip:
1197     description: The private IP address of the orch_1 instance
1198     value: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
1199
1200   orch_2_vm_ip:
1201     description: The IP address of the orch_2 instance
1202     value: { get_attr: [orch_2_floating_ip, floating_ip_address] }
1203
1204   orch_2_vm_private_ip:
1205     description: The private IP address of the orch_2 instance
1206     value: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
1207
1208   orch_3_vm_ip:
1209     description: The IP address of the orch_3 instance
1210     value: { get_attr: [orch_3_floating_ip, floating_ip_address] }
1211
1212   orch_3_vm_private_ip:
1213     description: The private IP address of the orch_3 instance
1214     value: { get_attr: [orch_3_floating_ip, fixed_ip_address] }
1215