csantanapr closed pull request #196: perform all downloads in /tmp to avoid 
adding spurious files into clo…
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/196
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tools/travis/setup.sh b/tools/travis/setup.sh
index 75c232d..66f1c8e 100755
--- a/tools/travis/setup.sh
+++ b/tools/travis/setup.sh
@@ -26,23 +26,29 @@ EOF
     sudo install -v nsenter /usr/local/bin
 }
 
-# helm on minikube's vm-driver=none requires nsenter
-check_or_build_nsenter
+# Download and install misc packages and utilities
+pushd /tmp
+  # helm on minikube's vm-driver=none requires nsenter
+  check_or_build_nsenter
+
+  # download and install the wsk cli
+  wget -q 
https://github.com/apache/incubator-openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-linux-amd64.tgz
+  tar xzf OpenWhisk_CLI-latest-linux-amd64.tgz
+  sudo cp wsk /usr/local/bin/wsk
+
+  # Download and install kubectl and minikube following the recipe in the 
minikube
+  # project README.md for using minikube for Linux Continuous Integration with 
VM Support
+    curl -Lo kubectl 
https://storage.googleapis.com/kubernetes-release/release/$TRAVIS_KUBE_VERSION/bin/linux/amd64/kubectl
 && chmod +x kubectl && sudo mv kubectl /usr/local/bin
+  curl -Lo minikube 
https://storage.googleapis.com/minikube/releases/$TRAVIS_MINIKUBE_VERSION/minikube-linux-amd64
 && chmod +x minikube && sudo mv minikube /usr/local/bin
 
+  # Download and install helm
+  curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > 
get_helm.sh && chmod +x get_helm.sh && ./get_helm.sh
 
-# download and install the wsk cli
-wget -q 
https://github.com/apache/incubator-openwhisk-cli/releases/download/latest/OpenWhisk_CLI-latest-linux-amd64.tgz
-tar xzf OpenWhisk_CLI-latest-linux-amd64.tgz
-sudo cp wsk /usr/local/bin/wsk
+popd
 
 # set docker0 to promiscuous mode
 sudo ip link set docker0 promisc on
 
-# Download and install kubectl and minikube following the recipe in the 
minikube
-# project README.md for using minikube for Linux Continuous Integration with 
VM Support
-curl -Lo kubectl 
https://storage.googleapis.com/kubernetes-release/release/$TRAVIS_KUBE_VERSION/bin/linux/amd64/kubectl
 && chmod +x kubectl && sudo mv kubectl /usr/local/bin
-curl -Lo minikube 
https://storage.googleapis.com/minikube/releases/$TRAVIS_MINIKUBE_VERSION/minikube-linux-amd64
 && chmod +x minikube && sudo mv minikube /usr/local/bin
-
 export MINIKUBE_WANTUPDATENOTIFICATION=false
 export MINIKUBE_WANTREPORTERRORPROMPT=false
 export MINIKUBE_HOME=$HOME
@@ -71,19 +77,12 @@ if [ $TIMEOUT -eq $TIMEOUT_COUNT ]; then
   exit 1
 fi
 
-echo "minikube is deployed and reachable"
-/usr/local/bin/kubectl describe nodes
-
 minikube update-context
 
-# Download and install helm
-pushd /tmp
-  curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > 
get_helm.sh
-  chmod +x get_helm.sh
-  ./get_helm.sh
-popd
+echo "minikube is deployed and reachable"
+/usr/local/bin/kubectl describe nodes
 
-# Install tiller
+# Install tiller into the minikube cluster
 /usr/local/bin/helm init --service-account default
 
 # Wait for tiller to be ready
@@ -91,7 +90,8 @@ TIMEOUT=0
 TIMEOUT_COUNT=20
 until [ $TIMEOUT -eq $TIMEOUT_COUNT ]; do
   TILLER_STATUS=$(/usr/local/bin/kubectl -n kube-system get pods -o wide | 
grep tiller-deploy | awk '{print $3}')
-  if [ "$TILLER_STATUS" == "Running" ]; then
+  TILLER_READY_COUNT=$(/usr/local/bin/kubectl -n kube-system get pods -o wide 
| grep tiller-deploy | awk '{print $2}')
+  if [[ "$TILLER_STATUS" == "Running" ]] && [[ "$TILLER_READY_COUNT" == "1/1" 
]]; then
     break
   fi
   echo "Waiting for tiller to be ready"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to