Replace host_interface with control_network_cidr

Add ability to autodetect interface name based on network CIDR

Related-Prod: PRODX-00000
Change-Id: I51b6701c4ca082c7560094cb25adcc615f5911d1
diff --git a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml
index 0c8b3bc..e9e1944 100644
--- a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml
+++ b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml
@@ -16,7 +16,7 @@
   lmas_flavor: oscore-bm-lab-01
   osds_flavor: oscore-bm-lab-01
   public_net_id: 'physnet1-402'
-  host_interface: 'enp3s0f0'
+  control_network_cidr: '172.16.43.0/24'
   masters_size: 0
   worker_size: 3
   cmp_size: 0
diff --git a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml
index 3fefa93..abec7a1 100644
--- a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml
+++ b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml
@@ -16,7 +16,7 @@
   lmas_flavor: oscore-bm-lab-01
   osds_flavor: oscore-bm-lab-01
   public_net_id: 'physnet1-402'
-  host_interface: 'enp3s0f0'
+  control_network_cidr: '172.16.43.0/24'
   masters_size: 0
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/compute.yaml b/de/heat-templates/env/compute.yaml
index eb31703..f6875d6 100644
--- a/de/heat-templates/env/compute.yaml
+++ b/de/heat-templates/env/compute.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/converged.yaml b/de/heat-templates/env/converged.yaml
index 9448af4..5e7a329 100644
--- a/de/heat-templates/env/converged.yaml
+++ b/de/heat-templates/env/converged.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 0
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0-lma3.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0-lma3.yaml
index c1b44d6..06e3813 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0-lma3.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0-lma3.yaml
@@ -10,7 +10,6 @@
   image: bionic-server-cloudimg-amd64-20190612
   lmas_flavor: system.compact.stacklight.server
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 3
   cmp_size: 0
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0.yaml
index 755e66f..5b3c057 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp0-gtw0.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 3
   cmp_size: 0
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0-lma3.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0-lma3.yaml
index 74c9f0d..d3719c4 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0-lma3.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0-lma3.yaml
@@ -10,7 +10,6 @@
   image: bionic-server-cloudimg-amd64-20190612
   lmas_flavor: system.compact.stacklight.server
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0.yaml
index 5827cb2..dd1bf98 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp2-gtw0.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp2-ntw3-lma3.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp2-ntw3-lma3.yaml
index 645ee21..0cf85a4 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp2-ntw3-lma3.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp2-ntw3-lma3.yaml
@@ -10,7 +10,6 @@
   image: bionic-server-cloudimg-amd64-20190612
   lmas_flavor: system.compact.stacklight.server
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp2-ntw3.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp2-ntw3.yaml
index 52aa9b2..ba011e4 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp2-ntw3.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp2-ntw3.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp3-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp3-gtw0.yaml
index 98e4217..c869658 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp3-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp3-gtw0.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 3
   cmp_size: 3
diff --git a/de/heat-templates/env/mstr1-wrkr3-cmp3-ntw3.yaml b/de/heat-templates/env/mstr1-wrkr3-cmp3-ntw3.yaml
index bb9112d..09522ec 100644
--- a/de/heat-templates/env/mstr1-wrkr3-cmp3-ntw3.yaml
+++ b/de/heat-templates/env/mstr1-wrkr3-cmp3-ntw3.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 3
   cmp_size: 3
diff --git a/de/heat-templates/env/mstr1-wrkr5-cmp0-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr5-cmp0-gtw0.yaml
index 0027bb2..b8f64cc 100644
--- a/de/heat-templates/env/mstr1-wrkr5-cmp0-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr5-cmp0-gtw0.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 5
   cmp_size: 0
