Merge "Deploy multirack env with L3"
diff --git a/de/heat-templates/env/main-wrkr3-rack1-cmp3-rack2-cmp3.yaml b/de/heat-templates/env/main-wrkr3-rack1-cmp3-rack2-cmp3.yaml
deleted file mode 100644
index a08911e..0000000
--- a/de/heat-templates/env/main-wrkr3-rack1-cmp3-rack2-cmp3.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
-resource_registry:
-  "MCP2::CentralSite": ../fragments/multirack/CentralSite.yaml
-  "MCP2::Rack": ../fragments/multirack/Rack.yaml
-  "MCP2::RackRouterRoutes": ../fragments/multirack/RackRouterRoutes.yaml
-
-parameters:
-  image: bionic-server-cloudimg-amd64-20190612
-  public_net_id: public
-  main_worker_size: 3
-  rack01_cmp_size: 3
-  rack02_cmp_size: 3
-  cluster_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp0evjOaK8c8SKYK4r2+0BN7g+8YSvQ2n8nFgOURCyvkJqOHi1qPGZmuN0CclYVdVuZiXbWw3VxRbSW3EH736VzgY1U0JmoTiSamzLHaWsXvEIW8VCi7boli539QJP0ikJiBaNAgZILyCrVPN+A6mfqtacs1KXdZ0zlMq1BPtFciR1JTCRcVs5vP2Wwz5QtY2jMIh3aiwkePjMTQPcfmh1TkOlxYu5IbQyZ3G1ahA0mNKI9a0dtF282av/F6pwB/N1R1nEZ/9VtcN2I1mf1NW/tTHEEcTzXYo1R/8K9vlqAN8QvvGLZtZduGviNVNoNWvoxaXxDt8CPv2B2NCdQFZp
-  tunnel_interface: 'ens3'
-  main_worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","openstack-gateway": "enabled","role":"ceph-osd-node","local-volume-provisioner": "enabled"}}
-  rack01_cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled"}}
-  rack02_cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled"}}
-  # hardware_metadata which is used for Ceph requires flavor with
-  # ephemeral storage because it is used for Ceph bluestore.
-  main_worker_flavor: 'system.compact.openstack.control.ephemeral'
-  rack01_cmp_flavor: 'system.compact.openstack.control.ephemeral'
-  docker_ucp_image: docker-dev-kaas-local.docker.mirantis.net/lcm/docker/ucp:3.3.3
-  docker_ee_url: https://storebits.docker.com/ubuntu
-  docker_ee_release: stable-19.03
-  main_worker_hardware_metadata: |
-    '00:00:00:00:00:00':
-      write_files:
-        - path: /usr/share/metadata/ceph.yaml
-          content: |
-            storageDevices:
-              - name: vdb
-                role: hdd
-                sizeGb: 20
-            ramGb: 8
-            cores: 2
-            # The roles will be assigned based on node labels.
-            # roles:
-            #   - mon
-            #   - mgr
-            ips:
-              - 192.168.122.101
-            crushPath: {}
diff --git a/de/heat-templates/env/main-wrkr5-rack1-cmp1-rack2-cmp1.yaml b/de/heat-templates/env/main-wrkr5-rack1-cmp1-rack2-cmp1.yaml
new file mode 100644
index 0000000..622591f
--- /dev/null
+++ b/de/heat-templates/env/main-wrkr5-rack1-cmp1-rack2-cmp1.yaml
@@ -0,0 +1,93 @@
+resource_registry:
+  "MCP2::CentralSite": ../fragments/multirack/CentralSite.yaml
+  "MCP2::Rack": ../fragments/multirack/Rack.yaml
+  "MCP2::RackRouterRoutes": ../fragments/multirack/RackRouterRoutes.yaml
+
+parameters:
+  image: bionic-server-cloudimg-amd64-20190612
+  public_net_id: public
+  main_worker_size: 5
+  rack01_cmp_size: 1
+  rack02_cmp_size: 1
+  cluster_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp0evjOaK8c8SKYK4r2+0BN7g+8YSvQ2n8nFgOURCyvkJqOHi1qPGZmuN0CclYVdVuZiXbWw3VxRbSW3EH736VzgY1U0JmoTiSamzLHaWsXvEIW8VCi7boli539QJP0ikJiBaNAgZILyCrVPN+A6mfqtacs1KXdZ0zlMq1BPtFciR1JTCRcVs5vP2Wwz5QtY2jMIh3aiwkePjMTQPcfmh1TkOlxYu5IbQyZ3G1ahA0mNKI9a0dtF282av/F6pwB/N1R1nEZ/9VtcN2I1mf1NW/tTHEEcTzXYo1R/8K9vlqAN8QvvGLZtZduGviNVNoNWvoxaXxDt8CPv2B2NCdQFZp
+  tunnel_interface: 'ens3'
+  main_worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","openstack-gateway": "enabled","role":"ceph-osd-node","local-volume-provisioner": "enabled"}}
+  rack01_cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled"}}
+  rack02_cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled"}}
+  # hardware_metadata which is used for Ceph requires flavor with
+  # ephemeral storage because it is used for Ceph bluestore.
+  main_worker_flavor: 'system.compact.openstack.control.ephemeral'
+  rack01_cmp_flavor: 'system.compact.openstack.control.ephemeral'
+  docker_ucp_image: docker-dev-kaas-local.docker.mirantis.net/lcm/docker/ucp:3.3.3
+  docker_ee_url: https://storebits.docker.com/ubuntu
+  docker_ee_release: stable-19.03
+  private_floating_interface: 'ens4'
+  rack_private_floating_interface: 'veth-phy'
+  main_worker_hardware_metadata: |
+    '00:00:00:00:00:00':
+      write_files:
+        - path: /usr/share/metadata/ceph.yaml
+          content: |
+            storageDevices:
+              - name: vdb
+                role: hdd
+                sizeGb: 20
+            ramGb: 8
+            cores: 2
+            # The roles will be assigned based on node labels.
+            # roles:
+            #   - mon
+            #   - mgr
+            ips:
+              - 192.168.122.101
+            crushPath: {}
+
+  rack_functions_override: |
+
+    function network_config {
+        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
+        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
+
+        local public_interface=${1:-${PUBLIC_INTERFACE}}
+        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
+        local match_ip_line
+
+        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
+
+    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
+    [NetDev]
+    Name=veth-phy
+    Kind=veth
+    [Peer]
+    Name=veth-br
+    EOF
+
+        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
+        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
+
+        public_address_match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
+        sed -i "$((${public_address_match_ip_line}-1)),$((${public_address_match_ip_line}))d" ${cloud_netplan_cfg}
+
+    cat << EOF >> ${cloud_netplan_cfg}
+        bridges:
+            br-public:
+                dhcp4: false
+    EOF
+
+    # Remove Tunnel interface from netplan
+    if [[ $TUNNEL_INTERFACE_NETPLAN_MANAGE == false ]]; then
+        sed -i "/        ${TUNNEL_INTERFACE}/,/            set-name: ${TUNNEL_INTERFACE}/d" ${cloud_netplan_cfg}
+    fi
+
+        netplan --debug apply
+
+        # NOTE(vsaienko): give some time to apply changes
+        sleep 15
+
+    # Remove Tunnel interface from netplan
+    if [[ $TUNNEL_INTERFACE_NETPLAN_MANAGE == false ]]; then
+        ip addr flush ${TUNNEL_INTERFACE}
+        ip link set ${TUNNEL_INTERFACE} up
+    fi
+
+    }
diff --git a/de/heat-templates/env/main-wrkr5-rack1-cmp2-rack2-cmp2.yaml b/de/heat-templates/env/main-wrkr5-rack1-cmp2-rack2-cmp2.yaml
new file mode 100644
index 0000000..07ce799
--- /dev/null
+++ b/de/heat-templates/env/main-wrkr5-rack1-cmp2-rack2-cmp2.yaml
@@ -0,0 +1,93 @@
+resource_registry:
+  "MCP2::CentralSite": ../fragments/multirack/CentralSite.yaml
+  "MCP2::Rack": ../fragments/multirack/Rack.yaml
+  "MCP2::RackRouterRoutes": ../fragments/multirack/RackRouterRoutes.yaml
+
+parameters:
+  image: bionic-server-cloudimg-amd64-20190612
+  public_net_id: public
+  main_worker_size: 5
+  rack01_cmp_size: 2
+  rack02_cmp_size: 2
+  cluster_public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCp0evjOaK8c8SKYK4r2+0BN7g+8YSvQ2n8nFgOURCyvkJqOHi1qPGZmuN0CclYVdVuZiXbWw3VxRbSW3EH736VzgY1U0JmoTiSamzLHaWsXvEIW8VCi7boli539QJP0ikJiBaNAgZILyCrVPN+A6mfqtacs1KXdZ0zlMq1BPtFciR1JTCRcVs5vP2Wwz5QtY2jMIh3aiwkePjMTQPcfmh1TkOlxYu5IbQyZ3G1ahA0mNKI9a0dtF282av/F6pwB/N1R1nEZ/9VtcN2I1mf1NW/tTHEEcTzXYo1R/8K9vlqAN8QvvGLZtZduGviNVNoNWvoxaXxDt8CPv2B2NCdQFZp
+  tunnel_interface: 'ens3'
+  main_worker_metadata: {"labels": {"openstack-control-plane":"enabled","openvswitch":"enabled","openstack-gateway": "enabled","role":"ceph-osd-node","local-volume-provisioner": "enabled"}}
+  rack01_cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled"}}
+  rack02_cmp_metadata: {"labels": {"openstack-compute-node":"enabled","openvswitch":"enabled"}}
+  # hardware_metadata which is used for Ceph requires flavor with
+  # ephemeral storage because it is used for Ceph bluestore.
+  main_worker_flavor: 'system.compact.openstack.control.ephemeral'
+  rack01_cmp_flavor: 'system.compact.openstack.control.ephemeral'
+  docker_ucp_image: docker-dev-kaas-local.docker.mirantis.net/lcm/docker/ucp:3.3.3
+  docker_ee_url: https://storebits.docker.com/ubuntu
+  docker_ee_release: stable-19.03
+  private_floating_interface: 'ens4'
+  rack_private_floating_interface: 'veth-phy'
+  main_worker_hardware_metadata: |
+    '00:00:00:00:00:00':
+      write_files:
+        - path: /usr/share/metadata/ceph.yaml
+          content: |
+            storageDevices:
+              - name: vdb
+                role: hdd
+                sizeGb: 20
+            ramGb: 8
+            cores: 2
+            # The roles will be assigned based on node labels.
+            # roles:
+            #   - mon
+            #   - mgr
+            ips:
+              - 192.168.122.101
+            crushPath: {}
+
+  rack_functions_override: |
+
+    function network_config {
+        PUBLIC_NODE_IP_ADDRESS=${PUBLIC_INTERFACE_IP:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+' | egrep -v "127.0.|172.17")}
+        PUBLIC_NODE_IP_NETMASK=${PUBLIC_INTERFACE_NETMASK:-$(ip addr show dev ${PUBLIC_INTERFACE} | grep -Po 'inet \K[\d.]+\/[\d]+' | egrep -v "127.0.|172.17" | cut -d'/' -f2)}
+
+        local public_interface=${1:-${PUBLIC_INTERFACE}}
+        local cloud_netplan_cfg="/etc/netplan/50-cloud-init.yaml"
+        local match_ip_line
+
+        DEBIAN_FRONTEND=noninteractive apt -y install bridge-utils
+
+    cat << EOF > /etc/systemd/network/10-veth-phy-br.netdev
+    [NetDev]
+    Name=veth-phy
+    Kind=veth
+    [Peer]
+    Name=veth-br
+    EOF
+
+        sed -i 's/.*ethernets:.*/&\n        veth-phy: {}/' ${cloud_netplan_cfg}
+        sed -i 's/.*ethernets:.*/&\n        veth-br: {}/' ${cloud_netplan_cfg}
+
+        public_address_match_ip_line=$(grep -nm1 "${PUBLIC_NODE_IP_ADDRESS}/${PUBLIC_NODE_IP_NETMASK}" ${cloud_netplan_cfg} | cut -d: -f1)
+        sed -i "$((${public_address_match_ip_line}-1)),$((${public_address_match_ip_line}))d" ${cloud_netplan_cfg}
+
+    cat << EOF >> ${cloud_netplan_cfg}
+        bridges:
+            br-public:
+                dhcp4: false
+    EOF
+
+    # Remove Tunnel interface from netplan
+    if [[ $TUNNEL_INTERFACE_NETPLAN_MANAGE == false ]]; then
+        sed -i "/        ${TUNNEL_INTERFACE}/,/            set-name: ${TUNNEL_INTERFACE}/d" ${cloud_netplan_cfg}
+    fi
+
+        netplan --debug apply
+
+        # NOTE(vsaienko): give some time to apply changes
+        sleep 15
+
+    # Remove Tunnel interface from netplan
+    if [[ $TUNNEL_INTERFACE_NETPLAN_MANAGE == false ]]; then
+        ip addr flush ${TUNNEL_INTERFACE}
+        ip link set ${TUNNEL_INTERFACE} up
+    fi
+
+    }
diff --git a/de/heat-templates/fragments/multirack/CentralSite.yaml b/de/heat-templates/fragments/multirack/CentralSite.yaml
index 79837d2..53b72b3 100644
--- a/de/heat-templates/fragments/multirack/CentralSite.yaml
+++ b/de/heat-templates/fragments/multirack/CentralSite.yaml
@@ -17,7 +17,6 @@
   boot_timeout:
     type: number
     description: Boot timeout for instance
-    default: 3600
   public_net_id:
     type: string
   docker_ee_release:
@@ -40,24 +39,35 @@
   tunnel_network_cidr:
     description: The CIDR for control network
     type: string
+  storage_backend_interface:
+    type: string
   storage_backend_network_cidr:
     description: The CIDR for control network
     type: string
+  storage_frontend_interface:
+    type: string
   storage_frontend_network_cidr:
     description: The CIDR for control network
     type: string
   private_floating_network_cidr:
     description: The CIDR for control network
     type: string
-  private_floating_network_interface:
+  private_floating_interface:
     description: The CIDR for control network
     type: string
+  private_floating_network_ipam_pool_start:
+    type: string
+  private_floating_network_ipam_pool_end:
+    type: string
   worker_size:
     type: number
   worker_metadata:
     type: json
   worker_flavor:
     type: string
+  dns_nameservers:
+    type: json
+    default: []
 
 resources:
   router:
@@ -74,9 +84,7 @@
       network: { get_resource: control_network }
       enable_dhcp: true
       cidr: { get_param: control_network_cidr }
-      dns_nameservers:
-        - 172.18.224.6
-        - 172.18.176.6
+      dns_nameservers: { get_param: dns_nameservers }
 
   router_control_iface:
     type: OS::Neutron::RouterInterface
@@ -123,13 +131,6 @@
       enable_dhcp: true
       cidr: { get_param: storage_backend_network_cidr }
 
-  router_storage_backend_iface:
-    type: OS::Neutron::RouterInterface
-    properties:
-      router: { get_resource: router }
-      subnet: { get_resource: storage_backend_subnet }
-
-
   private_floating_network:
     type: OS::Neutron::Net
   private_floating_subnet:
@@ -137,8 +138,11 @@
     properties:
       gateway_ip: ~
       network: { get_resource: private_floating_network }
-      enable_dhcp: true
+      enable_dhcp: false
       cidr: { get_param: private_floating_network_cidr }
+      allocation_pools:
+        - start: { get_param: private_floating_network_ipam_pool_start }
+          end: { get_param: private_floating_network_ipam_pool_end }
 
 
   ucp:
@@ -158,11 +162,12 @@
       control_network: { get_resource: control_network }
       private_floating_network: { get_resource: private_floating_network }
       private_floating_subnet_id: { get_resource: private_floating_subnet }
-      private_floating_interface: { get_param: private_floating_network_interface }
+      private_floating_interface: { get_param: private_floating_interface }
       private_floating_network_cidr: { get_param: private_floating_network_cidr }
       control_subnet_id: { get_resource: control_subnet }
       public_net_id: { get_param: public_net_id }
       control_network_cidr: { get_param: control_network_cidr }
+      boot_timeout: { get_param: boot_timeout }
 
   worker:
     type: OS::Heat::ResourceGroup
@@ -188,10 +193,19 @@
           control_network_cidr: { get_param: control_network_cidr }
           private_floating_network: { get_resource: private_floating_network }
           private_floating_subnet_id: { get_resource: private_floating_subnet }
-          private_floating_interface: { get_param: private_floating_network_interface }
+          private_floating_interface: { get_param: private_floating_interface }
           private_floating_network_cidr: { get_param: private_floating_network_cidr }
           public_net_id: { get_param: public_net_id }
           hardware_metadata: { get_param: worker_hardware_metadata}
+          boot_timeout: { get_param: boot_timeout }
+          storage_backend_network: { get_resource: storage_backend_network }
+          storage_backend_subnet_id: { get_resource: storage_backend_subnet }
+          storage_backend_interface: { get_param: storage_backend_interface }
+          storage_backend_network_cidr: { get_param: storage_backend_network_cidr }
+          storage_frontend_network: { get_resource: storage_frontend_network }
+          storage_frontend_subnet_id: { get_resource: storage_frontend_subnet }
+          storage_frontend_interface: { get_param: storage_frontend_interface }
+          storage_frontend_network_cidr: { get_param: storage_frontend_network_cidr }
 
 outputs:
   worker_public_ip:
@@ -200,7 +214,7 @@
   ucp_public_ip:
     description: IP address of server in private network
     value: { get_attr: [ucp, server_public_ip] }
-  ucp_control_ip:                
+  ucp_control_ip:
     description: IP address of server in private network
     value: { get_attr: [ucp, server_control_ip] }
   worker_wc_data:
@@ -208,3 +222,6 @@
     value: { get_attr: [worker, wc_data]}
   router_id:
     value: { get_resource: router }
+  server_private_floating_ip:
+    description: IP address of server in private floating network
+    value: { get_attr: [worker, server_private_floating_ip] }
diff --git a/de/heat-templates/fragments/multirack/Rack.yaml b/de/heat-templates/fragments/multirack/Rack.yaml
index 0170933..0801a63 100644
--- a/de/heat-templates/fragments/multirack/Rack.yaml
+++ b/de/heat-templates/fragments/multirack/Rack.yaml
@@ -19,7 +19,6 @@
   boot_timeout:
     type: number
     description: Boot timeout for instance
-    default: 3600
   ucp_master_host:
     type: string
   public_net_id:
@@ -37,6 +36,13 @@
     type: string
   cmp_size:
     type: number
+  docker_default_address_pool:
+    type: string
+  private_floating_interface:
+    type: string
+  functions_override:
+    type: string
+
 resources:
 
   control_network:
@@ -79,6 +85,10 @@
           public_net_id: { get_param: public_net_id }
           control_network_cidr: { get_param: control_network_cidr }
           ucp_master_host: { get_param: ucp_master_host }
+          docker_default_address_pool: { get_param: docker_default_address_pool }
+          boot_timeout: { get_param: boot_timeout }
+          private_floating_interface: { get_param: private_floating_interface }
+          functions_override: { get_param: functions_override }
 
 outputs:
   cmp_public_ip:
diff --git a/de/heat-templates/fragments/multirack/SrvInstancesVM.yaml b/de/heat-templates/fragments/multirack/SrvInstancesVM.yaml
index 7853470..5879d30 100644
--- a/de/heat-templates/fragments/multirack/SrvInstancesVM.yaml
+++ b/de/heat-templates/fragments/multirack/SrvInstancesVM.yaml
@@ -36,7 +36,6 @@
   boot_timeout:
     type: number
     description: Boot timeout for instance
-    default: 3600
   ucp_master_host:
     type: string
     default: ''
diff --git a/de/heat-templates/fragments/multirack/SrvInstancesVMCeph.yaml b/de/heat-templates/fragments/multirack/SrvInstancesVMCeph.yaml
index ee68b2a..c0d94b2 100644
--- a/de/heat-templates/fragments/multirack/SrvInstancesVMCeph.yaml
+++ b/de/heat-templates/fragments/multirack/SrvInstancesVMCeph.yaml
@@ -36,7 +36,6 @@
   boot_timeout:
     type: number
     description: Boot timeout for instance
-    default: 3600
   ucp_master_host:
     type: string
   public_net_id:
@@ -54,6 +53,33 @@
     description: The content of lab metadata.
     default: ''
     type: string
+  storage_backend_network:
+    type: string
+  storage_backend_subnet_id:
+    type: string
+  storage_backend_network_cidr:
+    description: The CIDR for control network
+    type: string
+  storage_backend_interface:
+    type: string
+  storage_frontend_network:
+    type: string
+  storage_frontend_subnet_id:
+    type: string
+  storage_frontend_interface:
+    type: string
+  storage_frontend_network_cidr:
+    description: The CIDR for control network
+    type: string
+  user_data_config:
+    description: This is part of clout-config which denies to mount drive with label ephemeral0 to /mnt
+    type: string
+    default: |
+      #cloud-config
+      #
+      # Don't mount ephemeral0 to /mnt as it's by default
+      mounts:
+        - [ ephemeral0, null ]
 
 resources:
 
@@ -79,6 +105,12 @@
             $functions_override: { get_param: functions_override }
             $docker_ucp_image: { get_param: docker_ucp_image }
             $docker_default_address_pool: { get_param: docker_default_address_pool }
+            $storage_frontend_interface: { get_param: storage_frontend_interface }
+            $storage_frontend_network_interface_ip: { get_attr: [storage_frontend_server_port, fixed_ips, 0, ip_address] }
+            $storage_frontend_network_cidr: { get_param: storage_frontend_network_cidr }
+            $storage_backend_interface: { get_param: storage_backend_interface }
+            $storage_backend_network_interface_ip: { get_attr: [storage_backend_server_port, fixed_ips, 0, ip_address] }
+            $storage_backend_network_cidr: { get_param: storage_backend_network_cidr }
 
   inject_files:
     type: "OS::Heat::CloudConfig"
@@ -93,6 +125,19 @@
             owner: "root:root"
             permissions: "0644"
             content: { get_param: hardware_metadata}
+          - path: /etc/netplan/99-dhcp-overrides.yaml
+            owner: "root:root"
+            permissions: "0644"
+            content: |
+              network:
+                version: 2
+                ethernets:
+                  ens6:
+                    dhcp4-overrides:
+                      use-routes: false
+                  ens5:
+                    dhcp4-overrides:
+                      use-routes: false
 
   install_config_agent:
     type: "OS::Heat::MultipartMime"
@@ -100,6 +145,7 @@
       parts:
       - config: {get_resource: software_config}
       - config: {get_resource: inject_files}
+      - config: {get_param: user_data_config}
 
   server:
     type: OS::Nova::Server
@@ -112,6 +158,8 @@
       networks:
         - port: { get_resource: control_server_port }
         - port: { get_resource: private_floating_server_port }
+        - port: { get_resource: storage_frontend_server_port }
+        - port: { get_resource: storage_backend_server_port }
       user_data_format: SOFTWARE_CONFIG
       user_data: { get_resource:  install_config_agent}
       metadata: { get_param: metadata }
@@ -132,6 +180,22 @@
       fixed_ips:
         - subnet: { get_param: private_floating_subnet_id }
 
+  storage_frontend_server_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: storage_frontend_network }
+      port_security_enabled: false
+      fixed_ips:
+        - subnet: { get_param: storage_frontend_subnet_id }
+
+  storage_backend_server_port:
+    type: OS::Neutron::Port
+    properties:
+      network_id: { get_param: storage_backend_network }
+      port_security_enabled: false
+      fixed_ips:
+        - subnet: { get_param: storage_backend_subnet_id }
+
   server_floating_ip:
     type: OS::Neutron::FloatingIP
     properties:
