How To Deploy Zenko On Google Kubernetes Engine

Zenko can be deployed on a managed-Kubernetes cluster on Google Cloud (GKE) using the Helm charts distributed in its repository. There are many other ways to run Zenko on a Kubernetes cluster, including our favorite Kubernetes distribution MetalK8s. The Helm charts are designed to isolate how Zenko is deployed from where it is deployed: any […]

Written By Stefano Maffulli

On July 17, 2018
"

Read more

Solve the challenges of large-scale data, once and for all.

Zenko can be deployed on a managed-Kubernetes cluster on Google Cloud (GKE) using the Helm charts distributed in its repository. There are many other ways to run Zenko on a Kubernetes cluster, including our favorite Kubernetes distribution MetalK8s. The Helm charts are designed to isolate how Zenko is deployed from where it is deployed: any Kubernetes cluster will be good to get started. In some ways, it helps developers like Zenko itself tries to give developers the freedom to choose the best cloud storage system, abstracting the complex choices like supporting multiple APIs or aggregate metadata.  GKE is an easy way to quickly setup a cloud-agnostic storage platform.

The first step is to start a new cluster on Kubernetes following the instructions on Google Cloud documentation. For better performance, you’ll need a cluster with 3 nodes, 2vCPU and 7.5GB RAM each. Once the cluster is running, connect to it and install Helm.

Create Role For Tiller

Google Kubernetes Engine requires Role Based Access Control to be setup. The first step is to create a serviceaccount for tiller:

$ kubectl create serviceaccount tiller --namespace kube-system

Check that the correct context is set:

$ kubectl get nodes
NAME                                       STATUS   ROLES    AGE VERSION
gke-cluster-1-default-pool-9ad69bcf-4g2n   Ready    <none>   1m  v1.8.10-gke.0
gke-cluster-1-default-pool-9ad69bcf-frj5   Ready    <none>   1m  v1.8.10-gke.0
gke-cluster-1-default-pool-9ad69bcf-rsbt   Ready    <none>   1m  v1.8.10-gke.0

Install Helm on Kubernetes Cluster

Helm is not available by default on GKE and needs to be installed.

$ curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
$ bash ./get_helm.sh

Once that’s completed, start Helm:

$ helm init --service-account tiller --wait

Deploy Zenko on GKE

Clone Zenko’s repo and go into the charts directory:

$ git clone https://github.com/scality/Zenko.git
$ cd ./Zenko/charts

Once you have the repo cloned you can retrieve all dependencies:

$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
"incubator" has been added to your repositories

$ helm dependency build zenko/
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "incubator" chart repository
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 8 charts
Downloading prometheus from repo https://kubernetes-charts.storage.googleapis.com/
Downloading mongodb-replicaset from repo https://kubernetes-charts.storage.googleapis.com/
Downloading redis from repo https://kubernetes-charts.storage.googleapis.com/
Downloading kafka from repo http://storage.googleapis.com/kubernetes-charts-incubator
Downloading zookeeper from repo http://storage.googleapis.com/kubernetes-charts-incubator
Deleting outdated charts

With your dependencies built, you can run the following shell command to deploy a three-nodes Zenko stack with Orbit enabled.

$ helm install --name zenko --set ingress.enabled=true zenko

Connect GKE Zenko To Orbit

Find the Instance ID to use for registering your instance:

$ kubectl logs $(kubectl get pods --no-headers=true -o \
custom-columns=:metadata.name | grep cloudserver-front) | grep \
Instance | tail -n 1

The output will look something like this:

{"name":"S3",
"time":1529101607249,
"req_id":"9089628bad40b9a255fd",
"level":"info",
"message":"this deployment's Instance ID is 6075357a-b08d-419e-9af8-cc9f391ca8e2",
"hostname":"zenko-cloudserver-front-f74d8c48c-dt6fc",
"pid":23}

Copy the ID and head to Orbit to paste it in the Settings page. Once the Zenko instance is connected to Orbit you’ll be able to attach cloud storage from different providers.

Photo by Silvio Kundt on Unsplash

Simple, secure S3 object storage software for modern applications