From f119c6b855e4b6709b5cbf44b46d6046841108ea Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Thu, 12 Apr 2018 16:59:54 +0800 Subject: Add support for install istio of specified version Change-Id: Ibfe0002daff58d30e7fffbb8828d8853a7e963a6 Signed-off-by: Yujun Zhang --- docker/Dockerfile | 1 + 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 -- cgit 1.2.3-korg