Merge "Disable DHCP on onap_oam_ext subnet"
[integration.git] / deployment / heat / onap-rke / onap-oom.yaml
index c999327..1b97a02 100644 (file)
@@ -19,6 +19,10 @@ parameters:
     type: string
     description: CIDR of the OAM ONAP network
 
+  oam_ext_network_cidr:
+    type: string
+    description: CIDR of the onap_oam_ext network
+
   ubuntu_1804_image:
     type: string
     description: Name of the Ubuntu 18.04 image
@@ -69,23 +73,15 @@ parameters:
 
   docker_version:
     type: string
-    default: "17.03.2"
-
-  rancher_version:
-    type: string
-    default: "1.6.26"
-
-  rancher_agent_version:
-    type: string
-    default: "1.2.11"
+    default: "18.09.5"
 
   kubectl_version:
     type: string
-    default: "1.13.4"
+    default: "1.13.5"
 
   helm_version:
     type: string
-    default: "2.9.1"
+    default: "2.12.3"
 
   helm_deploy_delay:
     type: string
@@ -142,6 +138,13 @@ resources:
         - protocol: 53
         - protocol: 132
 
+  router:
+    type: OS::Neutron::Router
+    properties:
+      name:
+        list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
+      external_gateway_info:
+        network: { get_param: public_net_id }
 
   # ONAP management private network
   oam_network:
@@ -165,19 +168,31 @@ resources:
       cidr: { get_param: oam_network_cidr }
       dns_nameservers: [ "8.8.8.8" ]
 
-  router:
-    type: OS::Neutron::Router
+  oam_router_interface:
+    type: OS::Neutron::RouterInterface
     properties:
-      name:
-        list_join: ['-', [{ get_param: 'OS::stack_name' }, 'router']]
-      external_gateway_info:
-        network: { get_param: public_net_id }
+      router_id: { get_resource: router }
+      subnet_id: { get_resource: oam_subnet }
+
+  oam_ext_network:
+    type: OS::Neutron::Net
+    properties:
+      name: onap_oam_ext
 
-  router_interface:
+  oam_ext_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name: onap_oam_ext
+      network_id: { get_resource: oam_ext_network }
+      cidr: { get_param: oam_ext_network_cidr }
+      enable_dhcp: false
+      dns_nameservers: [ "8.8.8.8" ]
+
+  oam_ext_router_interface:
     type: OS::Neutron::RouterInterface
     properties:
       router_id: { get_resource: router }
-      subnet_id: { get_resource: oam_subnet }
+      subnet_id: { get_resource: oam_ext_subnet }
 
   rancher_private_port:
     type: OS::Neutron::Port
@@ -220,8 +235,6 @@ resources:
             __oom_gerrit_refspec__: { get_param: oom_gerrit_refspec }
             __docker_manifest__: { get_param: docker_manifest }
             __docker_version__: { get_param: docker_version }
-            __rancher_version__: { get_param: rancher_version }
-            __rancher_agent_version__: { get_param: rancher_agent_version }
             __kubectl_version__: { get_param: kubectl_version }
             __helm_version__: { get_param: helm_version }
             __helm_deploy_delay__: { get_param: helm_deploy_delay }
@@ -241,6 +254,12 @@ resources:
               get_attr: [k8s_04_floating_ip, floating_ip_address],
               get_attr: [k8s_05_floating_ip, floating_ip_address],
               get_attr: [k8s_06_floating_ip, floating_ip_address],
+              get_attr: [k8s_07_floating_ip, floating_ip_address],
+              get_attr: [k8s_08_floating_ip, floating_ip_address],
+              get_attr: [k8s_09_floating_ip, floating_ip_address],
+              get_attr: [k8s_10_floating_ip, floating_ip_address],
+              get_attr: [k8s_11_floating_ip, floating_ip_address],
+              get_attr: [k8s_12_floating_ip, floating_ip_address],
             ]
             __k8s_private_ips__: [
               get_attr: [k8s_01_floating_ip, fixed_ip_address],
@@ -249,6 +268,12 @@ resources:
               get_attr: [k8s_04_floating_ip, fixed_ip_address],
               get_attr: [k8s_05_floating_ip, fixed_ip_address],
               get_attr: [k8s_06_floating_ip, fixed_ip_address],
+              get_attr: [k8s_07_floating_ip, fixed_ip_address],
+              get_attr: [k8s_08_floating_ip, fixed_ip_address],
+              get_attr: [k8s_09_floating_ip, fixed_ip_address],
+              get_attr: [k8s_10_floating_ip, fixed_ip_address],
+              get_attr: [k8s_11_floating_ip, fixed_ip_address],
+              get_attr: [k8s_12_floating_ip, fixed_ip_address],
             ]
   k8s_01_private_port:
     type: OS::Neutron::Port
@@ -670,6 +695,426 @@ resources:
       user_data_format: SOFTWARE_CONFIG
       user_data: { get_resource: k8s_06_vm_config }
 