@@ -156,3 +220,6 @@
   wc_data:
     description: Metadata from instance
     value: { get_attr: [wait_condition, data]}
+  server_private_floating_ip:
+    description: IP address of server in private floating network
+    value: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
diff --git a/de/heat-templates/fragments/multirack/SrvInstancesVMRack.yaml b/de/heat-templates/fragments/multirack/SrvInstancesVMRack.yaml
index 94e71c6..783eb61 100644
--- a/de/heat-templates/fragments/multirack/SrvInstancesVMRack.yaml
+++ b/de/heat-templates/fragments/multirack/SrvInstancesVMRack.yaml
@@ -28,7 +28,6 @@
   boot_timeout:
     type: number
     description: Boot timeout for instance
-    default: 3600
   ucp_master_host:
     type: string
     default: ''
@@ -47,6 +46,8 @@
     description: The content of lab metadata.
     default: ''
     type: string
+  private_floating_interface:
+    type: string
 
 resources:
 
@@ -69,6 +70,7 @@
             $docker_ucp_image: { get_param: docker_ucp_image }
             $docker_default_address_pool: { get_param: docker_default_address_pool }
             $functions_override: { get_param: functions_override }
+            $private_floating_interface: { get_param: private_floating_interface }
 
   inject_files:
     type: "OS::Heat::CloudConfig"
