Add mtu parameter to OOM heat template
[integration.git] / deployment / heat / onap-oom / onap-oom.yaml
index 7e255db..e6845cc 100644 (file)
@@ -96,6 +96,10 @@ parameters:
     description: Set to "true" if you want to use a RAM disk for /dockerdata-nfs/.
     default: "false"
 
+  mtu:
+    type: number
+    default: 1500
+
 resources:
   random-str:
     type: OS::Heat::RandomString
@@ -217,6 +221,7 @@ resources:
             __helm_version__: { get_param: helm_version }
             __helm_deploy_delay__: { get_param: helm_deploy_delay }
             __use_ramdisk__: { get_param: use_ramdisk }
+            __mtu__: { get_param: mtu }
             __public_net_id__: { get_param: public_net_id }
             __oam_network_cidr__: { get_param: oam_network_cidr }
             __oam_network_id__: { get_resource: oam_network }
@@ -265,6 +270,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_01_private_port }
 
+  k8s_01_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_01_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_01_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_01_vm_scripts }
+
   k8s_01_vm:
     type: OS::Nova::Server
     properties:
@@ -275,18 +323,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_01_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_01_vm_config }
 
   k8s_02_private_port:
     type: OS::Neutron::Port
@@ -302,6 +340,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_02_private_port }
 
+  k8s_02_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_02_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_02_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_02_vm_scripts }
+
   k8s_02_vm:
     type: OS::Nova::Server
     properties:
@@ -312,18 +393,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_02_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_02_vm_config }
 
   k8s_03_private_port:
     type: OS::Neutron::Port
@@ -339,6 +410,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_03_private_port }
 
+  k8s_03_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_03_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_03_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_03_vm_scripts }
+
   k8s_03_vm:
     type: OS::Nova::Server
     properties:
@@ -349,18 +463,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_03_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_03_vm_config }
 
   k8s_04_private_port:
     type: OS::Neutron::Port
@@ -376,6 +480,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_04_private_port }
 
+  k8s_04_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_04_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_04_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_04_vm_scripts }
+
   k8s_04_vm:
     type: OS::Nova::Server
     properties:
@@ -386,18 +533,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_04_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_04_vm_config }
 
   k8s_05_private_port:
     type: OS::Neutron::Port
@@ -413,6 +550,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_05_private_port }
 
+  k8s_05_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_05_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_05_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_05_vm_scripts }
+
   k8s_05_vm:
     type: OS::Nova::Server
     properties:
@@ -423,18 +603,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_05_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_05_vm_config }
 
   k8s_06_private_port:
     type: OS::Neutron::Port
@@ -450,6 +620,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_06_private_port }
 
+  k8s_06_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_06_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_06_vm_scripts }
+
   k8s_06_vm:
     type: OS::Nova::Server
     properties:
@@ -460,18 +673,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_06_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_06_vm_config }
 
   k8s_07_private_port:
     type: OS::Neutron::Port
@@ -487,6 +690,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_07_private_port }
 
+  k8s_07_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_07_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_07_vm_scripts }
+
   k8s_07_vm:
     type: OS::Nova::Server
     properties:
@@ -497,18 +743,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_07_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_07_vm_config }
 
   k8s_08_private_port:
     type: OS::Neutron::Port
@@ -524,6 +760,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_08_private_port }
 
+  k8s_08_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_08_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_08_vm_scripts }
+
   k8s_08_vm:
     type: OS::Nova::Server
     properties:
@@ -534,18 +813,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_08_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_08_vm_config }
 
   k8s_09_private_port:
     type: OS::Neutron::Port
@@ -561,6 +830,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_09_private_port }
 
+  k8s_09_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_09_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_09_vm_scripts }
+
   k8s_09_vm:
     type: OS::Nova::Server
     properties:
@@ -571,18 +883,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_09_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_09_vm_config }
 
   k8s_10_private_port:
     type: OS::Neutron::Port
@@ -598,6 +900,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_10_private_port }
 
+  k8s_10_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_10_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_10_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_10_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_10_vm_scripts }
+
   k8s_10_vm:
     type: OS::Nova::Server
     properties:
@@ -608,18 +953,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_10_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_10_vm_config }
 
   k8s_11_private_port:
     type: OS::Neutron::Port
@@ -635,6 +970,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_11_private_port }
 
+  k8s_11_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_11_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_11_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_11_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_11_vm_scripts }
+
   k8s_11_vm:
     type: OS::Nova::Server
     properties:
@@ -645,18 +1023,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_11_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_11_vm_config }
 
   k8s_12_private_port:
     type: OS::Neutron::Port
@@ -672,6 +1040,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: k8s_12_private_port }
 
+  k8s_12_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [k8s_12_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [k8s_12_floating_ip, fixed_ip_address] }
+                __host_label__: 'compute'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  k8s_12_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: k8s_12_vm_scripts }
+
   k8s_12_vm:
     type: OS::Nova::Server
     properties:
