X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=deploy%2Fsite%2Fvm%2Fvm.sh;h=51ad4c9c9130ae1e9d49aed24f240925aa6a93da;hb=refs%2Fchanges%2F04%2F4704%2F1;hp=bfe591b868203321299759559fe4300a06fdf65a;hpb=26912e83628371b38c2ca7117d2523af29f033f0;p=icn.git diff --git a/deploy/site/vm/vm.sh b/deploy/site/vm/vm.sh index bfe591b..51ad4c9 100644 --- a/deploy/site/vm/vm.sh +++ b/deploy/site/vm/vm.sh @@ -70,6 +70,10 @@ function insert_control_plane_network_identity_into_ssh_config { # This enables logging into the control plane machines from this # machine without specifying the identify file on the command line + if [[ ! $(which ipcalc) ]]; then + apt-get install -y ipcalc + fi + # Create ssh config if it doesn't exist mkdir -p ${HOME}/.ssh && chmod 700 ${HOME}/.ssh touch ${HOME}/.ssh/config @@ -103,11 +107,22 @@ function wait_for_all_ready { insert_control_plane_network_identity_into_ssh_config } +function is_cluster_deleted { + ! kubectl -n ${SITE_NAMESPACE} get cluster icn +} + +function wait_for_all_deleted { + WAIT_FOR_INTERVAL=60s + WAIT_FOR_TRIES=30 + wait_for is_cluster_deleted +} + case $1 in "build-source") build_source ;; "clean") clean ;; "deploy") deploy ;; "wait") wait_for_all_ready ;; + "wait-clean") wait_for_all_deleted ;; *) cat <