diff --git a/de/heat-templates/multirack.yaml b/de/heat-templates/multirack.yaml
index 5833899..8e37448 100644
--- a/de/heat-templates/multirack.yaml
+++ b/de/heat-templates/multirack.yaml
@@ -10,6 +10,9 @@
     description: >
       ID of public network for which floating IP addresses will be allocated/
       for baremetal case flat provision network for nodes
+  dns_nameservers:
+    type: json
+    default: ['172.18.224.6', '172.18.176.6']
   lab_network_cidr:
     type: string
     default: '10.0.0.0/8'
@@ -25,16 +28,42 @@
     default: '10.0.2.0/24'
   main_storage_frontend_network_cidr:
     type: string
-    default: '10.0.3.0/24'
+    default: '10.12.0.0/24'
+  main_storage_frontend_interface:
+    type: string
+    default: 'ens5'
   main_storage_backend_network_cidr:
     type: string
-    default: '10.0.4.0/24'
-  main_private_floating_network_cidr:
+    default: '10.11.0.0/24'
+  main_storage_backend_interface:
     type: string
-    default: '10.0.5.0/24'
-  main_private_floating_network_interface:
+    default: 'ens6'
+  private_floating_network_cidr:
     type: string
-    default: 'ens4'
+    default: '10.11.12.0/24'
+  private_floating_network_ipam_pool_start:
+    type: string
+    description: pool start which is used as pool for IPAM and assigned to instances port
+    default: '10.11.12.2'
+  private_floating_network_ipam_pool_end:
+    type: string
+    description: pool end which is used as pool for IPAM and assigned to instances port
+    default: '10.11.12.99'
+  private_floating_network_pool_start:
+    type: string
+    default: '10.11.12.100'
+  private_floating_network_pool_end:
+    type: string
+    default: '10.11.12.200'
+  private_floating_network_gateway:
+    type: string
+    default: ''
+  private_floating_network_interface:
+    type: string
+    default: 'veth-phy'
+  private_floating_interface:
+    description: Interface which carries floating network for child OpenStack.
+    type: string
   rack01_network_cidr:
     type: string
     default: '10.1.0.0/16'