diff --git a/de/heat-templates/env/mstr1-wrkr5-cmp2-gtw0.yaml b/de/heat-templates/env/mstr1-wrkr5-cmp2-gtw0.yaml
index c35ef74..5f60989 100644
--- a/de/heat-templates/env/mstr1-wrkr5-cmp2-gtw0.yaml
+++ b/de/heat-templates/env/mstr1-wrkr5-cmp2-gtw0.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 0
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp0-gtw0-lma3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp0-gtw0-lma3.yaml
index 2620ae0..620e3a7 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp0-gtw0-lma3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp0-gtw0-lma3.yaml
@@ -10,7 +10,6 @@
   image: bionic-server-cloudimg-amd64-20190612
   lmas_flavor: system.compact.stacklight.server
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 0
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp0-gtw0.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp0-gtw0.yaml
index ae3b3b2..607b62f 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp0-gtw0.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp0-gtw0.yaml
@@ -6,7 +6,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 0
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0-lma3-osd3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0-lma3-osd3.yaml
index cb3dc1a..f33754c 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0-lma3-osd3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0-lma3-osd3.yaml
@@ -16,7 +16,6 @@
   lmas_flavor: system.compact.stacklight.server
   osds_flavor: system.virtual.ceph.osd
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0-lma3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0-lma3.yaml
index 167c808..9525d5f 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0-lma3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0-lma3.yaml
@@ -10,7 +10,6 @@
   image: bionic-server-cloudimg-amd64-20190612
   lmas_flavor: system.compact.stacklight.server
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0.yaml
index eb31703..f6875d6 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw0.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw2.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw2.yaml
index 1a5f73a..3c6e9ee 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw2.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw2.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml
index e9be351..a5fcc96 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3-osd3.yaml
@@ -16,7 +16,6 @@
   lmas_flavor: system.compact.stacklight.server
   osds_flavor: system.virtual.ceph.osd
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml
index 50dcd10..21f85c3 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-gtw3-lma3.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr3-wrkr3-cmp2-ntw3-lma3-osd3.yaml b/de/heat-templates/env/mstr3-wrkr3-cmp2-ntw3-lma3-osd3.yaml
index e888cad..1467ac0 100644
--- a/de/heat-templates/env/mstr3-wrkr3-cmp2-ntw3-lma3-osd3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr3-cmp2-ntw3-lma3-osd3.yaml
@@ -16,7 +16,6 @@
   osds_flavor: system.virtual.ceph.osd
   ntws_flavor: system.compact.opencontrail.control
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/env/mstr3-wrkr6-cmp3-osd3.yaml b/de/heat-templates/env/mstr3-wrkr6-cmp3-osd3.yaml
index f09a354..5e5edeb 100644
--- a/de/heat-templates/env/mstr3-wrkr6-cmp3-osd3.yaml
+++ b/de/heat-templates/env/mstr3-wrkr6-cmp3-osd3.yaml
@@ -16,7 +16,6 @@
   lmas_flavor: system.compact.stacklight.server
   osds_flavor: system.virtual.ceph.osd
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 6
   cmp_size: 3
diff --git a/de/heat-templates/env/telco.yaml b/de/heat-templates/env/telco.yaml
index 1a5f73a..3c6e9ee 100644
--- a/de/heat-templates/env/telco.yaml
+++ b/de/heat-templates/env/telco.yaml
@@ -9,7 +9,6 @@
 parameters:
   image: bionic-server-cloudimg-amd64-20190612
   public_net_id: public
-  host_interface: 'ens3'
   masters_size: 2
   worker_size: 3
   cmp_size: 2
diff --git a/de/heat-templates/fragments/SrvInstancesBM.yaml b/de/heat-templates/fragments/SrvInstancesBM.yaml
index cf247db..1778b25 100644
--- a/de/heat-templates/fragments/SrvInstancesBM.yaml
+++ b/de/heat-templates/fragments/SrvInstancesBM.yaml
@@ -28,7 +28,7 @@
     type: string
   private_floating_interface:
     type: string
-  host_interface:
+  control_network_cidr:
     type: string
   functions_override:
     type: string
@@ -68,7 +68,7 @@
             $docker_ee_release: { get_param: docker_ee_release }
             $ucp_master_host: { get_param: ucp_master_host }
             $node_metadata: { get_param: metadata }
