From 670658958b593d05b40e9a697c1b376c2975e0b6 Mon Sep 17 00:00:00 2001 From: Ratnopam Chakrabarti Date: Mon, 11 Jan 2021 14:05:36 -0500 Subject: [PATCH] Update common provider script Updated env variable TEST_SITE to SITE to remove error with capd deployment Updated scripts to use phase "initinfra-networking" for deploying calico cni in target cluster Change-Id: Ib372e8fe8d1124aa83c5e69a861c523a967c22c9 --- .../provider_common/30_deploy_controlplane.sh | 13 +++---------- .../provider_common/34_deploy_worker_node.sh | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/tools/deployment/provider_common/30_deploy_controlplane.sh b/tools/deployment/provider_common/30_deploy_controlplane.sh index 3633aeba4..430549903 100755 --- a/tools/deployment/provider_common/30_deploy_controlplane.sh +++ b/tools/deployment/provider_common/30_deploy_controlplane.sh @@ -14,7 +14,7 @@ # Example Usage # CONTROLPLANE_COUNT=1 \ -# TEST_SITE=docker-test-site \ +# SITE=docker-test-site \ # ./tools/deployment/provider_common/30_deploy_controlplane.sh export AIRSHIP_SRC=${AIRSHIP_SRC:-"/tmp/airship"} @@ -49,20 +49,13 @@ echo "add context target-cluster" kubectl config set-context ${TARGET_CLUSTER_NAME} --user ${TARGET_CLUSTER_NAME}-admin --cluster ${TARGET_CLUSTER_NAME} \ --kubeconfig "/tmp/${TARGET_CLUSTER_NAME}.kubeconfig" -if [ "$TEST_SITE" != "docker-test-site" ]; then - echo "apply cni as a part of initinfra" - airshipctl phase run initinfra-target --debug --kubeconfig "/tmp/${TARGET_CLUSTER_NAME}.kubeconfig" - kubectl --kubeconfig /tmp/"${TARGET_CLUSTER_NAME}".kubeconfig wait --for=condition=Ready nodes --all --timeout 4000s -else - kubectl --kubeconfig /tmp/"${TARGET_CLUSTER_NAME}".kubeconfig wait --for=condition=Ready nodes --all --timeout 4000s -fi +echo "apply cni as a part of initinfra-networking" +airshipctl phase run initinfra-networking-target --debug --kubeconfig "/tmp/${TARGET_CLUSTER_NAME}.kubeconfig" echo "Check nodes status" - kubectl --kubeconfig /tmp/"${TARGET_CLUSTER_NAME}".kubeconfig wait --for=condition=Ready nodes --all --timeout 4000s kubectl get nodes --kubeconfig /tmp/"${TARGET_CLUSTER_NAME}".kubeconfig - echo "Waiting for pods to come up" kubectl --kubeconfig /tmp/${TARGET_CLUSTER_NAME}.kubeconfig wait --for=condition=ready pods --all --timeout=4000s -A kubectl --kubeconfig /tmp/${TARGET_CLUSTER_NAME}.kubeconfig get pods -A diff --git a/tools/deployment/provider_common/34_deploy_worker_node.sh b/tools/deployment/provider_common/34_deploy_worker_node.sh index 8bf9b569c..89f5af104 100755 --- a/tools/deployment/provider_common/34_deploy_worker_node.sh +++ b/tools/deployment/provider_common/34_deploy_worker_node.sh @@ -15,7 +15,7 @@ set -xe # Example Usage -# TEST_SITE=docker-test-site \ +# SITE=docker-test-site \ # WORKERS_COUNT=3 ./tools/deployment/provider_common/34_deploy_worker_node.sh export KUBECONFIG=${KUBECONFIG:-"$HOME/.airship/kubeconfig"}