@@ -104,12 +133,36 @@
     default: 'docker/ucp:3.2.4'
   docker_default_address_pool:
     type: string
+    description: Default address pool for Docker ucp specific local networks
+    default: '10.10.1.0/16'
   tunnel_interface:
     type: string
     default: ''
+  tungstenfabric_enabled:
+    type: boolean
+    default: false
+  live_migration_interface:
+    type: string
+    default: ''
+  metallb_address_pools:
+    type: comma_delimited_list
+    default: ''
   main_worker_hardware_metadata:
     type: string
     default: ''
+  central_boot_timeout:
+    type: number
+    description: Boot timeout for central site instances
+    default: 5400
+  rack_boot_timeout:
+    type: number
+    description: Boot timeout for rack instances
+    default: 3600
+  rack_private_floating_interface:
+    type: string
+  rack_functions_override:
+    type: string
+    default: ''
 
 resources:
   keypair_name:
@@ -139,14 +192,20 @@
       public_net_id: { get_param: public_net_id }
       control_network_cidr: { get_param: main_control_network_cidr }
       tunnel_network_cidr: { get_param: main_tunnel_network_cidr }
+      storage_frontend_interface: { get_param: main_storage_frontend_interface }
       storage_frontend_network_cidr: { get_param: main_storage_frontend_network_cidr }
