Last active
March 13, 2020 21:19
-
-
Save rvennam/619fca979d3d745394ae4a96b5297a60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export CLUSTER=istio6 | |
| echo "Install Istio 1.4" | |
| curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.4.5 sh - | |
| cd istio-1.4.5 | |
| ibmcloud ks cluster addon enable istio -c $CLUSTER | |
| kubectl label namespace default istio-injection=enabled | |
| sleep 120s | |
| kubectl get pods -n istio-system | |
| read -p "Press enter to continue" | |
| echo "Install BookInfo" | |
| kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml | |
| kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml | |
| sleep 15s | |
| export INGRESS_HOST=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | |
| export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}') | |
| export SECURE_INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="https")].port}') | |
| echo http://$INGRESS_HOST/productpage | |
| while true; do sleep 1; curl -s -o /dev/null -w "%{http_code}\n" http://$INGRESS_HOST/productpage;done & | |
| read -p "Press enter to continue" | |
| cd .. | |
| echo "Upgrade to Istio 1.5" | |
| curl -L https://istio.io/downloadIstio | sh - | |
| cd istio-1.5.0 | |
| ibmcloud ks cluster addon update istio --version 1.5 -c $CLUSTER | |
| sleep 120s | |
| kubectl get pods -n istio-system | |
| echo http://$INGRESS_HOST/productpage | |
| # curl http://$INGRESS_HOST/productpage | grep Simple | |
| # CLEANUP | |
| read -p "Clean up?" | |
| ibmcloud ks cluster addon disable istio -c $CLUSTER -f | |
| ./samples/bookinfo/platform/kube/cleanup.sh | |
| cd .. | |
| rm -rf istio-1.4.5/ | |
| rm -rf istio-1.5.0/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Slightly modified version here -> https://gist.github.com/jpapejr/d44dc83864b94214d01b7d8bff4f6e33