Use Multi-Stage Builds to Improve Continuous Delivery Pipeline

Learn how to use Docker multi-stage builds

ta-ching chen

3 minute read

Introduction

A basic rule for building a container image is “the smaller is better”.

But it’s not an easy job for the compiled language (e.g. go, java) due to large build environment and dependencies. In the post “Building Minimal Docker Image for Go Applications”, we need to produce a go binary first and put it into scratch image. And it’s quite complicated and heavy for developers to create such continuous delivery pipeline.

To solve this problem, Docker 17.05+ releases a new feature called Multi-stage builds. With this feature we can combine multiple dockerfiles into one and let base image to copy artifacts and outputs from the intermediate image. In this way, we can keep pipeline easy to read and maintain.

Fission and Istio Integration

Tutorial for how to integrate Fission with Istio

ta-ching chen

3 minute read

Articles

Introduction

Fission is a framework for serverless functions on Kubernetes. Istio is an open platform to connect, manage, and secure microservice announced by Google, IBM and Lyft. It makes sense to combine them together to provide user more powerful functionalities.

Since this is the very first step for fission to integrate with Istio, there are still couple problems need to be solved. For those interested in trying to integrate fission with istio, following is the set up tutorial.

Setup

Test Environment

  • Google Kubernetes Engine: 1.9.2-gke.1 cluster
  • Fission: 0.6.0
  • Istio: 0.6.0

Create Kubernetes v1.9+ Alpha Cluster

Available zone can be found here

$ export ZONE=<zone name>
$ gcloud container clusters create istio-demo-1 \
    --machine-type=n1-standard-2 \
    --num-nodes=1 \
    --no-enable-legacy-authorization \
    --zone=$ZONE \
    --cluster-version=1.9.2-gke.1

Kubernetes - Two Steps Installation

Learn how to use Kubeadm to install Kubernetes in mins

ta-ching chen

4 minute read

Introduction

Long time ago, the way to install kubernetes was quite complicate. After kubernetes 1.4, we can use Kubeadm to install a kubernetes cluster with only two steps. Now, let’s start our journey.

Prequisite

  • Ubuntu 16.04

Installation

  • install.sh
#!/bin/bash
apt-get update && apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
# Install docker if you don't have it already.
apt-get install -y docker.io
apt-get install -y kubelet kubeadm kubectl kubernetes-cni