Fixing baremetal deployment
Related-PROD: PRODX-2799
Change-Id: Ib037c8a23d6a9db39d4b7ceb2201a12e8b99d69d
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 ea2b9b6..c195d1d 100644
--- a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml
+++ b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp0-gtw0.yaml
@@ -65,20 +65,21 @@
sed -i 's/.*ethernets:.*/&\n veth-br: {}/' ${cloud_netplan_cfg}
sed -i "s/.*ethernets:.*/&\n $(echo ${PUBLIC_INTERFACE} | cut -d'.' -f1):\n dhcp4: false\n match:\n macaddress: ${public_if_mac}\n set-name: $(echo ${PUBLIC_INTERFACE} | cut -d'.' -f1)/" ${cloud_netplan_cfg}
+ if [ $STORAGE_FRONTEND_INTERFACE ]; then
+ STORAGE_FRONTEND_INTERFACE_DEF="
+ ${STORAGE_FRONTEND_INTERFACE}:
+ id: 404
+ link: $(echo ${STORAGE_FRONTEND_INTERFACE} | cut -d'.' -f1)
+ addresses: [ "${STORAGE_FRONTEND_INTERFACE_IP}/${STORAGE_FRONTEND_NETWORK_NETMASK}" ]
+ "
+ fi
+
cat << EOF >> ${cloud_netplan_cfg}
vlans:
${PUBLIC_INTERFACE}:
id: 403
link: $(echo ${PUBLIC_INTERFACE} | cut -d'.' -f1)
- ${STORAGE_FRONTEND_INTERFACE}:
- id: 404
- link: $(echo ${STORAGE_FRONTEND_INTERFACE} | cut -d'.' -f1)
- addresses: [ "${STORAGE_FRONTEND_INTERFACE_IP}/${STORAGE_FRONTEND_NETWORK_NETMASK}" ]
- ${STORAGE_BACKEND_INTERFACE}:
- id: 405
- link: $(echo ${STORAGE_BACKEND_INTERFACE} | cut -d'.' -f1)
- addresses: [ "${STORAGE_BACKEND_INTERFACE_IP}/${STORAGE_BACKEND_NETWORK_NETMASK}" ]
-
+ ${STORAGE_FRONTEND_INTERFACE_DEF}
bridges:
br-public:
dhcp4: false
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 06cb4e3..d333f28 100644
--- a/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml
+++ b/de/heat-templates/env/bmt402-mstr1-wrkr3-cmp2-gtw0.yaml
@@ -65,19 +65,21 @@
sed -i 's/.*ethernets:.*/&\n veth-br: {}/' ${cloud_netplan_cfg}
sed -i "s/.*ethernets:.*/&\n $(echo ${PUBLIC_INTERFACE} | cut -d'.' -f1):\n dhcp4: false\n match:\n macaddress: ${public_if_mac}\n set-name: $(echo ${PUBLIC_INTERFACE} | cut -d'.' -f1)/" ${cloud_netplan_cfg}
+ if [ $STORAGE_FRONTEND_INTERFACE ]; then
+ STORAGE_FRONTEND_INTERFACE_DEF="
+ ${STORAGE_FRONTEND_INTERFACE}:
+ id: 404
+ link: $(echo ${STORAGE_FRONTEND_INTERFACE} | cut -d'.' -f1)
+ addresses: [ "${STORAGE_FRONTEND_INTERFACE_IP}/${STORAGE_FRONTEND_NETWORK_NETMASK}" ]
+ "
+ fi
+
cat << EOF >> ${cloud_netplan_cfg}
vlans:
${PUBLIC_INTERFACE}:
id: 403
link: $(echo ${PUBLIC_INTERFACE} | cut -d'.' -f1)
- ${STORAGE_FRONTEND_INTERFACE}:
- id: 404
- link: $(echo ${STORAGE_FRONTEND_INTERFACE} | cut -d'.' -f1)
- addresses: [ "${STORAGE_FRONTEND_INTERFACE_IP}/${STORAGE_FRONTEND_NETWORK_NETMASK}" ]
- ${STORAGE_BACKEND_INTERFACE}:
- id: 405
- link: $(echo ${STORAGE_BACKEND_INTERFACE} | cut -d'.' -f1)
- addresses: [ "${STORAGE_BACKEND_INTERFACE_IP}/${STORAGE_BACKEND_NETWORK_NETMASK}" ]
+ ${STORAGE_FRONTEND_INTERFACE_DEF}
bridges:
br-public:
dhcp4: false
diff --git a/de/heat-templates/fragments/SrvInstancesBMCeph.yaml b/de/heat-templates/fragments/SrvInstancesBMCeph.yaml
index 19e6543..95a8b97 100644
--- a/de/heat-templates/fragments/SrvInstancesBMCeph.yaml
+++ b/de/heat-templates/fragments/SrvInstancesBMCeph.yaml
@@ -34,6 +34,8 @@
type: string
storage_frontend_subnet_id:
type: string
+ storage_frontend_interface:
+ type: string
host_interface:
type: string
functions_override:
@@ -75,6 +77,7 @@
$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] }
$functions_override: { get_param: functions_override }
+ $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 }
diff --git a/de/heat-templates/fragments/SrvInstancesVMCeph.yaml b/de/heat-templates/fragments/SrvInstancesVMCeph.yaml
index cf843fd..68f937b 100644
--- a/de/heat-templates/fragments/SrvInstancesVMCeph.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVMCeph.yaml
@@ -34,6 +34,8 @@
type: string
storage_frontend_subnet_id:
type: string
+ storage_frontend_interface:
+ type: string
host_interface:
type: string
functions_override:
@@ -74,6 +76,7 @@
$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 }
$functions_override: { get_param: functions_override }
+ $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 }
diff --git a/de/heat-templates/top.yaml b/de/heat-templates/top.yaml
index ee0e05e..957243e 100644
--- a/de/heat-templates/top.yaml
+++ b/de/heat-templates/top.yaml
@@ -246,6 +246,7 @@
host_interface: { get_param: host_interface }
ucp_master_host: { get_attr: [ucp, server_private_ip] }
functions_override: { get_param: functions_override }
+ storage_frontend_interface: { get_param: storage_frontend_interface }
storage_frontend_network: { get_attr: [storage_network, storage_frontend_network_id] }
storage_frontend_subnet_id: { get_attr: [storage_network, storage_frontend_subnet_id] }
storage_frontend_network_cidr: { get_param: storage_frontend_network_cidr }
@@ -276,6 +277,7 @@
host_interface: { get_param: host_interface }
ucp_master_host: { get_attr: [ucp, server_private_ip] }
functions_override: { get_param: functions_override }
+ storage_frontend_interface: { get_param: storage_frontend_interface }
storage_frontend_network: { get_attr: [storage_network, storage_frontend_network_id] }
storage_frontend_subnet_id: { get_attr: [storage_network, storage_frontend_subnet_id] }
storage_frontend_network_cidr: { get_param: storage_frontend_network_cidr }
@@ -333,6 +335,7 @@
host_interface: { get_param: host_interface }
ucp_master_host: { get_attr: [ucp, server_private_ip] }
functions_override: { get_param: functions_override }
+ storage_frontend_interface: { get_param: storage_frontend_interface }
storage_frontend_network: { get_attr: [storage_network, storage_frontend_network_id] }
storage_frontend_subnet_id: { get_attr: [storage_network, storage_frontend_subnet_id] }
storage_frontend_network_cidr: { get_param: storage_frontend_network_cidr }