-            $host_interface: { get_param: host_interface }
+            $control_network_cidr: { get_param: control_network_cidr }
             $private_floating_interface: { get_param: private_floating_interface }
             $private_floating_network_cidr: { get_param: private_floating_network_cidr }
             $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
diff --git a/de/heat-templates/fragments/SrvInstancesBMCeph.yaml b/de/heat-templates/fragments/SrvInstancesBMCeph.yaml
index 3bd4369..ad81fd7 100644
--- a/de/heat-templates/fragments/SrvInstancesBMCeph.yaml
+++ b/de/heat-templates/fragments/SrvInstancesBMCeph.yaml
@@ -36,7 +36,7 @@
     type: string
   storage_frontend_interface:
     type: string
-  host_interface:
+  control_network_cidr:
     type: string
   functions_override:
     type: string
@@ -75,7 +75,7 @@
             $docker_ee_release: { get_param: docker_ee_release }
             $ucp_master_host: { get_param: ucp_master_host }
             $node_metadata: { get_param: metadata }
-            $host_interface: { get_param: host_interface }
+            $control_network_cidr: { get_param: control_network_cidr }
             $private_floating_interface: { get_param: private_floating_interface }
             $private_floating_network_cidr: { get_param: private_floating_network_cidr }
             $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
diff --git a/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml b/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml
index 92fa9c5..ef33b58 100644
--- a/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml
+++ b/de/heat-templates/fragments/SrvInstancesBMCephOSD.yaml
@@ -44,7 +44,7 @@
     type: string
   storage_frontend_interface:
     type: string
-  host_interface:
+  control_network_cidr:
     type: string
   functions_override:
     type: string
@@ -83,7 +83,7 @@
             $docker_ee_release: { get_param: docker_ee_release }
             $ucp_master_host: { get_param: ucp_master_host }
             $node_metadata: { get_param: metadata }
-            $host_interface: { get_param: host_interface }
+            $control_network_cidr: { get_param: control_network_cidr }
             $private_floating_interface: { get_param: private_floating_interface }
             $private_floating_network_cidr: { get_param: private_floating_network_cidr }
             $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
diff --git a/de/heat-templates/fragments/SrvInstancesVM.yaml b/de/heat-templates/fragments/SrvInstancesVM.yaml
index fbedc71..d2140d2 100644
--- a/de/heat-templates/fragments/SrvInstancesVM.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVM.yaml
@@ -28,7 +28,7 @@
     type: string
   private_floating_interface:
     type: string
-  host_interface:
+  control_network_cidr:
     type: string
   functions_override:
     type: string
@@ -67,7 +67,7 @@
             $docker_ee_release: { get_param: docker_ee_release }
             $ucp_master_host: { get_param: ucp_master_host }
             $node_metadata: { get_param: metadata }
-            $host_interface: { get_param: host_interface }
+            $control_network_cidr: { get_param: control_network_cidr }
             $private_floating_interface: { get_param: private_floating_interface }
             $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
             $private_floating_network_cidr: { get_param: private_floating_network_cidr }
diff --git a/de/heat-templates/fragments/SrvInstancesVMCeph.yaml b/de/heat-templates/fragments/SrvInstancesVMCeph.yaml
index 96db9a2..990da67 100644
--- a/de/heat-templates/fragments/SrvInstancesVMCeph.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVMCeph.yaml
@@ -36,7 +36,7 @@
     type: string
   storage_frontend_interface:
     type: string
-  host_interface:
+  control_network_cidr:
     type: string
   functions_override:
     type: string
@@ -74,7 +74,7 @@
             $docker_ee_release: { get_param: docker_ee_release }
             $ucp_master_host: { get_param: ucp_master_host }
             $node_metadata: { get_param: metadata }
-            $host_interface: { get_param: host_interface }
+            $control_network_cidr: { get_param: control_network_cidr }
             $private_floating_interface: { get_param: private_floating_interface }
             $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
             $private_floating_network_cidr: { get_param: private_floating_network_cidr }