+  k8s_07_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 }
+
+  k8s_07_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      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:
+      name:
+        list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '07' ] ]
+      image: { get_param: ubuntu_1804_image }
+      flavor: { get_param: k8s_vm_flavor }
+      key_name: { get_param: key_name }
+      networks:
+      - port: { get_resource: k8s_07_private_port }
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_07_vm_config }
+
+  k8s_08_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 }
+
+  k8s_08_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      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:
+      name:
+        list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '08' ] ]
+      image: { get_param: ubuntu_1804_image }
+      flavor: { get_param: k8s_vm_flavor }
+      key_name: { get_param: key_name }
+      networks:
+      - port: { get_resource: k8s_08_private_port }
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_08_vm_config }
+
+  k8s_09_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 }
+
+  k8s_09_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      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:
+      name:
+        list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '09' ] ]
+      image: { get_param: ubuntu_1804_image }
+      flavor: { get_param: k8s_vm_flavor }
+      key_name: { get_param: key_name }
+      networks:
+      - port: { get_resource: k8s_09_private_port }
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_09_vm_config }
+
+  k8s_10_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 }
+
+  k8s_10_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      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:
+      name:
+        list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '10' ] ]
+      image: { get_param: ubuntu_1804_image }
+      flavor: { get_param: k8s_vm_flavor }
+      key_name: { get_param: key_name }
+      networks:
+      - port: { get_resource: k8s_10_private_port }
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_10_vm_config }
+
+  k8s_11_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 }
+
+  k8s_11_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      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:
+      name:
+        list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '11' ] ]
+      image: { get_param: ubuntu_1804_image }
+      flavor: { get_param: k8s_vm_flavor }
+      key_name: { get_param: key_name }
+      networks:
+      - port: { get_resource: k8s_11_private_port }
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_11_vm_config }
+
+  k8s_12_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 }
+
+  k8s_12_floating_ip:
+    type: OS::Neutron::FloatingIP
+    properties:
+      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:
+      name:
+        list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '12' ] ]
+      image: { get_param: ubuntu_1804_image }
+      flavor: { get_param: k8s_vm_flavor }
+      key_name: { get_param: key_name }
+      networks:
+      - port: { get_resource: k8s_12_private_port }
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource: k8s_12_vm_config }
+
   orch_1_private_port:
     type: OS::Neutron::Port
     properties:
@@ -881,6 +1326,9 @@ resources:
       user_data: { get_resource: orch_3_vm_config }
 
 outputs:
+  docker_proxy:
+    value: { get_param: docker_proxy }
+
   rancher_vm_ip:
     description: The IP address of the rancher instance
     value: { get_attr: [rancher_floating_ip, floating_ip_address] }
@@ -933,6 +1381,54 @@ outputs:
     description: The private IP address of the k8s_06 instance
     value: { get_attr: [k8s_06_floating_ip, fixed_ip_address] }
 
+  k8s_07_vm_ip:
+    description: The IP address of the k8s_07 instance
+    value: { get_attr: [k8s_07_floating_ip, floating_ip_address] }
+
+  k8s_07_vm_private_ip:
+    description: The private IP address of the k8s_07 instance
+    value: { get_attr: [k8s_07_floating_ip, fixed_ip_address] }
+
+  k8s_08_vm_ip:
+    description: The IP address of the k8s_08 instance
+    value: { get_attr: [k8s_08_floating_ip, floating_ip_address] }
+
+  k8s_08_vm_private_ip:
+    description: The private IP address of the k8s_08 instance
+    value: { get_attr: [k8s_08_floating_ip, fixed_ip_address] }
+
+  k8s_09_vm_ip:
+    description: The IP address of the k8s_09 instance
+    value: { get_attr: [k8s_09_floating_ip, floating_ip_address] }
+
+  k8s_09_vm_private_ip:
+    description: The private IP address of the k8s_09 instance
+    value: { get_attr: [k8s_09_floating_ip, fixed_ip_address] }
+
+  k8s_10_vm_ip:
+    description: The IP address of the k8s_10 instance
+    value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }
+
+  k8s_10_vm_private_ip:
+    description: The private IP address of the k8s_10 instance
+    value: { get_attr: [k8s_10_floating_ip, fixed_ip_address] }
+
+  k8s_11_vm_ip:
+    description: The IP address of the k8s_11 instance
+    value: { get_attr: [k8s_11_floating_ip, floating_ip_address] }
+
+  k8s_11_vm_private_ip:
+    description: The private IP address of the k8s_11 instance
+    value: { get_attr: [k8s_11_floating_ip, fixed_ip_address] }
+
+  k8s_12_vm_ip:
+    description: The IP address of the k8s_12 instance
+    value: { get_attr: [k8s_12_floating_ip, floating_ip_address] }
+
+  k8s_12_vm_private_ip:
+    description: The private IP address of the k8s_12 instance
+    value: { get_attr: [k8s_12_floating_ip, fixed_ip_address] }
+
   orch_1_vm_ip:
     description: The IP address of the orch_1 instance
     value: { get_attr: [orch_1_floating_ip, floating_ip_address] }