Copy admin kubeconfig to /etc/kubernetes/admin.conf
Related-Prod: PRODX-2063
Change-Id: Ia3346bef9f0ff260a8531c9bb5c6626a730a7f3c
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index a9ece06..4d59fd6 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -6,12 +6,14 @@
# to the fact that actual netmask for docker_gwbridge is given from it
DOCKER_DEFAULT_ADDRESS_SIZE=${DOCKER_DEFAULT_ADDRESS_SIZE:-24}
HOST_INTERFACE=${HOST_INTERFACE:-ens3}
+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)
NODE_TYPE=$node_type
UCP_MASTER_HOST=$ucp_master_host
+UCP_MASTER_HOST=${UCP_MASTER_HOST:-${NODE_IP_ADDRESS}}
function wait_condition_send {
local status=${1:-SUCCESS}
@@ -62,12 +64,11 @@
$ucp_license_key
EOF
- node_ip_address=$(ip addr show dev ${HOST_INTERFACE} |grep -Po 'inet \K[\d.]+' |egrep -v "127.0.|172.17")
docker container run --rm --name ucp \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $tmpd/docker_subscription.lic:/config/docker_subscription.lic \
docker/ucp:3.2.4 install \
- --host-address $node_ip_address \
+ --host-address $NODE_IP_ADDRESS \
--admin-username $UCP_USERNAME \
--admin-password $UCP_PASSWORD \
--existing-config
@@ -89,6 +90,8 @@
# Run the utility script.
eval "$(<env.sh)"
+ mkdir -p /etc/kubernetes
+ cp kube.yml /etc/kubernetes/admin.conf
popd
}
@@ -118,6 +121,7 @@
swarm_init
create_ucp_config
install_ucp
+ download_bundles
rm_ucp_config
;;
master)