Skip to content

Istio 1.0.0 release

Guirish Salgaonkar edited this page Aug 29, 2018 · 4 revisions

Building Istio

The DRAFT instructions provided below specify the steps to build Istio version 1.0.0 on Linux on IBM Z for following distributions:

  • RHEL (7.3, 7.4, 7.5)
  • SLES 12 SP3
  • Ubuntu (16.04, 18.04)

General Note:

  • Below steps should be performed as root user.
  • A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.

Prerequisites:

  • Istio Proxy -- Instructions for building Istio Proxy provided here
  • Helm -- Instructions for building Helm can be found here

Step 1: Install the dependencies

  • RHEL (7.3, 7.4, 7.5)

    sudo yum install -y wget tar make zip unzip git vim gcc gcc-c++ binutils-devel bzip2 which java-1.8.0-openjdk java-1.8.0-openjdk-devel automake autoconf libtool zlib pkgconfig zlib-devel curl bison libcurl-devel
    • Docker -- Instructions for installation of Docker for Rhel (7.3, 7.4, 7.5) can be found here.
  • SLES 12 SP3

     zypper install -y wget tar make zip unzip git vim gcc gcc-c++ binutils-devel bzip2 glibc-devel makeinfo zlib-devel curl which java-1_8_0-openjdk-devel automake autoconf libtool zlib pkg-config libcurl-devel   
    • Docker -- Instructions for installation of Docker for SLES 12 SP3 can be found here.
  • Ubuntu 16.04

     apt-get update  
     apt-get install -y pkg-config zip gcc g++ tar zlib1g-dev unzip git vim tar wget automake autoconf libtool make curl openjdk-8-jdk libcurl3-dev bzip2  
    
    • Docker -- Instructions for installation of Docker for Ubuntu 16.04 can be found here.
  • Ubuntu 18.04

     apt-get update  
     apt-get install -y pkg-config zip gcc g++ zlib1g-dev unzip git vim tar wget automake autoconf libtool make curl openjdk-8-jdk libcurl3-dev bzip2  
    • Docker -- Instructions for installation of Docker for Ubuntu 18.04 can be found here.

Note: Docker-ce versions between 17.06 and 18.02 have a known issue on IBM Z. This has been fixed in version 18.03, refer to docker release link for most up to date information on which another version might contain this fix.

  • Install Go - v1.10.1
    • Ubuntu 18.04

      sudo apt-get install -y golang-1.10
      export PATH=/usr/lib/go-1.10/bin:$PATH	
      
    • RHEL, SLES and Ubuntu 16.04

      cd /<source_root>/
      wget https://storage.googleapis.com/golang/go1.10.1.linux-s390x.tar.gz
      tar -xzf go1.10.1.linux-s390x.tar.gz
      export PATH=/<source_root>/go/bin:$PATH
      export GOROOT=/<source_root>/go
      go version
      

Step 2: Download, configure and build Istio

2.1) Download Istio

cd /<source_root>/
export GOPATH=`pwd` && export PATH=$PATH:$GOPATH/bin
mkdir -p $GOPATH/src/istio.io && cd $GOPATH/src/istio.io
git clone https://github.com/istio/istio.git
cd istio
git checkout 1.0.0

2.2) Edit $GOPATH/src/istio.io/istio/bin/init.sh file to refer to local Envoy binaries:

@@ -118,25 +118,25 @@ if [ ! -f "$ISTIO_ENVOY_DEBUG_PATH" ] || [ ! -f "$ISTIO_ENVOY_RELEASE_PATH" ] ;
   rm -f ${ISTIO_OUT}/envoy ${ROOT}/pilot/pkg/proxy/envoy/envoy ${ISTIO_BIN}/envoy

   # Download debug envoy binary.
-    mkdir -p $ISTIO_ENVOY_DEBUG_DIR
+    mkdir -p $ISTIO_ENVOY_DEBUG_DIR/usr/local/bin
+    cp <path-to-envoy-debug-binary/envoy> $ISTIO_ENVOY_DEBUG_DIR/usr/local/bin
   pushd $ISTIO_ENVOY_DEBUG_DIR
   if [ "$LOCAL_OS" == "Darwin" ] && [ "$GOOS" != "linux" ]; then
      ISTIO_ENVOY_DEBUG_URL=${ISTIO_ENVOY_MAC_RELEASE_URL}
   fi
   echo "Downloading envoy debug artifact: ${DOWNLOAD_COMMAND} ${ISTIO_ENVOY_DEBUG_URL}"
-    time ${DOWNLOAD_COMMAND} ${ISTIO_ENVOY_DEBUG_URL} | tar xz
   cp usr/local/bin/envoy $ISTIO_ENVOY_DEBUG_PATH
   rm -rf usr
   popd

   # Download release envoy binary.
