44b23e4e717fa040315e3ebae171ecf174b24801
[integration.git] / deployment / heat / onap-oom / 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 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   ubuntu_1604_image:
23     type: string
24     description: Name of the Ubuntu 16.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.22"
77
78   rancher_agent_version:
79     type: string
80     default: "1.2.11"
81
82   kubectl_version:
83     type: string
84     default: "1.11.2"
85
86   helm_version:
87     type: string
88     default: "2.9.1"
89
90   helm_deploy_delay:
91     type: string
92     default: "2m"
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 resources:
104   random-str:
105     type: OS::Heat::RandomString
106     properties:
107       length: 4
108
109   # ONAP security group
110   onap_sg:
111     type: OS::Neutron::SecurityGroup
112     properties:
113       name:
114         str_replace:
115           template: base_rand
116           params:
117             base: onap_sg
118             rand: { get_resource: random-str }
119       description: security group used by ONAP
120       rules:
121         # All egress traffic
122         - direction: egress
123           ethertype: IPv4
124         - direction: egress
125           ethertype: IPv6
126         # ingress traffic
127         # ICMP
128         - protocol: icmp
129         - protocol: udp
130           port_range_min: 1
131           port_range_max: 65535
132         - protocol: tcp
133           port_range_min: 1
134           port_range_max: 65535
135         # Protocols used for vLB/vDNS use case
136         - protocol: 47
137         - protocol: 53
138         - protocol: 132
139
140
141   # ONAP management private network
142   oam_network:
143     type: OS::Neutron::Net
144     properties:
145       name:
146         str_replace:
147           template: oam_network_rand
148           params:
149             rand: { get_resource: random-str }
150
151   oam_subnet:
152     type: OS::Neutron::Subnet
153     properties:
154       name:
155         str_replace:
156           template: oam_network_rand
157           params:
158             rand: { get_resource: random-str }
159       network_id: { get_resource: oam_network }
160       cidr: { get_param: oam_network_cidr }
161       dns_nameservers: [ "8.8.8.8" ]
162
163   router:
164     type: OS::Neutron::Router
165     properties:
166       name:
167         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
168       external_gateway_info:
169         network: { get_param: public_net_id }
170
171   router_interface:
172     type: OS::Neutron::RouterInterface
173     properties:
174       router_id: { get_resource: router }
175       subnet_id: { get_resource: oam_subnet }
176
177   rancher_private_port:
178     type: OS::Neutron::Port
179     properties:
180       network: { get_resource: oam_network }
181       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
182       security_groups:
183       - { get_resource: onap_sg }
184
185   rancher_floating_ip:
186     type: OS::Neutron::FloatingIP
187     properties:
188       floating_network_id: { get_param: public_net_id }
189       port_id: { get_resource: rancher_private_port }
190
191   rancher_vm:
192     type: OS::Nova::Server
193     properties:
194       name:
195         list_join: ['-', [{ get_param: 'OS::stack_name' }, 'rancher']]
196       image: { get_param: ubuntu_1604_image }
197       flavor: { get_param: rancher_vm_flavor }
198       key_name: { get_param: key_name }
199       networks:
200       - port: { get_resource: rancher_private_port }
201       user_data_format: RAW
202       user_data:
203         str_replace:
204           template:
205             get_file: rancher_vm_entrypoint.sh
206           params:
207             __docker_proxy__: { get_param: docker_proxy }
208             __apt_proxy__: { get_param: apt_proxy }
209             __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
210             __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
211             __integration_override_yaml__: { get_param: integration_override_yaml }
212             __integration_gerrit_branch__: { get_param: integration_gerrit_branch }
213             __integration_gerrit_refspec__: { get_param: integration_gerrit_refspec }
214             __oom_gerrit_branch__: { get_param: oom_gerrit_branch }
215             __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec }
216             __docker_manifest__: { get_param: docker_manifest }
217             __docker_version__: { get_param: docker_version }
218             __rancher_version__: { get_param: rancher_version }
219             __rancher_agent_version__: { get_param: rancher_agent_version }
220             __kubectl_version__: { get_param: kubectl_version }
221             __helm_version__: { get_param: helm_version }
222             __helm_deploy_delay__: { get_param: helm_deploy_delay }
223             __use_ramdisk__: { get_param: use_ramdisk }
224             __mtu__: { get_param: mtu }
225             __public_net_id__: { get_param: public_net_id }
226             __oam_network_cidr__: { get_param: oam_network_cidr }
227             __oam_network_id__: { get_resource: oam_network }
228             __oam_subnet_id__: { get_resource: oam_subnet }
229             __sec_group__: { get_resource: onap_sg }
230             __k8s_01_vm_ip__: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
231             __k8s_vm_ips__: [
232               get_attr: [k8s_01_floating_ip, floating_ip_address],
233               get_attr: [k8s_02_floating_ip, floating_ip_address],
234               get_attr: [k8s_03_floating_ip, floating_ip_address],
235               get_attr: [k8s_04_floating_ip, floating_ip_address],
236               get_attr: [k8s_05_floating_ip, floating_ip_address],
237               get_attr: [k8s_06_floating_ip, floating_ip_address],
238               get_attr: [k8s_07_floating_ip, floating_ip_address],
239               get_attr: [k8s_08_floating_ip, floating_ip_address],
240               get_attr: [k8s_09_floating_ip, floating_ip_address],
241               get_attr: [k8s_10_floating_ip, floating_ip_address],
242               get_attr: [k8s_11_floating_ip, floating_ip_address],
243               get_attr: [k8s_12_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               get_attr: [k8s_07_floating_ip, fixed_ip_address],
253               get_attr: [k8s_08_floating_ip, fixed_ip_address],
254               get_attr: [k8s_09_floating_ip, fixed_ip_address],
255               get_attr: [k8s_10_floating_ip, fixed_ip_address],
256               get_attr: [k8s_11_floating_ip, fixed_ip_address],
257               get_attr: [k8s_12_floating_ip, fixed_ip_address],
258             ]
259   k8s_01_private_port:
260     type: OS::Neutron::Port
261     properties:
262       network: { get_resource: oam_network }
263       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
264       security_groups:
265       - { get_resource: onap_sg }
266
267   k8s_01_floating_ip:
268     type: OS::Neutron::FloatingIP
269     properties:
270       floating_network_id: { get_param: public_net_id }
271       port_id: { get_resource: k8s_01_private_port }
272
273   k8s_01_vm_scripts:
274     type: OS::Heat::CloudConfig
275     properties:
276       cloud_config:
277         power_state:
278           mode: reboot
279         runcmd:
280         - [ /opt/k8s_vm_install.sh ]
281         write_files:
282         - path: /opt/k8s_vm_install.sh
283           permissions: '0755'
284           content:
285             str_replace:
286               params:
287                 __docker_proxy__: { get_param: docker_proxy }
288                 __apt_proxy__: { get_param: apt_proxy }
289                 __docker_version__: { get_param: docker_version }
290                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
291                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
292                 __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
293                 __mtu__: { get_param: mtu }
294               template:
295                 get_file: k8s_vm_install.sh
296         - path: /opt/k8s_vm_init.sh
297           permissions: '0755'
298           content:
299             str_replace:
300               params:
301                 __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
302                 __host_label__: 'compute'
303               template:
304                 get_file: k8s_vm_init.sh
305         - path: /etc/init.d/k8s_vm_init_serv
306           permissions: '0755'
307           content:
308             get_file: k8s_vm_init_serv.sh
309
310   k8s_01_vm_config:
311     type: OS::Heat::MultipartMime
312     properties:
313       parts:
314       - config: { get_resource: k8s_01_vm_scripts }
315
316   k8s_01_vm:
317     type: OS::Nova::Server
318     properties:
319       name:
320         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '01' ] ]
321       image: { get_param: ubuntu_1604_image }
322       flavor: { get_param: k8s_vm_flavor }
323       key_name: { get_param: key_name }
324       networks:
325       - port: { get_resource: k8s_01_private_port }
326       user_data_format: SOFTWARE_CONFIG
327       user_data: { get_resource: k8s_01_vm_config }
328
329   k8s_02_private_port:
330     type: OS::Neutron::Port
331     properties:
332       network: { get_resource: oam_network }
333       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
334       security_groups:
335       - { get_resource: onap_sg }
336
337   k8s_02_floating_ip:
338     type: OS::Neutron::FloatingIP
339     properties:
340       floating_network_id: { get_param: public_net_id }
341       port_id: { get_resource: k8s_02_private_port }
342
343   k8s_02_vm_scripts:
344     type: OS::Heat::CloudConfig
345     properties:
346       cloud_config:
347         power_state:
348           mode: reboot
349         runcmd:
350         - [ /opt/k8s_vm_install.sh ]
351         write_files:
352         - path: /opt/k8s_vm_install.sh
353           permissions: '0755'
354           content:
355             str_replace:
356               params:
357                 __docker_proxy__: { get_param: docker_proxy }
358                 __apt_proxy__: { get_param: apt_proxy }
359                 __docker_version__: { get_param: docker_version }
360                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
361                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
362                 __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
363                 __mtu__: { get_param: mtu }
364               template:
365                 get_file: k8s_vm_install.sh
366         - path: /opt/k8s_vm_init.sh
367           permissions: '0755'
368           content:
369             str_replace:
370               params:
371                 __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
372                 __host_label__: 'compute'
373               template:
374                 get_file: k8s_vm_init.sh
375         - path: /etc/init.d/k8s_vm_init_serv
376           permissions: '0755'
377           content:
378             get_file: k8s_vm_init_serv.sh
379
380   k8s_02_vm_config:
381     type: OS::Heat::MultipartMime
382     properties:
383       parts:
384       - config: { get_resource: k8s_02_vm_scripts }
385
386   k8s_02_vm:
387     type: OS::Nova::Server
388     properties:
389       name:
390         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '02' ] ]
391       image: { get_param: ubuntu_1604_image }
392       flavor: { get_param: k8s_vm_flavor }
393       key_name: { get_param: key_name }
394       networks:
395       - port: { get_resource: k8s_02_private_port }
396       user_data_format: SOFTWARE_CONFIG
397       user_data: { get_resource: k8s_02_vm_config }
398
399   k8s_03_private_port:
400     type: OS::Neutron::Port
401     properties:
402       network: { get_resource: oam_network }
403       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
404       security_groups:
405       - { get_resource: onap_sg }
406
407   k8s_03_floating_ip:
408     type: OS::Neutron::FloatingIP
409     properties:
410       floating_network_id: { get_param: public_net_id }
411       port_id: { get_resource: k8s_03_private_port }
412
413   k8s_03_vm_scripts:
414     type: OS::Heat::CloudConfig
415     properties:
416       cloud_config:
417         power_state:
418           mode: reboot
419         runcmd:
420         - [ /opt/k8s_vm_install.sh ]
421         write_files:
422         - path: /opt/k8s_vm_install.sh
423           permissions: '0755'
424           content:
425             str_replace:
426               params:
427                 __docker_proxy__: { get_param: docker_proxy }
428                 __apt_proxy__: { get_param: apt_proxy }
429                 __docker_version__: { get_param: docker_version }
430                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
431                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
432                 __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
433                 __mtu__: { get_param: mtu }
434               template:
435                 get_file: k8s_vm_install.sh
436         - path: /opt/k8s_vm_init.sh
437           permissions: '0755'
438           content:
439             str_replace:
440               params:
441                 __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
442                 __host_label__: 'compute'
443               template:
444                 get_file: k8s_vm_init.sh
445         - path: /etc/init.d/k8s_vm_init_serv
446           permissions: '0755'
447           content:
448             get_file: k8s_vm_init_serv.sh
449
450   k8s_03_vm_config:
451     type: OS::Heat::MultipartMime
452     properties:
453       parts:
454       - config: { get_resource: k8s_03_vm_scripts }
455
456   k8s_03_vm:
457     type: OS::Nova::Server
458     properties:
459       name:
460         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '03' ] ]
461       image: { get_param: ubuntu_1604_image }
462       flavor: { get_param: k8s_vm_flavor }
463       key_name: { get_param: key_name }
464       networks:
465       - port: { get_resource: k8s_03_private_port }
466       user_data_format: SOFTWARE_CONFIG
467       user_data: { get_resource: k8s_03_vm_config }
468
469   k8s_04_private_port:
470     type: OS::Neutron::Port
471     properties:
472       network: { get_resource: oam_network }
473       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
474       security_groups:
475       - { get_resource: onap_sg }
476
477   k8s_04_floating_ip:
478     type: OS::Neutron::FloatingIP
479     properties:
480       floating_network_id: { get_param: public_net_id }
481       port_id: { get_resource: k8s_04_private_port }
482
483   k8s_04_vm_scripts:
484     type: OS::Heat::CloudConfig
485     properties:
486       cloud_config:
487         power_state:
488           mode: reboot
489         runcmd:
490         - [ /opt/k8s_vm_install.sh ]
491         write_files:
492         - path: /opt/k8s_vm_install.sh
493           permissions: '0755'
494           content:
495             str_replace:
496               params:
497                 __docker_proxy__: { get_param: docker_proxy }
498                 __apt_proxy__: { get_param: apt_proxy }
499                 __docker_version__: { get_param: docker_version }
500                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
501                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
502                 __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
503                 __mtu__: { get_param: mtu }
504               template:
505                 get_file: k8s_vm_install.sh
506         - path: /opt/k8s_vm_init.sh
507           permissions: '0755'
508           content:
509             str_replace:
510               params:
511                 __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
512                 __host_label__: 'compute'
513               template:
514                 get_file: k8s_vm_init.sh
515         - path: /etc/init.d/k8s_vm_init_serv
516           permissions: '0755'
517           content:
518             get_file: k8s_vm_init_serv.sh
519
520   k8s_04_vm_config:
521     type: OS::Heat::MultipartMime
522     properties:
523       parts:
524       - config: { get_resource: k8s_04_vm_scripts }
525
526   k8s_04_vm:
527     type: OS::Nova::Server
528     properties:
529       name:
530         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '04' ] ]
531       image: { get_param: ubuntu_1604_image }
532       flavor: { get_param: k8s_vm_flavor }
533       key_name: { get_param: key_name }
534       networks:
535       - port: { get_resource: k8s_04_private_port }
536       user_data_format: SOFTWARE_CONFIG
537       user_data: { get_resource: k8s_04_vm_config }
538
539   k8s_05_private_port:
540     type: OS::Neutron::Port
541     properties:
542       network: { get_resource: oam_network }
543       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
544       security_groups:
545       - { get_resource: onap_sg }
546
547   k8s_05_floating_ip:
548     type: OS::Neutron::FloatingIP
549     properties:
550       floating_network_id: { get_param: public_net_id }
551       port_id: { get_resource: k8s_05_private_port }
552
553   k8s_05_vm_scripts:
554     type: OS::Heat::CloudConfig
555     properties:
556       cloud_config:
557         power_state:
558           mode: reboot
559         runcmd:
560         - [ /opt/k8s_vm_install.sh ]
561         write_files:
562         - path: /opt/k8s_vm_install.sh
563           permissions: '0755'
564           content:
565             str_replace:
566               params:
567                 __docker_proxy__: { get_param: docker_proxy }
568                 __apt_proxy__: { get_param: apt_proxy }
569                 __docker_version__: { get_param: docker_version }
570                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
571                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
572                 __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
573                 __mtu__: { get_param: mtu }
574               template:
575                 get_file: k8s_vm_install.sh
576         - path: /opt/k8s_vm_init.sh
577           permissions: '0755'
578           content:
579             str_replace:
580               params:
581                 __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
582                 __host_label__: 'compute'
583               template:
584                 get_file: k8s_vm_init.sh
585         - path: /etc/init.d/k8s_vm_init_serv
586           permissions: '0755'
587           content:
588             get_file: k8s_vm_init_serv.sh
589
590   k8s_05_vm_config:
591     type: OS::Heat::MultipartMime
592     properties:
593       parts:
594       - config: { get_resource: k8s_05_vm_scripts }
595
596   k8s_05_vm:
597     type: OS::Nova::Server
598     properties:
599       name:
600         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '05' ] ]
601       image: { get_param: ubuntu_1604_image }
602       flavor: { get_param: k8s_vm_flavor }
603       key_name: { get_param: key_name }
604       networks:
605       - port: { get_resource: k8s_05_private_port }
606       user_data_format: SOFTWARE_CONFIG
607       user_data: { get_resource: k8s_05_vm_config }
608
609   k8s_06_private_port:
610     type: OS::Neutron::Port
611     properties:
612       network: { get_resource: oam_network }
613       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
614       security_groups:
615       - { get_resource: onap_sg }
616
617   k8s_06_floating_ip:
618     type: OS::Neutron::FloatingIP
619     properties:
620       floating_network_id: { get_param: public_net_id }
621       port_id: { get_resource: k8s_06_private_port }
622
623   k8s_06_vm_scripts:
624     type: OS::Heat::CloudConfig
625     properties:
626       cloud_config:
627         power_state:
628           mode: reboot
629         runcmd:
630         - [ /opt/k8s_vm_install.sh ]
631         write_files:
632         - path: /opt/k8s_vm_install.sh
633           permissions: '0755'
634           content:
635             str_replace:
636               params:
637                 __docker_proxy__: { get_param: docker_proxy }
638                 __apt_proxy__: { get_param: apt_proxy }
639                 __docker_version__: { get_param: docker_version }
640                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
641                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
642                 __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
643                 __mtu__: { get_param: mtu }
644               template:
645                 get_file: k8s_vm_install.sh
646         - path: /opt/k8s_vm_init.sh
647           permissions: '0755'
648           content:
649             str_replace:
650               params:
651                 __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
652                 __host_label__: 'compute'
653               template:
654                 get_file: k8s_vm_init.sh
655         - path: /etc/init.d/k8s_vm_init_serv
656           permissions: '0755'
657           content:
658             get_file: k8s_vm_init_serv.sh
659
660   k8s_06_vm_config:
661     type: OS::Heat::MultipartMime
662     properties:
663       parts:
664       - config: { get_resource: k8s_06_vm_scripts }
665
666   k8s_06_vm:
667     type: OS::Nova::Server
668     properties:
669       name:
670         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '06' ] ]
671       image: { get_param: ubuntu_1604_image }
672       flavor: { get_param: k8s_vm_flavor }
673       key_name: { get_param: key_name }
674       networks:
675       - port: { get_resource: k8s_06_private_port }
676       user_data_format: SOFTWARE_CONFIG
677       user_data: { get_resource: k8s_06_vm_config }
678
679   k8s_07_private_port:
680     type: OS::Neutron::Port
681     properties:
682       network: { get_resource: oam_network }
683       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
684       security_groups:
685       - { get_resource: onap_sg }
686
687   k8s_07_floating_ip:
688     type: OS::Neutron::FloatingIP
689     properties:
690       floating_network_id: { get_param: public_net_id }
691       port_id: { get_resource: k8s_07_private_port }
692
693   k8s_07_vm_scripts:
694     type: OS::Heat::CloudConfig
695     properties:
696       cloud_config:
697         power_state:
698           mode: reboot
699         runcmd:
700         - [ /opt/k8s_vm_install.sh ]
701         write_files:
702         - path: /opt/k8s_vm_install.sh
703           permissions: '0755'
704           content:
705             str_replace:
706               params:
707                 __docker_proxy__: { get_param: docker_proxy }
708                 __apt_proxy__: { get_param: apt_proxy }
709                 __docker_version__: { get_param: docker_version }
710                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
711                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
712                 __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
713                 __mtu__: { get_param: mtu }
714               template:
715                 get_file: k8s_vm_install.sh
716         - path: /opt/k8s_vm_init.sh
717           permissions: '0755'
718           content:
719             str_replace:
720               params:
721                 __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
722                 __host_label__: 'compute'
723               template:
724                 get_file: k8s_vm_init.sh
725         - path: /etc/init.d/k8s_vm_init_serv
726           permissions: '0755'
727           content:
728             get_file: k8s_vm_init_serv.sh
729
730   k8s_07_vm_config:
731     type: OS::Heat::MultipartMime
732     properties:
733       parts:
734       - config: { get_resource: k8s_07_vm_scripts }
735
736   k8s_07_vm:
737     type: OS::Nova::Server
738     properties:
739       name:
740         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '07' ] ]
741       image: { get_param: ubuntu_1604_image }
742       flavor: { get_param: k8s_vm_flavor }
743       key_name: { get_param: key_name }
744       networks:
745       - port: { get_resource: k8s_07_private_port }
746       user_data_format: SOFTWARE_CONFIG
747       user_data: { get_resource: k8s_07_vm_config }
748
749   k8s_08_private_port:
750     type: OS::Neutron::Port
751     properties:
752       network: { get_resource: oam_network }
753       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
754       security_groups:
755       - { get_resource: onap_sg }
756
757   k8s_08_floating_ip:
758     type: OS::Neutron::FloatingIP
759     properties:
760       floating_network_id: { get_param: public_net_id }
761       port_id: { get_resource: k8s_08_private_port }
762
763   k8s_08_vm_scripts:
764     type: OS::Heat::CloudConfig
765     properties:
766       cloud_config:
767         power_state:
768           mode: reboot
769         runcmd:
770         - [ /opt/k8s_vm_install.sh ]
771         write_files:
772         - path: /opt/k8s_vm_install.sh
773           permissions: '0755'
774           content:
775             str_replace:
776               params:
777                 __docker_proxy__: { get_param: docker_proxy }
778                 __apt_proxy__: { get_param: apt_proxy }
779                 __docker_version__: { get_param: docker_version }
780                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
781                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
782                 __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
783                 __mtu__: { get_param: mtu }
784               template:
785                 get_file: k8s_vm_install.sh
786         - path: /opt/k8s_vm_init.sh
787           permissions: '0755'
788           content:
789             str_replace:
790               params:
791                 __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
792                 __host_label__: 'compute'
793               template:
794                 get_file: k8s_vm_init.sh
795         - path: /etc/init.d/k8s_vm_init_serv
796           permissions: '0755'
797           content:
798             get_file: k8s_vm_init_serv.sh
799
800   k8s_08_vm_config:
801     type: OS::Heat::MultipartMime
802     properties:
803       parts:
804       - config: { get_resource: k8s_08_vm_scripts }
805
806   k8s_08_vm:
807     type: OS::Nova::Server
808     properties:
809       name:
810         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '08' ] ]
811       image: { get_param: ubuntu_1604_image }
812       flavor: { get_param: k8s_vm_flavor }
813       key_name: { get_param: key_name }
814       networks:
815       - port: { get_resource: k8s_08_private_port }
816       user_data_format: SOFTWARE_CONFIG
817       user_data: { get_resource: k8s_08_vm_config }
818
819   k8s_09_private_port:
820     type: OS::Neutron::Port
821     properties:
822       network: { get_resource: oam_network }
823       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
824       security_groups:
825       - { get_resource: onap_sg }
826
827   k8s_09_floating_ip:
828     type: OS::Neutron::FloatingIP
829     properties:
830       floating_network_id: { get_param: public_net_id }
831       port_id: { get_resource: k8s_09_private_port }
832
833   k8s_09_vm_scripts:
834     type: OS::Heat::CloudConfig
835     properties:
836       cloud_config:
837         power_state:
838           mode: reboot
839         runcmd:
840         - [ /opt/k8s_vm_install.sh ]
841         write_files:
842         - path: /opt/k8s_vm_install.sh
843           permissions: '0755'
844           content:
845             str_replace:
846               params:
847                 __docker_proxy__: { get_param: docker_proxy }
848                 __apt_proxy__: { get_param: apt_proxy }
849                 __docker_version__: { get_param: docker_version }
850                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
851                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
852                 __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
853                 __mtu__: { get_param: mtu }
854               template:
855                 get_file: k8s_vm_install.sh
856         - path: /opt/k8s_vm_init.sh
857           permissions: '0755'
858           content:
859             str_replace:
860               params:
861                 __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
862                 __host_label__: 'compute'
863               template:
864                 get_file: k8s_vm_init.sh
865         - path: /etc/init.d/k8s_vm_init_serv
866           permissions: '0755'
867           content:
868             get_file: k8s_vm_init_serv.sh
869
870   k8s_09_vm_config:
871     type: OS::Heat::MultipartMime
872     properties:
873       parts:
874       - config: { get_resource: k8s_09_vm_scripts }
875
876   k8s_09_vm:
877     type: OS::Nova::Server
878     properties:
879       name:
880         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '09' ] ]
881       image: { get_param: ubuntu_1604_image }
882       flavor: { get_param: k8s_vm_flavor }
883       key_name: { get_param: key_name }
884       networks:
885       - port: { get_resource: k8s_09_private_port }
886       user_data_format: SOFTWARE_CONFIG
887       user_data: { get_resource: k8s_09_vm_config }
888
889   k8s_10_private_port:
890     type: OS::Neutron::Port
891     properties:
892       network: { get_resource: oam_network }
893       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
894       security_groups:
895       - { get_resource: onap_sg }
896
897   k8s_10_floating_ip:
898     type: OS::Neutron::FloatingIP
899     properties:
900       floating_network_id: { get_param: public_net_id }
901       port_id: { get_resource: k8s_10_private_port }
902
903   k8s_10_vm_scripts:
904     type: OS::Heat::CloudConfig
905     properties:
906       cloud_config:
907         power_state:
908           mode: reboot
909         runcmd:
910         - [ /opt/k8s_vm_install.sh ]
911         write_files:
912         - path: /opt/k8s_vm_install.sh
913           permissions: '0755'
914           content:
915             str_replace:
916               params:
917                 __docker_proxy__: { get_param: docker_proxy }
918                 __apt_proxy__: { get_param: apt_proxy }
919                 __docker_version__: { get_param: docker_version }
920                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
921                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
922                 __host_private_ip_addr__: { get_attr: [k8s_10_floating_ip, fixed_ip_address] }
923                 __mtu__: { get_param: mtu }
924               template:
925                 get_file: k8s_vm_install.sh
926         - path: /opt/k8s_vm_init.sh
927           permissions: '0755'
928           content:
929             str_replace:
930               params:
931                 __host_private_ip_addr__: { get_attr: [k8s_10_floating_ip, fixed_ip_address] }
932                 __host_label__: 'compute'
933               template:
934                 get_file: k8s_vm_init.sh
935         - path: /etc/init.d/k8s_vm_init_serv
936           permissions: '0755'
937           content:
938             get_file: k8s_vm_init_serv.sh
939
940   k8s_10_vm_config:
941     type: OS::Heat::MultipartMime
942     properties:
943       parts:
944       - config: { get_resource: k8s_10_vm_scripts }
945
946   k8s_10_vm:
947     type: OS::Nova::Server
948     properties:
949       name:
950         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '10' ] ]
951       image: { get_param: ubuntu_1604_image }
952       flavor: { get_param: k8s_vm_flavor }
953       key_name: { get_param: key_name }
954       networks:
955       - port: { get_resource: k8s_10_private_port }
956       user_data_format: SOFTWARE_CONFIG
957       user_data: { get_resource: k8s_10_vm_config }
958
959   k8s_11_private_port:
960     type: OS::Neutron::Port
961     properties:
962       network: { get_resource: oam_network }
963       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
964       security_groups:
965       - { get_resource: onap_sg }
966
967   k8s_11_floating_ip:
968     type: OS::Neutron::FloatingIP
969     properties:
970       floating_network_id: { get_param: public_net_id }
971       port_id: { get_resource: k8s_11_private_port }
972
973   k8s_11_vm_scripts:
974     type: OS::Heat::CloudConfig
975     properties:
976       cloud_config:
977         power_state:
978           mode: reboot
979         runcmd:
980         - [ /opt/k8s_vm_install.sh ]
981         write_files:
982         - path: /opt/k8s_vm_install.sh
983           permissions: '0755'
984           content:
985             str_replace:
986               params:
987                 __docker_proxy__: { get_param: docker_proxy }
988                 __apt_proxy__: { get_param: apt_proxy }
989                 __docker_version__: { get_param: docker_version }
990                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
991                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
992                 __host_private_ip_addr__: { get_attr: [k8s_11_floating_ip, fixed_ip_address] }
993                 __mtu__: { get_param: mtu }
994               template:
995                 get_file: k8s_vm_install.sh
996         - path: /opt/k8s_vm_init.sh
997           permissions: '0755'
998           content:
999             str_replace:
1000               params:
1001                 __host_private_ip_addr__: { get_attr: [k8s_11_floating_ip, fixed_ip_address] }
1002                 __host_label__: 'compute'
1003               template:
1004                 get_file: k8s_vm_init.sh
1005         - path: /etc/init.d/k8s_vm_init_serv
1006           permissions: '0755'
1007           content:
1008             get_file: k8s_vm_init_serv.sh
1009
1010   k8s_11_vm_config:
1011     type: OS::Heat::MultipartMime
1012     properties:
1013       parts:
1014       - config: { get_resource: k8s_11_vm_scripts }
1015
1016   k8s_11_vm:
1017     type: OS::Nova::Server
1018     properties:
1019       name:
1020         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '11' ] ]
1021       image: { get_param: ubuntu_1604_image }
1022       flavor: { get_param: k8s_vm_flavor }
1023       key_name: { get_param: key_name }
1024       networks:
1025       - port: { get_resource: k8s_11_private_port }
1026       user_data_format: SOFTWARE_CONFIG
1027       user_data: { get_resource: k8s_11_vm_config }
1028
1029   k8s_12_private_port:
1030     type: OS::Neutron::Port
1031     properties:
1032       network: { get_resource: oam_network }
1033       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1034       security_groups:
1035       - { get_resource: onap_sg }
1036
1037   k8s_12_floating_ip:
1038     type: OS::Neutron::FloatingIP
1039     properties:
1040       floating_network_id: { get_param: public_net_id }
1041       port_id: { get_resource: k8s_12_private_port }
1042
1043   k8s_12_vm_scripts:
1044     type: OS::Heat::CloudConfig
1045     properties:
1046       cloud_config:
1047         power_state:
1048           mode: reboot
1049         runcmd:
1050         - [ /opt/k8s_vm_install.sh ]
1051         write_files:
1052         - path: /opt/k8s_vm_install.sh
1053           permissions: '0755'
1054           content:
1055             str_replace:
1056               params:
1057                 __docker_proxy__: { get_param: docker_proxy }
1058                 __apt_proxy__: { get_param: apt_proxy }
1059                 __docker_version__: { get_param: docker_version }
1060                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1061                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1062                 __host_private_ip_addr__: { get_attr: [k8s_12_floating_ip, fixed_ip_address] }
1063                 __mtu__: { get_param: mtu }
1064               template:
1065                 get_file: k8s_vm_install.sh
1066         - path: /opt/k8s_vm_init.sh
1067           permissions: '0755'
1068           content:
1069             str_replace:
1070               params:
1071                 __host_private_ip_addr__: { get_attr: [k8s_12_floating_ip, fixed_ip_address] }
1072                 __host_label__: 'compute'
1073               template:
1074                 get_file: k8s_vm_init.sh
1075         - path: /etc/init.d/k8s_vm_init_serv
1076           permissions: '0755'
1077           content:
1078             get_file: k8s_vm_init_serv.sh
1079
1080   k8s_12_vm_config:
1081     type: OS::Heat::MultipartMime
1082     properties:
1083       parts:
1084       - config: { get_resource: k8s_12_vm_scripts }
1085
1086   k8s_12_vm:
1087     type: OS::Nova::Server
1088     properties:
1089       name:
1090         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '12' ] ]
1091       image: { get_param: ubuntu_1604_image }
1092       flavor: { get_param: k8s_vm_flavor }
1093       key_name: { get_param: key_name }
1094       networks:
1095       - port: { get_resource: k8s_12_private_port }
1096       user_data_format: SOFTWARE_CONFIG
1097       user_data: { get_resource: k8s_12_vm_config }
1098
1099   etcd_1_private_port:
1100     type: OS::Neutron::Port
1101     properties:
1102       network: { get_resource: oam_network }
1103       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1104       security_groups:
1105       - { get_resource: onap_sg }
1106
1107   etcd_1_floating_ip:
1108     type: OS::Neutron::FloatingIP
1109     properties:
1110       floating_network_id: { get_param: public_net_id }
1111       port_id: { get_resource: etcd_1_private_port }
1112
1113   etcd_1_vm_scripts:
1114     type: OS::Heat::CloudConfig
1115     properties:
1116       cloud_config:
1117         power_state:
1118           mode: reboot
1119         runcmd:
1120         - [ /opt/k8s_vm_install.sh ]
1121         write_files:
1122         - path: /opt/k8s_vm_install.sh
1123           permissions: '0755'
1124           content:
1125             str_replace:
1126               params:
1127                 __docker_proxy__: { get_param: docker_proxy }
1128                 __apt_proxy__: { get_param: apt_proxy }
1129                 __docker_version__: { get_param: docker_version }
1130                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1131                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1132                 __host_private_ip_addr__: { get_attr: [etcd_1_floating_ip, fixed_ip_address] }
1133                 __mtu__: { get_param: mtu }
1134               template:
1135                 get_file: k8s_vm_install.sh
1136         - path: /opt/k8s_vm_init.sh
1137           permissions: '0755'
1138           content:
1139             str_replace:
1140               params:
1141                 __host_private_ip_addr__: { get_attr: [etcd_1_floating_ip, fixed_ip_address] }
1142                 __host_label__: 'etcd'
1143               template:
1144                 get_file: k8s_vm_init.sh
1145         - path: /etc/init.d/k8s_vm_init_serv
1146           permissions: '0755'
1147           content:
1148             get_file: k8s_vm_init_serv.sh
1149
1150   etcd_1_vm_config:
1151     type: OS::Heat::MultipartMime
1152     properties:
1153       parts:
1154       - config: { get_resource: etcd_1_vm_scripts }
1155
1156   etcd_1_vm:
1157     type: OS::Nova::Server
1158     properties:
1159       name:
1160         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '1' ] ]
1161       image: { get_param: ubuntu_1604_image }
1162       flavor: { get_param: etcd_vm_flavor }
1163       key_name: { get_param: key_name }
1164       networks:
1165       - port: { get_resource: etcd_1_private_port }
1166       user_data_format: SOFTWARE_CONFIG
1167       user_data: { get_resource: etcd_1_vm_config }
1168
1169   etcd_2_private_port:
1170     type: OS::Neutron::Port
1171     properties:
1172       network: { get_resource: oam_network }
1173       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1174       security_groups:
1175       - { get_resource: onap_sg }
1176
1177   etcd_2_floating_ip:
1178     type: OS::Neutron::FloatingIP
1179     properties:
1180       floating_network_id: { get_param: public_net_id }
1181       port_id: { get_resource: etcd_2_private_port }
1182
1183   etcd_2_vm_scripts:
1184     type: OS::Heat::CloudConfig
1185     properties:
1186       cloud_config:
1187         power_state:
1188           mode: reboot
1189         runcmd:
1190         - [ /opt/k8s_vm_install.sh ]
1191         write_files:
1192         - path: /opt/k8s_vm_install.sh
1193           permissions: '0755'
1194           content:
1195             str_replace:
1196               params:
1197                 __docker_proxy__: { get_param: docker_proxy }
1198                 __apt_proxy__: { get_param: apt_proxy }
1199                 __docker_version__: { get_param: docker_version }
1200                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1201                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1202                 __host_private_ip_addr__: { get_attr: [etcd_2_floating_ip, fixed_ip_address] }
1203                 __mtu__: { get_param: mtu }
1204               template:
1205                 get_file: k8s_vm_install.sh
1206         - path: /opt/k8s_vm_init.sh
1207           permissions: '0755'
1208           content:
1209             str_replace:
1210               params:
1211                 __host_private_ip_addr__: { get_attr: [etcd_2_floating_ip, fixed_ip_address] }
1212                 __host_label__: 'etcd'
1213               template:
1214                 get_file: k8s_vm_init.sh
1215         - path: /etc/init.d/k8s_vm_init_serv
1216           permissions: '0755'
1217           content:
1218             get_file: k8s_vm_init_serv.sh
1219
1220   etcd_2_vm_config:
1221     type: OS::Heat::MultipartMime
1222     properties:
1223       parts:
1224       - config: { get_resource: etcd_2_vm_scripts }
1225
1226   etcd_2_vm:
1227     type: OS::Nova::Server
1228     properties:
1229       name:
1230         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '2' ] ]
1231       image: { get_param: ubuntu_1604_image }
1232       flavor: { get_param: etcd_vm_flavor }
1233       key_name: { get_param: key_name }
1234       networks:
1235       - port: { get_resource: etcd_2_private_port }
1236       user_data_format: SOFTWARE_CONFIG
1237       user_data: { get_resource: etcd_2_vm_config }
1238
1239   etcd_3_private_port:
1240     type: OS::Neutron::Port
1241     properties:
1242       network: { get_resource: oam_network }
1243       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1244       security_groups:
1245       - { get_resource: onap_sg }
1246
1247   etcd_3_floating_ip:
1248     type: OS::Neutron::FloatingIP
1249     properties:
1250       floating_network_id: { get_param: public_net_id }
1251       port_id: { get_resource: etcd_3_private_port }
1252
1253   etcd_3_vm_scripts:
1254     type: OS::Heat::CloudConfig
1255     properties:
1256       cloud_config:
1257         power_state:
1258           mode: reboot
1259         runcmd:
1260         - [ /opt/k8s_vm_install.sh ]
1261         write_files:
1262         - path: /opt/k8s_vm_install.sh
1263           permissions: '0755'
1264           content:
1265             str_replace:
1266               params:
1267                 __docker_proxy__: { get_param: docker_proxy }
1268                 __apt_proxy__: { get_param: apt_proxy }
1269                 __docker_version__: { get_param: docker_version }
1270                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1271                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1272                 __host_private_ip_addr__: { get_attr: [etcd_3_floating_ip, fixed_ip_address] }
1273                 __mtu__: { get_param: mtu }
1274               template:
1275                 get_file: k8s_vm_install.sh
1276         - path: /opt/k8s_vm_init.sh
1277           permissions: '0755'
1278           content:
1279             str_replace:
1280               params:
1281                 __host_private_ip_addr__: { get_attr: [etcd_3_floating_ip, fixed_ip_address] }
1282                 __host_label__: 'etcd'
1283               template:
1284                 get_file: k8s_vm_init.sh
1285         - path: /etc/init.d/k8s_vm_init_serv
1286           permissions: '0755'
1287           content:
1288             get_file: k8s_vm_init_serv.sh
1289
1290   etcd_3_vm_config:
1291     type: OS::Heat::MultipartMime
1292     properties:
1293       parts:
1294       - config: { get_resource: etcd_3_vm_scripts }
1295
1296   etcd_3_vm:
1297     type: OS::Nova::Server
1298     properties:
1299       name:
1300         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'etcd', '3' ] ]
1301       image: { get_param: ubuntu_1604_image }
1302       flavor: { get_param: etcd_vm_flavor }
1303       key_name: { get_param: key_name }
1304       networks:
1305       - port: { get_resource: etcd_3_private_port }
1306       user_data_format: SOFTWARE_CONFIG
1307       user_data: { get_resource: etcd_3_vm_config }
1308
1309   orch_1_private_port:
1310     type: OS::Neutron::Port
1311     properties:
1312       network: { get_resource: oam_network }
1313       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1314       security_groups:
1315       - { get_resource: onap_sg }
1316
1317   orch_1_floating_ip:
1318     type: OS::Neutron::FloatingIP
1319     properties:
1320       floating_network_id: { get_param: public_net_id }
1321       port_id: { get_resource: orch_1_private_port }
1322
1323   orch_1_vm_scripts:
1324     type: OS::Heat::CloudConfig
1325     properties:
1326       cloud_config:
1327         power_state:
1328           mode: reboot
1329         runcmd:
1330         - [ /opt/k8s_vm_install.sh ]
1331         write_files:
1332         - path: /opt/k8s_vm_install.sh
1333           permissions: '0755'
1334           content:
1335             str_replace:
1336               params:
1337                 __docker_proxy__: { get_param: docker_proxy }
1338                 __apt_proxy__: { get_param: apt_proxy }
1339                 __docker_version__: { get_param: docker_version }
1340                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1341                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1342                 __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
1343                 __mtu__: { get_param: mtu }
1344               template:
1345                 get_file: k8s_vm_install.sh
1346         - path: /opt/k8s_vm_init.sh
1347           permissions: '0755'
1348           content:
1349             str_replace:
1350               params:
1351                 __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
1352                 __host_label__: 'orchestration'
1353               template:
1354                 get_file: k8s_vm_init.sh
1355         - path: /etc/init.d/k8s_vm_init_serv
1356           permissions: '0755'
1357           content:
1358             get_file: k8s_vm_init_serv.sh
1359
1360   orch_1_vm_config:
1361     type: OS::Heat::MultipartMime
1362     properties:
1363       parts:
1364       - config: { get_resource: orch_1_vm_scripts }
1365
1366   orch_1_vm:
1367     type: OS::Nova::Server
1368     properties:
1369       name:
1370         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '1' ] ]
1371       image: { get_param: ubuntu_1604_image }
1372       flavor: { get_param: orch_vm_flavor }
1373       key_name: { get_param: key_name }
1374       networks:
1375       - port: { get_resource: orch_1_private_port }
1376       user_data_format: SOFTWARE_CONFIG
1377       user_data: { get_resource: orch_1_vm_config }
1378
1379   orch_2_private_port:
1380     type: OS::Neutron::Port
1381     properties:
1382       network: { get_resource: oam_network }
1383       fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
1384       security_groups:
1385       - { get_resource: onap_sg }
1386
1387   orch_2_floating_ip:
1388     type: OS::Neutron::FloatingIP
1389     properties:
1390       floating_network_id: { get_param: public_net_id }
1391       port_id: { get_resource: orch_2_private_port }
1392
1393   orch_2_vm_scripts:
1394     type: OS::Heat::CloudConfig
1395     properties:
1396       cloud_config:
1397         power_state:
1398           mode: reboot
1399         runcmd:
1400         - [ /opt/k8s_vm_install.sh ]
1401         write_files:
1402         - path: /opt/k8s_vm_install.sh
1403           permissions: '0755'
1404           content:
1405             str_replace:
1406               params:
1407                 __docker_proxy__: { get_param: docker_proxy }
1408                 __apt_proxy__: { get_param: apt_proxy }
1409                 __docker_version__: { get_param: docker_version }
1410                 __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
1411                 __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
1412                 __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
1413                 __mtu__: { get_param: mtu }
1414               template:
1415                 get_file: k8s_vm_install.sh
1416         - path: /opt/k8s_vm_init.sh
1417           permissions: '0755'
1418           content:
1419             str_replace:
1420               params:
1421                 __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
1422                 __host_label__: 'orchestration'
1423               template:
1424                 get_file: k8s_vm_init.sh
1425         - path: /etc/init.d/k8s_vm_init_serv
1426           permissions: '0755'
1427           content:
1428             get_file: k8s_vm_init_serv.sh
1429
1430   orch_2_vm_config:
1431     type: OS::Heat::MultipartMime
1432     properties:
1433       parts:
1434       - config: { get_resource: orch_2_vm_scripts }
1435
1436   orch_2_vm:
1437     type: OS::Nova::Server
1438     properties:
1439       name:
1440         list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '2' ] ]
1441       image: { get_param: ubuntu_1604_image }
1442       flavor: { get_param: orch_vm_flavor }
1443       key_name: { get_param: key_name }
1444       networks:
1445       - port: { get_resource: orch_2_private_port }
1446       user_data_format: SOFTWARE_CONFIG
1447       user_data: { get_resource: orch_2_vm_config }
1448
1449 outputs:
1450   rancher_vm_ip:
1451     description: The IP address of the rancher instance
1452     value: { get_attr: [rancher_floating_ip, floating_ip_address] }
1453
1454   k8s_01_vm_ip:
1455     description: The IP address of the k8s_01 instance
1456     value: { get_attr: [k8s_01_floating_ip, floating_ip_address] }
1457
1458   k8s_02_vm_ip:
1459     description: The IP address of the k8s_02 instance
1460     value: { get_attr: [k8s_02_floating_ip, floating_ip_address] }
1461
1462   k8s_03_vm_ip:
1463     description: The IP address of the k8s_03 instance
1464     value: { get_attr: [k8s_03_floating_ip, floating_ip_address] }
1465
1466   k8s_04_vm_ip:
1467     description: The IP address of the k8s_04 instance
1468     value: { get_attr: [k8s_04_floating_ip, floating_ip_address] }
1469
1470   k8s_05_vm_ip:
1471     description: The IP address of the k8s_05 instance
1472     value: { get_attr: [k8s_05_floating_ip, floating_ip_address] }
1473
1474   k8s_06_vm_ip:
1475     description: The IP address of the k8s_06 instance
1476     value: { get_attr: [k8s_06_floating_ip, floating_ip_address] }
1477
1478   k8s_07_vm_ip:
1479     description: The IP address of the k8s_07 instance
1480     value: { get_attr: [k8s_07_floating_ip, floating_ip_address] }
1481
1482   k8s_08_vm_ip:
1483     description: The IP address of the k8s_08 instance
1484     value: { get_attr: [k8s_08_floating_ip, floating_ip_address] }
1485
1486   k8s_09_vm_ip:
1487     description: The IP address of the k8s_09 instance
1488     value: { get_attr: [k8s_09_floating_ip, floating_ip_address] }
1489
1490   k8s_10_vm_ip:
1491     description: The IP address of the k8s_10 instance
1492     value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }
1493
1494   k8s_11_vm_ip:
1495     description: The IP address of the k8s_11 instance
1496     value: { get_attr: [k8s_11_floating_ip, floating_ip_address] }
1497
1498   k8s_12_vm_ip:
1499     description: The IP address of the k8s_12 instance
1500     value: { get_attr: [k8s_12_floating_ip, floating_ip_address] }
1501