diff --git a/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml b/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
index 38e830a..f373ea9 100644
--- a/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
@@ -44,7 +44,7 @@
     type: string
   storage_frontend_interface:
     type: string
-  host_interface:
+  control_network_cidr:
     type: string
   functions_override:
     type: string
@@ -82,7 +82,7 @@
             $docker_ee_release: { get_param: docker_ee_release }
             $ucp_master_host: { get_param: ucp_master_host }
             $node_metadata: { get_param: metadata }
-            $host_interface: { get_param: host_interface }
+            $control_network_cidr: { get_param: control_network_cidr }
             $private_floating_interface: { get_param: private_floating_interface }
             $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
             $private_floating_network_cidr: { get_param: private_floating_network_cidr }
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index 0bf7101..8f77132 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -4,7 +4,7 @@
 #
 # Variables in this block are passed from heat template
 #
-HOST_INTERFACE=$host_interface
+CONTROL_NETWORK_CIDR=$control_network_cidr
 PUBLIC_INTERFACE=$private_floating_interface
 PUBLIC_INTERFACE_IP=$private_floating_interface_ip
 PUBLIC_INTERFACE_CIDR=$private_floating_network_cidr
@@ -40,9 +40,9 @@
     DOCKER_RELEASE="${DOCKER_EE_RELEASE}"
     DOCKER_PACKAGES="${DOCKER_EE_PACKAGES}"
 fi
