Allow to override dafaults for vars in instance_boot
Change default link to repo with docker packages
Related-Prod: PORDX-3456
Change-Id: I2bf9a902a42092aef794053b68aed7ed960e20f4
diff --git a/de/heat-templates/multirack.yaml b/de/heat-templates/multirack.yaml
index c5fdbee..5833899 100644
--- a/de/heat-templates/multirack.yaml
+++ b/de/heat-templates/multirack.yaml
@@ -95,8 +95,7 @@
default: 'system.compact.openstack.control'
docker_ee_url:
type: string
- default: 'http://mirror-us.mcp.mirantis.net/.snapshots/docker-ee-bionic-latest'
-# default: 'https://s3-us-west-2.amazonaws.com/internal-docker-ee-builds/docker-ee-linux/ubuntu'
+ default: 'https://storebits.docker.com/ubuntu'
docker_ee_release:
type: string
default: 'stable-19.03'
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index 4fbb429..5ff0c2e 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -10,46 +10,52 @@
#
# Variables in this block are passed from heat template
#
-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
+CONTROL_NETWORK_CIDR=${CONTROL_NETWORK_CIDR:-$control_network_cidr}
+PUBLIC_INTERFACE=${PUBLIC_INTERFACE:-$private_floating_interface}
+PUBLIC_INTERFACE_IP=${PUBLIC_INTERFACE_IP:-$private_floating_interface_ip}
+PUBLIC_INTERFACE_CIDR=${PUBLIC_INTERFACE_CIDR:-$private_floating_network_cidr}
PUBLIC_INTERFACE_NETMASK=$(echo ${PUBLIC_INTERFACE_CIDR} | cut -d'/' -f2)
-STORAGE_BACKEND_INTERFACE=$storage_backend_interface
-STORAGE_BACKEND_INTERFACE_IP=$storage_backend_network_interface_ip
-STORAGE_BACKEND_NETWORK=$storage_backend_network_cidr
+
+STORAGE_BACKEND_INTERFACE=${STORAGE_BACKEND_INTERFACE:-$storage_backend_interface}
+STORAGE_BACKEND_INTERFACE_IP=${STORAGE_BACKEND_INTERFACE_IP:-$storage_backend_network_interface_ip}
+STORAGE_BACKEND_NETWORK=${STORAGE_BACKEND_NETWORK:-$storage_backend_network_cidr}
STORAGE_BACKEND_NETWORK_NETMASK=$(echo ${STORAGE_BACKEND_NETWORK} | cut -d'/' -f2)
-STORAGE_FRONTEND_INTERFACE=$storage_frontend_interface
-STORAGE_FRONTEND_INTERFACE_IP=$storage_frontend_network_interface_ip
-STORAGE_FRONTEND_NETWORK=$storage_frontend_network_cidr
+
+STORAGE_FRONTEND_INTERFACE=${STORAGE_FRONTEND_INTERFACE:-$storage_frontend_interface}
+STORAGE_FRONTEND_INTERFACE_IP=${STORAGE_FRONTEND_INTERFACE_IP:-$storage_frontend_network_interface_ip}
+STORAGE_FRONTEND_NETWORK=${STORAGE_FRONTEND_NETWORK:-$storage_frontend_network_cidr}
STORAGE_FRONTEND_NETWORK_NETMASK=$(echo ${STORAGE_FRONTEND_NETWORK} | cut -d'/' -f2)
-IRONIC_BAREMETAL_NETWORK=$ironic_baremetal_network_cidr
-IRONIC_BAREMETAL_INTERFACE_IP=$ironic_baremetal_interface_ip
+
+IRONIC_BAREMETAL_NETWORK=${IRONIC_BAREMETAL_NETWORK:-$ironic_baremetal_network_cidr}
+IRONIC_BAREMETAL_INTERFACE_IP=${IRONIC_BAREMETAL_INTERFACE_IP:-$ironic_baremetal_interface_ip}
IRONIC_BAREMETAL_NETWORK_NETMASK=$(echo ${IRONIC_BAREMETAL_NETWORK} | cut -d'/' -f2)
IRONIC_BAREMETAL_INTERFACE=$(ip route get ${IRONIC_BAREMETAL_NETWORK%/*} | awk '/^broadcast / {print $4}')
-IRONIC_BAREMETAL_TUNNEL_NETWORK=$ironic_baremetal_tunnel_cidr
-TUNNEL_INTERFACE_IP=$tunnel_interface_ip
-FRR_BGP_NEIGHBORS=$frr_bgp_neighbors
-FRR_EVPN_TUNNELS_RANGE=$frr_evpn_tunnels_range
-FRR_EVPN_VXLAN_DST_PORT=$frr_evpn_vxlan_dst_port
+
+IRONIC_BAREMETAL_TUNNEL_NETWORK=${IRONIC_BAREMETAL_TUNNEL_NETWORK:-$ironic_baremetal_tunnel_cidr}
+TUNNEL_INTERFACE_IP=${TUNNEL_INTERFACE_IP:-$tunnel_interface_ip}
+FRR_BGP_NEIGHBORS=${FRR_BGP_NEIGHBORS:-$frr_bgp_neighbors}
+FRR_EVPN_TUNNELS_RANGE=${FRR_EVPN_TUNNELS_RANGE:-$frr_evpn_tunnels_range}
+FRR_EVPN_VXLAN_DST_PORT=${FRR_EVPN_VXLAN_DST_PORT:-$frr_evpn_vxlan_dst_port}
TUNNEL_INTERFACE_NETWORK_NETMASK=$(ip -o addr show |grep -w ${TUNNEL_INTERFACE_IP} | awk '{print $4}' |awk -F '/' '{print $2}')
TUNNEL_INTERFACE=$(ip -o addr show |grep -w ${TUNNEL_INTERFACE_IP}/${TUNNEL_INTERFACE_NETWORK_NETMASK} | awk '{print $2}')
-NODE_TYPE=$node_type
-UCP_MASTER_HOST=$ucp_master_host
+
+NODE_TYPE=${NODE_TYPE:-$node_type}
+UCP_MASTER_HOST=${UCP_MASTER_HOST:-$ucp_master_host}
NODE_METADATA=${NODE_METADATA:-'$node_metadata'}
-DOCKER_EE_URL=$docker_ee_url
-DOCKER_EE_RELEASE=$docker_ee_release
-DOCKER_UCP_IMAGE=$docker_ucp_image
-UCP_DOCKER_SWARM_DATA_PORT=$docker_ucp_swarm_data_port
-FLOATING_NETWORK_PREFIXES=$private_floating_network_cidr
-IRONIC_MT_ENABLED=$ironic_mt_enabled
+DOCKER_EE_URL=${DOCKER_EE_URL:-$docker_ee_url}
+DOCKER_EE_RELEASE=${DOCKER_EE_RELEASE:-$docker_ee_release}
+DOCKER_UCP_IMAGE=${DOCKER_UCP_IMAGE:-$docker_ucp_image}
+UCP_DOCKER_SWARM_DATA_PORT=${UCP_DOCKER_SWARM_DATA_PORT:-$docker_ucp_swarm_data_port}
+FLOATING_NETWORK_PREFIXES=${FLOATING_NETWORK_PREFIXES:-$private_floating_network_cidr}
+IRONIC_MT_ENABLED=${IRONIC_MT_ENABLED:-$ironic_mt_enabled}
IRONIC_BAREMETAL_NETWORK_PREFIX=$(sed 's/[0-9]*\/[0-9]*$//' <<< $IRONIC_BAREMETAL_NETWORK)
IRONIC_BAREMETAL_TUNNEL_NETWORK_PREFIX=$(sed 's/[0-9]*\/[0-9]*$//' <<< $IRONIC_BAREMETAL_TUNNEL_NETWORK)
-HUGE_PAGES=$huge_pages
-TUNGSTENFABRIC_ENABLED=$tungstenfabric_enabled
-SINGLE_NODE=$single_node
-DOCKER_DEFAULT_ADDRESS_POOL=$docker_default_address_pool
-LVM_LOOP_DEVICE_SIZE=$lvm_loop_device_size
+
+HUGE_PAGES=${HUGE_PAGES:-$huge_pages}
+TUNGSTENFABRIC_ENABLED=${TUNGSTENFABRIC_ENABLED:-$tungstenfabric_enabled}
+SINGLE_NODE=${SINGLE_NODE:-$single_node}
+DOCKER_DEFAULT_ADDRESS_POOL=${DOCKER_DEFAULT_ADDRESS_POOL:-$docker_default_address_pool}
+LVM_LOOP_DEVICE_SIZE=${LVM_LOOP_DEVICE_SIZE:-$lvm_loop_device_size}
#
# End of block
#
diff --git a/de/heat-templates/top.yaml b/de/heat-templates/top.yaml
index c1f27ad..ccf3407 100644
--- a/de/heat-templates/top.yaml
+++ b/de/heat-templates/top.yaml
@@ -254,8 +254,7 @@
default: ''
docker_ee_url:
type: string
- default: 'http://mirror-us.mcp.mirantis.net/.snapshots/docker-ee-bionic-latest'
-# default: 'https://s3-us-west-2.amazonaws.com/internal-docker-ee-builds/docker-ee-linux/ubuntu'
+ default: 'https://storebits.docker.com/ubuntu'
docker_ee_release:
type: string
default: 'stable-19.03'