@@ -682,18 +1093,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: k8s_12_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'compute'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_12_vm_config }
 
   etcd_1_private_port:
     type: OS::Neutron::Port
@@ -709,6 +1110,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: etcd_1_private_port }
 
+  etcd_1_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [etcd_1_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [etcd_1_floating_ip, fixed_ip_address] }
+                __host_label__: 'etcd'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  etcd_1_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: etcd_1_vm_scripts }
+
   etcd_1_vm:
     type: OS::Nova::Server
     properties:
@@ -719,18 +1163,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: etcd_1_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'etcd'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: etcd_1_vm_config }
 
   etcd_2_private_port:
     type: OS::Neutron::Port
@@ -746,6 +1180,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: etcd_2_private_port }
 
+  etcd_2_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [etcd_2_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [etcd_2_floating_ip, fixed_ip_address] }
+                __host_label__: 'etcd'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  etcd_2_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: etcd_2_vm_scripts }
+
   etcd_2_vm:
     type: OS::Nova::Server
     properties:
@@ -756,18 +1233,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: etcd_2_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'etcd'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: etcd_2_vm_config }
 
   etcd_3_private_port:
     type: OS::Neutron::Port
@@ -783,6 +1250,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: etcd_3_private_port }
 
+  etcd_3_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [etcd_3_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [etcd_3_floating_ip, fixed_ip_address] }
+                __host_label__: 'etcd'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  etcd_3_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: etcd_3_vm_scripts }
+
   etcd_3_vm:
     type: OS::Nova::Server
     properties:
@@ -793,18 +1303,8 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: etcd_3_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'etcd'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: etcd_3_vm_config }
 
   orch_1_private_port:
     type: OS::Neutron::Port
@@ -820,6 +1320,49 @@ resources:
       floating_network_id: { get_param: public_net_id }
       port_id: { get_resource: orch_1_private_port }
 
+  orch_1_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [orch_1_floating_ip, fixed_ip_address] }
+                __host_label__: 'orchestration'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  orch_1_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: orch_1_vm_scripts }
+
   orch_1_vm:
     type: OS::Nova::Server
     properties:
@@ -830,18 +1373,78 @@ resources:
       key_name: { get_param: key_name }
       networks:
       - port: { get_resource: orch_1_private_port }
-      user_data_format: RAW
-      user_data:
-        str_replace:
-          params:
-            __docker_proxy__: { get_param: docker_proxy }
-            __apt_proxy__: { get_param: apt_proxy }
-            __docker_version__: { get_param: docker_version }
-            __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
-            __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
-            __host_label__: 'orchestration'
-          template:
-            get_file: k8s_vm_entrypoint.sh
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: orch_1_vm_config }
+
+  orch_2_private_port:
+    type: OS::Neutron::Port
+    properties:
+      network: { get_resource: oam_network }
+      fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
+      security_groups:
+      - { get_resource: onap_sg }
+
+  orch_2_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      floating_network_id: { get_param: public_net_id }
+      port_id: { get_resource: orch_2_private_port }
+
+  orch_2_vm_scripts:
+    type: OS::Heat::CloudConfig
+    properties:
+      cloud_config:
+        power_state:
+          mode: reboot
+        runcmd:
+        - [ /opt/k8s_vm_install.sh ]
+        write_files:
+        - path: /opt/k8s_vm_install.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __docker_proxy__: { get_param: docker_proxy }
+                __apt_proxy__: { get_param: apt_proxy }
+                __docker_version__: { get_param: docker_version }
+                __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
+                __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
+                __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
+                __mtu__: { get_param: mtu }
+              template:
+                get_file: k8s_vm_install.sh
+        - path: /opt/k8s_vm_init.sh
+          permissions: '0755'
+          content:
+            str_replace:
+              params:
+                __host_private_ip_addr__: { get_attr: [orch_2_floating_ip, fixed_ip_address] }
+                __host_label__: 'orchestration'
+              template:
+                get_file: k8s_vm_init.sh
+        - path: /etc/init.d/k8s_vm_init_serv
+          permissions: '0755'
+          content:
+            get_file: k8s_vm_init_serv.sh
+
+  orch_2_vm_config:
+    type: OS::Heat::MultipartMime
+    properties:
+      parts:
+      - config: { get_resource: orch_2_vm_scripts }
+
+  orch_2_vm:
+    type: OS::Nova::Server
+    properties:
+      name:
+        list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '2' ] ]
+      image: { get_param: ubuntu_1604_image }
+      flavor: { get_param: orch_vm_flavor }
+      key_name: { get_param: key_name }
+      networks:
+      - port: { get_resource: orch_2_private_port }
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: orch_2_vm_config }
 
 outputs:
   rancher_vm_ip: