3 if [[ "$DEBUG" == "--debug" ]]; then
16 if [[ -n "$K8S_IP" ]]; then
23 # Is the Arvados API server ready?
24 curl --connect-timeout 1 -k -s -H "Authorization: Bearer $MANAGEMENTTOKEN" https://$K8S_IP:444/rails/_health/ping |grep -q OK
25 if [[ $? -eq 0 ]]; then
32 # Is the Arvados Keep proxy ready?
33 curl --connect-timeout 1 -k -s -H "Authorization: Bearer $MANAGEMENTTOKEN" https://$K8S_IP:25107/_health/ping |grep -q OK
34 if [[ $? -eq 0 ]]; then
41 # Everything is working
47 echo "Stopping Arvados cluster..."
48 cd $MY_PATH/../charts/arvados
55 echo "Current k8s status:"
66 echo "Starting Arvados cluster..."
67 cd $MY_PATH/../charts/arvados
68 ./cert-gen.sh "$K8S_IP"
70 helm install arvados . --set externalIP="$K8S_IP"
72 if [[ "$CLUSTERTYPE" == "minikube" ]]; then
73 ./minikube-external-ip.sh
80 echo "Waiting for cluster health OK..."
81 # Wait for up to 15 minutes for a healthy Arvados cluster.
83 while [[ $ready -ne 1 ]] && [[ $counter -gt 0 ]]; do
87 (( counter = counter-1 )) || true
89 if [[ $ready -ne 1 ]]; then
90 echo "Timed out waiting for cluster health OK. Shutting down cluster..."
98 MANAGEMENTTOKEN=`cat $MY_PATH/../charts/arvados/config/config.yml |grep Management |cut -f2 -d ':' |sed -e 's/ //'`
101 if [[ $ready -ne 1 ]]; then
104 if [[ "$CLUSTERTYPE" == "GKE" ]]; then
105 # create the necessary kubectl context for the running cluster
106 gcloud container clusters get-credentials arvados --zone us-central1-a
112 echo "cluster health OK"
114 export ARVADOS_API_HOST=$K8S_IP:444
115 export ARVADOS_API_HOST_INSECURE=true
116 export ARVADOS_API_TOKEN=`grep superUserSecret $MY_PATH/../charts/arvados/values.yaml |cut -f2 -d\"`
118 cd $MY_PATH/cwl-diagnostics-hasher/
120 echo "uploading requirements for CWL hasher"
121 arv-put 4xphq-8i9sb-fmwod1qn74cemdp.log.txt --no-resume
122 echo "uploading Arvados jobs image for CWL hasher"
123 # just in case, clear the arv-put cache first, arv-keepdocker doesn't pass through --no-resume
124 rm -rf ~/.cache/arvados/arv-put
125 echo "running CWL hasher"
126 cwl-runner hasher-workflow.cwl hasher-workflow-job.yml
127 if [[ $? -eq 0 ]]; then