Skip to content

Instantly share code, notes, and snippets.

@yurifrl
Last active May 8, 2020 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yurifrl/277f79904c78876c1786069cd67be7a6 to your computer and use it in GitHub Desktop.
Save yurifrl/277f79904c78876c1786069cd67be7a6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# curl -s -L https://gist.githubusercontent.com/yurifrl/277f79904c78876c1786069cd67be7a6/raw/33b94b7099456560aeae46fcbaaef95abec88a2b/deploy-istio.sh | bash -
cd /root/
/usr/bin/launch.sh>&2
ISTIO_VERSION=1.0.0
if [[ ! -d "/root/istio-$ISTIO_VERSION" ]]; then
echo "Downloading Istio... this may take a couple of moments">&2
curl -s -L https://git.io/getLatestIstio | ISTIO_VERSION=1.0.0 sh -
echo "Download completed. Configuring Kubernetes.">&2
else
echo "Istio already exists">&2
fi
export PATH="$PATH:/root/istio-$ISTIO_VERSION/bin";
echo "cd /root/istio-$ISTIO_VERSION"
cd "/root/istio-$ISTIO_VERSION"
pwd
echo "$ => curl -s -L -o samples/bookinfo/networking/virtual-service-reviews-v1.yaml https://gist.githubusercontent.com/BenHall/e5fa7eed7e1b0bc21ac0abbd431efc37/raw/bed904fb75516e8e0dd87c86c5b274fb4c5e372c/virtual-service-reviews-v1.yaml"
curl -s -L -o samples/bookinfo/networking/virtual-service-reviews-v1.yaml https://gist.githubusercontent.com/BenHall/e5fa7eed7e1b0bc21ac0abbd431efc37/raw/bed904fb75516e8e0dd87c86c5b274fb4c5e372c/virtual-service-reviews-v1.yaml
echo "$ => curl -s -L -o samples/bookinfo/networking/virtual-service-reviews-v2.yaml https://gist.githubusercontent.com/BenHall/e5fa7eed7e1b0bc21ac0abbd431efc37/raw/cf8426de87eb29716f41070bb619c6f4fbd759af/virtual-service-reviews-v2.yaml"
curl -s -L -o samples/bookinfo/networking/virtual-service-reviews-v2.yaml https://gist.githubusercontent.com/BenHall/e5fa7eed7e1b0bc21ac0abbd431efc37/raw/cf8426de87eb29716f41070bb619c6f4fbd759af/virtual-service-reviews-v2.yaml
echo "$ => curl -s -L -o samples/bookinfo/networking/virtual-service-reviews-chrome-v2.yaml https://gist.githubusercontent.com/BenHall/e5fa7eed7e1b0bc21ac0abbd431efc37/raw/c3c3a25721af90e180c1b02c618d6c8b660402d7/virtual-service-reviews-chrome-v2.yaml"
curl -s -L -o samples/bookinfo/networking/virtual-service-reviews-chrome-v2.yaml https://gist.githubusercontent.com/BenHall/e5fa7eed7e1b0bc21ac0abbd431efc37/raw/c3c3a25721af90e180c1b02c618d6c8b660402d7/virtual-service-reviews-chrome-v2.yaml
echo "$ => kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml -n istio-system"
kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml -n istio-system
echo "$ => kubectl apply -f install/kubernetes/istio-demo-auth.yaml"
kubectl apply -f install/kubernetes/istio-demo-auth.yaml
echo "$ => kubectl apply -f /root/katacoda.yaml"
kubectl apply -f /root/katacoda.yaml
echo "$ => kubectl apply -f <(istioctl kube-inject -f samples/bookinfo/platform/kube/bookinfo.yaml)"
kubectl apply -f <(istioctl kube-inject -f samples/bookinfo/platform/kube/bookinfo.yaml)
echo "$ => kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml"
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
echo "$ => kubectl apply -f samples/bookinfo/networking/destination-rule-all-mtls.yaml"
kubectl apply -f samples/bookinfo/networking/destination-rule-all-mtls.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment