3 # Copyright (C) The Arvados Authors. All rights reserved.
5 # SPDX-License-Identifier: Apache-2.0
16 K8S_IP=`gcloud compute addresses describe arvados-k8s-ip --region us-central1 --format="value(address)" 2>/dev/null`
17 if [[ $? -ne 0 ]]; then
24 echo "Stopping k8s cluster on GKE"
25 gcloud container clusters delete arvados --zone us-central1-a --quiet
26 gcloud compute addresses delete arvados-k8s-ip --region us-central1 --quiet
30 echo "Starting k8s cluster on GKE"
31 if [[ -z "$K8S_IP" ]]; then
32 gcloud compute addresses create arvados-k8s-ip --region us-central1
36 CLUSTER=`gcloud container clusters describe arvados --zone us-central1-a 2>/dev/null`
38 if [[ -z "$CLUSTER" ]]; then
39 gcloud container clusters create arvados --zone us-central1-a --machine-type n1-standard-2
43 helm get all arvados >/dev/null 2>&1
44 if [[ $? -eq 0 ]]; then
45 echo "Deleting running arvados helm chart..."
47 while [ "$SVC" != "2" ]; do
48 SVC=`kubectl get svc|wc -l`
49 echo "Waiting for services to disappear..."