+      storage_backend_interface: { get_param: main_storage_backend_interface }
       storage_backend_network_cidr: { get_param: main_storage_backend_network_cidr }
-      private_floating_network_cidr: { get_param: main_private_floating_network_cidr }
-      private_floating_network_interface: { get_param: main_private_floating_network_interface }
+      private_floating_network_cidr: { get_param: private_floating_network_cidr }
+      private_floating_interface: { get_param: private_floating_interface }
+      private_floating_network_ipam_pool_start: { get_param: private_floating_network_ipam_pool_start }
+      private_floating_network_ipam_pool_end: { get_param: private_floating_network_ipam_pool_end }
       worker_size: { get_param: main_worker_size }
       worker_flavor: { get_param: main_worker_flavor }
       worker_metadata: { get_param: main_worker_metadata }
       worker_hardware_metadata: { get_param: main_worker_hardware_metadata }
+      dns_nameservers: { get_param: dns_nameservers }
+      boot_timeout: { get_param: central_boot_timeout }
 
   rack01_router_routes:
     type: MCP2::RackRouterRoutes
@@ -175,6 +234,9 @@
       cmp_metadata: { get_param: rack01_cmp_metadata }
       ucp_master_host: { get_attr: [central_site, ucp_control_ip] }
       rack_router: {get_attr: [rack01_router_routes, router_id] }
