Add support for install istio of specified version 33/55733/1
authorYujun Zhang <zhang.yujunz@zte.com.cn>
Thu, 12 Apr 2018 08:59:54 +0000 (16:59 +0800)
committerYujun Zhang <zhang.yujunz@zte.com.cn>
Sat, 14 Apr 2018 03:11:14 +0000 (03:11 +0000)
Change-Id: Ibfe0002daff58d30e7fffbb8828d8853a7e963a6
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
(cherry picked from commit f119c6b855e4b6709b5cbf44b46d6046841108ea)

docker/Dockerfile
docker/setup.sh

index c2dcd84..daed730 100644 (file)
@@ -8,6 +8,7 @@
 FROM ubuntu:16.04
 LABEL image=opnfv/clover
 ARG BRANCH=master
+ARG ISTIO_VERSION=0.6.0
 
 # GIT repo directory
 ENV REPOS_DIR="/home/opnfv/repos"
index 459f44b..639ced4 100755 (executable)
@@ -16,11 +16,13 @@ if [ "x${ISTIO_VERSION}" = "x" ] ; then
                   grep tag_name | sed "s/ *\"tag_name\": *\"\(.*\)\",*/\1/")
 fi
 
-ISTIO_DIR_NAME="istio-$ISTIO_VERSION"
+mkdir istio-source
 
-cd /usr/local/
-curl -L https://git.io/getLatestIstio | sh -
-mv $ISTIO_DIR_NAME istio-source
+curl -L https://github.com/istio/istio/releases/download/${ISTIO_VERSION}/istio-${ISTIO_VERSION}-linux.tar.gz | \
+tar xz -C istio-source --strip-components 1
+
+# Install istioctl
+cp istio-source/bin/* /usr/local/bin
 
 # Install kubectl
 curl -s http://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
@@ -33,6 +35,5 @@ apt-get update \
     && apt-get -y autoremove \
     && apt-get clean
 
-# Persistently append istioctl bin path to PATH env
-echo 'export PATH="$PATH:/usr/local/istio-source/bin"' >> ~/.bashrc
+# Enable kubectl bash completion
 echo "source <(kubectl completion bash)" >> ~/.bashrc