-    mkdir -p $ISTIO_ENVOY_RELEASE_DIR
+    mkdir -p $ISTIO_ENVOY_RELEASE_DIR/usr/local/bin
+    cp <path-to-envoy-release-binary/envoy> $ISTIO_ENVOY_RELEASE_DIR/usr/local/bin
   pushd $ISTIO_ENVOY_RELEASE_DIR
   if [ "$LOCAL_OS" == "Darwin" ] && [ "$GOOS" != "linux" ]; then
      ISTIO_ENVOY_RELEASE_URL=${ISTIO_ENVOY_MAC_RELEASE_URL}
   fi
   echo "Downloading envoy release artifact: ${DOWNLOAD_COMMAND} ${ISTIO_ENVOY_RELEASE_URL}"
-    time ${DOWNLOAD_COMMAND} ${ISTIO_ENVOY_RELEASE_URL} | tar xz
   cp usr/local/bin/envoy $ISTIO_ENVOY_RELEASE_PATH
   rm -rf usr
   popd

2.3) Edit file $GOPATH/src/istio.io/istio/bin/init_helm.sh to refer to local Helm binary:

@@ -73,10 +73,7 @@ if [ ! -f ${ISTIO_OUT}/version.helm.${HELM_VER} ] ; then
   TD=$(mktemp -d)
   # Install helm. Please keep it in sync with .circleci
   cd ${TD} && \
-        curl -Lo ${TD}/helm.tgz https://storage.googleapis.com/kubernetes-helm/helm-${HELM_VER}-${LOCAL_OS}-amd64.tar.gz && \
-        tar xfz helm.tgz && \
-        mv ${LOCAL_OS}-amd64/helm ${ISTIO_OUT}/helm-${HELM_VER} && \
-        cp ${ISTIO_OUT}/helm-${HELM_VER} ${ISTIO_OUT}/helm && \
+        cp <path-to-Helm-binary/helm> ${ISTIO_OUT}/helm && \
       rm -rf ${TD} && \
       touch ${ISTIO_OUT}/version.helm.${HELM_VER}
fi

2.4) Edit below files as per changes mentioned:

  • $GOPATH/src/istio.io/istio/vendor/go4.org/reflectutil/swapper_safe.go
@@ -2,7 +2,7 @@  
 // Use of this source code is governed by a BSD-style  
 // license that can be found in the LICENSE file.  

-// +build js appengine safe ppc64 ppc64le arm64 mips mipsle mips64 mips64le  
+// +build js appengine safe ppc64 ppc64le arm64 mips mipsle mips64 mips64le s390x  

 package reflectutil   
  • $GOPATH/src/istio.io/istio/vendor/go4.org/reflectutil/swapper_unsafe.go
@@ -2,7 +2,7 @@  
 // Use of this source code is governed by a BSD-style  
 // license that can be found in the LICENSE file.  

-// +build !ppc64,!ppc64le,!arm64,!mips,!mipsle,!mips64,!mips64le  
+// +build !ppc64,!ppc64le,!arm64,!mips,!mipsle,!mips64,!mips64le,!s390x   
 // +build !js,!appengine,!safe  

 package reflectutil     
  • $GOPATH/src/istio.io/istio/vendor/go4.org/reflectutil/swapper_unsafe_14.go
@@ -2,7 +2,7 @@   
 // Use of this source code is governed by a BSD-style   
 // license that can be found in the LICENSE file.  

-// +build !ppc64,!ppc64le,!arm64,!mips,!mipsle,!mips64,!mips64le  
+// +build !ppc64,!ppc64le,!arm64,!mips,!mipsle,!mips64,!mips64le,!s390x  
 // +build !go1.5,!js,!appengine,!safe  

 package reflectutil  
  • $GOPATH/src/istio.io/istio/vendor/go4.org/reflectutil/swapper_unsafe_15.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style  
 // license that can be found in the LICENSE file.  

-// +build !ppc64,!ppc64le,!arm64,!mips,!mipsle,!mips64,!mips64le  
+// +build !ppc64,!ppc64le,!arm64,!mips,!mipsle,!mips64,!mips64le,!s390x  
 // +build go1.5,!js,!appengine,!safe  
 
 package reflectutil  

2.5) Build Istio

cd $GOPATH/src/istio.io/istio
make build

Step 3: Run the test cases (optional)

3.1) Prerequisites

  • You must have Kubernetes 1.9 or newer cluster with RBAC (Role-Based Access Control) enabled. You should also have a local configured copy of kubectl. Download Kubernetes server binary from Kubernetes. At the time of creation of these build instructions Istio was verified using kubeadm v1.9.9.
  • Start kubernetes cluster using kubeadm init --pod-network-cidr=10.244.0.0/16

3.2) Run the test cases

cd $GOPATH/src/istio.io/istio
make test

Note:

  • Below Test Case is currently failing:

    • mixer/test/spybackend
    • mixer/test/client/istio_authn_origin_jwt_bound_origin
    • mixer/test/client/istio_authn_origin_jwt_bound_peer
    • mixer/test/client/istio_authn_peer_jwt_bound_peer
  • Below Test Cases fail on x86 too:

    • mixer/pkg/config/store

Step 4: Istio Integration

Reference

https://istio.io/