+      boot_timeout: { get_param: rack_boot_timeout }
+      private_floating_interface: { get_param: rack_private_floating_interface }
+      functions_override: { get_param: rack_functions_override }
 
   rack02_router_routes:
     depends_on:
@@ -205,18 +267,57 @@
       cmp_metadata: { get_param: rack02_cmp_metadata }
       ucp_master_host: { get_attr: [central_site, ucp_control_ip] }
       rack_router: {get_attr: [rack02_router_routes, router_id] }
+      boot_timeout: { get_param: rack_boot_timeout }
+      private_floating_interface: { get_param: rack_private_floating_interface }
+      functions_override: { get_param: rack_functions_override }
 
 outputs:
   central_site_worker_public_ip:
     description: IP address of server in private network
     value: { get_attr: [central_site, worker_public_ip] }
-  ucp_public_ip:
+  ucp_ips:
     description: IP address of server in private network
     value: { get_attr: [central_site, ucp_public_ip] }
-  central_site_worker_wc_data:
+  workers_wc_data:
     description: Metadata from instance
     value: { get_attr: [central_site, worker_wc_data]}
+  cmps_wc_data:
+    description: Metadata from cmps
+    value: {list_concat: [ {get_attr: [rack01, cmp_wc_data]},  {get_attr: [rack02, cmp_wc_data]} ]}
   rack01_cmp_public_ip:
     value: { get_attr: [rack01, cmp_public_ip] }
   rack02_cmp_public_ip:
     value: { get_attr: [rack02, cmp_public_ip] }
