7 if [[ "$DEBUG" == "--debug" ]]; then
16 curl --connect-timeout 1 -k -s -H "Authorization: Bearer $MANAGEMENTTOKEN" https://$GKE_IP:444/rails/_health/ping |grep -q OK
17 if [[ $? -eq 0 ]]; then
22 curl --connect-timeout 1 -k -s -H "Authorization: Bearer $MANAGEMENTTOKEN" https://$GKE_IP:25107/_health/ping |grep -q OK
23 if [[ $? -eq 0 ]]; then
26 if [[ $apiReady -eq 1 ]] && [[ $keepProxyReady -eq 1 ]]; then
33 echo "Stopping Arvados cluster..."
34 cd $MY_PATH/../charts/arvados
37 echo "Stopping k8s cluster on GKE"
38 gcloud container clusters delete arvados --zone us-central1-a --quiet
39 gcloud compute addresses delete arvados-k8s-ip --region us-central1 --quiet
43 echo "Current k8s status:"
52 echo "Starting k8s cluster on GKE"
53 if [[ -z "$GKE_IP" ]]; then
54 gcloud compute addresses create arvados-k8s-ip --region us-central1
55 GKE_IP=`gcloud compute addresses describe arvados-k8s-ip --region us-central1 --format="value(address)"`
58 CLUSTER=`gcloud container clusters describe arvados --zone us-central1-a 2>/dev/null`
60 if [[ -z "$CLUSTER" ]]; then
61 gcloud container clusters create arvados --zone us-central1-a --machine-type n1-standard-2 --cluster-version 1.15
65 helm get all arvados >/dev/null 2>&1
66 if [[ $? -eq 0 ]]; then
67 echo "Deleting running arvados helm chart..."
69 while [ "$SVC" != "2" ]; do
70 SVC=`kubectl get svc|wc -l`
71 echo "Waiting for services to disappear..."
78 echo "Starting Arvados cluster..."
79 cd $MY_PATH/../charts/arvados
80 ./cert-gen.sh "$GKE_IP"
82 helm install arvados . --set externalIP="$GKE_IP"
84 echo "Waiting for cluster health OK..."
85 while [ $ready -ne 1 ]; do
94 MANAGEMENTTOKEN=`cat $MY_PATH/../charts/arvados/config/config.yml |grep Management |cut -f2 -d ':' |sed -e 's/ //'`
96 GKE_IP=`gcloud compute addresses describe arvados-k8s-ip --region us-central1 --format="value(address)" 2>/dev/null`
99 # testReady needs $GKE_IP
102 if [[ $ready -ne 1 ]]; then
105 # create the necessary kubectl context for the running cluster
106 gcloud container clusters get-credentials arvados --zone us-central1-a
110 echo "cluster health OK"
112 export ARVADOS_API_HOST=$GKE_IP:444
113 export ARVADOS_API_HOST_INSECURE=true
114 export ARVADOS_API_TOKEN=`grep superUserSecret $MY_PATH/../charts/arvados/values.yaml |cut -f2 -d\"`
116 cd $MY_PATH/cwl-diagnostics-hasher/
118 echo "uploading requirements for CWL hasher"
119 arv-put 4xphq-8i9sb-fmwod1qn74cemdp.log.txt --no-resume
120 echo "uploading Arvados jobs image for CWL hasher"
121 # just in case, clear the arv-put cache first, arv-keepdocker doesn't pass through --no-resume
122 rm -rf ~/.cache/arvados/arv-put
123 echo "running CWL hasher"
124 cwl-runner hasher-workflow.cwl hasher-workflow-job.yml
125 if [[ $? -eq 0 ]]; then