summaryrefslogtreecommitdiffstats
path: root/src/vagrant/kubeadm_istio/istio
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2018-02-02 15:17:55 +0800
committerQiLiang <liangqi1@huawei.com>2018-02-02 15:19:20 +0800
commit97b14e970658feeece72a6f7d705a3e50ed82a49 (patch)
treeea986065119104e88ae963ddd29dbddf266de1c1 /src/vagrant/kubeadm_istio/istio
parent5ed69809f33e546bf3e06dc285a90e0818c89ceb (diff)
Update istio installation
Update istio installation, since upstream istio 0.5.0 is released. Fetch istio latest version from github.com instead of hard code it. Change-Id: If7aca736d631f74f9fdd6828a204895ec342b0ad Signed-off-by: QiLiang <liangqi1@huawei.com>
Diffstat (limited to 'src/vagrant/kubeadm_istio/istio')
-rwxr-xr-xsrc/vagrant/kubeadm_istio/istio/deploy.sh18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/vagrant/kubeadm_istio/istio/deploy.sh b/src/vagrant/kubeadm_istio/istio/deploy.sh
index ed873f5..051497c 100755
--- a/src/vagrant/kubeadm_istio/istio/deploy.sh
+++ b/src/vagrant/kubeadm_istio/istio/deploy.sh
@@ -17,12 +17,24 @@
set -ex
-# Deploy istio 0.4.0
+# Get latest istio version, refer: https://git.io/getLatestIstio
+if [ "x${ISTIO_VERSION}" = "x" ] ; then
+ ISTIO_VERSION=$(curl -L -s https://api.github.com/repos/istio/istio/releases/latest | \
+ grep tag_name | sed "s/ *\"tag_name\": *\"\(.*\)\",*/\1/")
+fi
+
+ISTIO_DIR_NAME="istio-$ISTIO_VERSION"
+
cd /vagrant
curl -L https://git.io/getLatestIstio | sh -
-mv istio-0.4.0 istio-source
+mv $ISTIO_DIR_NAME istio-source
cd /vagrant/istio-source/
-export PATH=$PWD/bin:$PATH
+
+# Persistently append istioctl bin path to PATH env
+echo 'export PATH="$PATH:/vagrant/istio-source/bin"' >> ~/.bashrc
+echo "source <(kubectl completion bash)" >> ~/.bashrc
+source ~/.bashrc
+
kubectl apply -f install/kubernetes/istio.yaml
# Validate the installation