+  worker_private_floating_ips:
+    description: IPs might be used as gateway
+    value: { get_attr: [central_site, server_private_floating_ip] }
+  private_floating_cidr:
+    value: { get_param: private_floating_network_cidr }
+  private_floating_network_pool_start:
+    value: { get_param: private_floating_network_pool_start }
+  private_floating_network_pool_end:
+    value: { get_param: private_floating_network_pool_end }
+  private_floating_network_gateway:
+    value: { get_param: private_floating_network_gateway }
+  live_migration_interface:
+    value: { get_param: live_migration_interface }
+  tunnel_interface:
+    value: { get_param: tunnel_interface }
+  metallb_address_pools:
+    value: { get_param: metallb_address_pools }
+  storage_frontend_network_cidr:
+    description: Storage network which is used as clientNet in Ceph CR
+    value: { get_param: main_storage_frontend_network_cidr }
+  storage_backend_network_cidr:
+    description: Storage network which is used as clusterNet in Ceph CR
+    value: { get_param: main_storage_backend_network_cidr }
+  private_floating_network_interface:
+    value: { get_param: private_floating_network_interface }
+  tungstenfabric_enabled:
+    value: { get_param: tungstenfabric_enabled }
+  workers_ips:
+    description: Private IP addresses of the deployed worker instances
+    value: { get_attr: [central_site, worker_public_ip] }
+  cmps_ips:
+    description: Private IP addresses of the deployed cmp instances
+    value: {list_concat: [ {get_attr: [rack01, cmp_public_ip]},  {get_attr: [rack02, cmp_public_ip]} ]}
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index ce7155b..a26b289 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -475,6 +475,10 @@
 net.ipv4.conf.all.rp_filter=0
 net.ipv4.conf.default.rp_filter=0
 EOF
+    for iface in /proc/sys/net/ipv4/conf/ens*/rp_filter; do
+        echo 0 > $iface
+    done
+
     sysctl -p /etc/sysctl.d/99-disable-rp-filter.conf
 }