-HOST_INTERFACE=${HOST_INTERFACE:-ens3}
+CONTROL_NETWORK_CIDR=${CONTROL_NETWORK_CIDR:-"10.10.0.0/24"}
+CONTROL_IP_ADDRESS=$(ip route get ${CONTROL_NETWORK_CIDR%/*} | awk '/ src / {print $6}')
 PUBLIC_INTERFACE=${PUBLIC_INTERFACE:-ens4}
-NODE_IP_ADDRESS=$(ip addr show dev ${HOST_INTERFACE} |grep -Po 'inet \K[\d.]+' |egrep -v "127.0.|172.17")
 UCP_USERNAME=${UCP_USERNAME:-admin}
 UCP_PASSWORD=${UCP_PASSWORD:-administrator}
 OS_CODENAME=$(lsb_release -c -s)
@@ -50,8 +50,8 @@
 NODE_DEPLOYMENT_RETRIES=${NODE_DEPLOYMENT_RETRIES:-15}
 FLOATING_NETWORK_PREFIXES=${FLOATING_NETWORK_PREFIXES:-10.11.12.0/24}
 PUBLIC_INTERFACE=${PUBLIC_INTERFACE:-ens4}
-UCP_MASTER_HOST=${UCP_MASTER_HOST:-${NODE_IP_ADDRESS}}
-UCP_IP_ADDRESS=${UCP_IP_ADDRESS:-$NODE_IP_ADDRESS}
+UCP_MASTER_HOST=${UCP_MASTER_HOST:-${CONTROL_IP_ADDRESS}}
+UCP_IP_ADDRESS=${UCP_IP_ADDRESS:-$CONTROL_IP_ADDRESS}
 NTP_SERVERS=${NTP_SERVERS:-"ldap.scc.mirantis.net ldap.bud.mirantis.net"}
 
 
@@ -257,7 +257,7 @@
 function prepare_network {
     systemctl restart systemd-resolved
     # Make sure local hostname is present in /etc/hosts
-    sed -i "s/127.0.0.1 localhost/127.0.0.1 localhost\n${NODE_IP_ADDRESS} $(hostname)/" /etc/hosts
+    sed -i "s/127.0.0.1 localhost/127.0.0.1 localhost\n${CONTROL_IP_ADDRESS} $(hostname)/" /etc/hosts
 
     configure_ntp
 }
diff --git a/de/heat-templates/top.yaml b/de/heat-templates/top.yaml
index ff01525..7c85320 100644
--- a/de/heat-templates/top.yaml
+++ b/de/heat-templates/top.yaml
@@ -10,9 +10,10 @@
     description: >
       ID of public network for which floating IP addresses will be allocated/
       for baremetal case flat provision network for nodes
-  host_interface:
+  control_network_cidr:
     type: string
-    description: Interface which connects server with public network (world accessible network).
+    description: The CIDR of control network, used to detect control interface.
+    default: '10.10.0.0/24'
   masters_size:
     type: number
     description: Number of masters instances to deploy
@@ -193,7 +194,7 @@
       private_floating_network_cidr: { get_param: private_floating_network_cidr }
       accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
       public_net_id: { get_param: public_net_id }
-      host_interface: { get_param: host_interface }
+      control_network_cidr: { get_param: control_network_cidr }
       functions_override: { get_param: functions_override }
       hardware_metadata: { get_param: hardware_metadata}
 
@@ -220,7 +221,7 @@
           private_floating_network_cidr: { get_param: private_floating_network_cidr }
           accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
           public_net_id: { get_param: public_net_id }
-          host_interface: { get_param: host_interface }
+          control_network_cidr: { get_param: control_network_cidr }
           ucp_master_host: { get_attr: [ucp, server_private_ip] }
           functions_override: { get_param: functions_override }
           hardware_metadata: { get_param: hardware_metadata}
@@ -249,7 +250,7 @@
           private_floating_network_cidr: { get_param: private_floating_network_cidr }
           accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
           public_net_id: { get_param: public_net_id }
-          host_interface: { get_param: host_interface }
+          control_network_cidr: { get_param: control_network_cidr }
           ucp_master_host: { get_attr: [ucp, server_private_ip] }
           functions_override: { get_param: functions_override }
           storage_frontend_interface: { get_param: storage_frontend_interface }
@@ -281,7 +282,7 @@
           private_floating_network_cidr: { get_param: private_floating_network_cidr }
           accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
           public_net_id: { get_param: public_net_id }
-          host_interface: { get_param: host_interface }
+          control_network_cidr: { get_param: control_network_cidr }
           ucp_master_host: { get_attr: [ucp, server_private_ip] }
           functions_override: { get_param: functions_override }
           storage_frontend_interface: { get_param: storage_frontend_interface }
@@ -313,7 +314,7 @@
           private_floating_network_cidr: { get_param: private_floating_network_cidr }
           accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
           public_net_id: { get_param: public_net_id }
-          host_interface: { get_param: host_interface }
+          control_network_cidr: { get_param: control_network_cidr }
           ucp_master_host: { get_attr: [ucp, server_private_ip] }
           functions_override: { get_param: functions_override }
           hardware_metadata: { get_param: hardware_metadata}
@@ -341,7 +342,7 @@
           private_floating_network_cidr: { get_param: private_floating_network_cidr }
           accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
           public_net_id: { get_param: public_net_id }
-          host_interface: { get_param: host_interface }
+          control_network_cidr: { get_param: control_network_cidr }
           ucp_master_host: { get_attr: [ucp, server_private_ip] }
           functions_override: { get_param: functions_override }
           storage_frontend_interface: { get_param: storage_frontend_interface }
@@ -373,7 +374,7 @@
           private_floating_network_cidr: { get_param: private_floating_network_cidr }
           accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
           public_net_id: { get_param: public_net_id }
-          host_interface: { get_param: host_interface }
+          control_network_cidr: { get_param: control_network_cidr }
           ucp_master_host: { get_attr: [ucp, server_private_ip] }
           functions_override: { get_param: functions_override }
           storage_frontend_interface: { get_param: storage_frontend_interface }
@@ -409,7 +410,7 @@
           private_floating_network_cidr: { get_param: private_floating_network_cidr }
           accessible_subnet_id: { get_attr: [accessible_network, accessible_subnet_id]}
           public_net_id: { get_param: public_net_id }
-          host_interface: { get_param: host_interface }
+          control_network_cidr: { get_param: control_network_cidr }
           ucp_master_host: { get_attr: [ucp, server_private_ip] }
           functions_override: { get_param: functions_override }
           hardware_metadata: { get_param: hardware_metadata}