diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2018-04-12 16:59:54 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2018-04-13 14:34:08 +0800 |
commit | f119c6b855e4b6709b5cbf44b46d6046841108ea (patch) | |
tree | 05e8dfa2f5cc4526956d292183cdf52f1dcafbc2 /docker | |
parent | 25385d06e3cd06018e3d27d1e18c90b59941f6a1 (diff) |
Add support for install istio of specified version
Change-Id: Ibfe0002daff58d30e7fffbb8828d8853a7e963a6
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'docker')
-rw-r--r-- | docker/Dockerfile | 1 | ||||
-rwxr-xr-x | docker/setup.sh | 13 |
2 files changed, 8 insertions, 6 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index c2dcd84..daed730 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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" diff --git a/docker/setup.sh b/docker/setup.sh index 459f44b..639ced4 100755 --- a/docker/setup.sh +++ b/docker/setup.sh @@ -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 |