raphaeldussin / example.pangeo.io-deploy

Deployment automation for example.pangeo.io
0 stars 1 forks source link

About

This repository contains the reproducible configuration for deploying a Pangeo instance on Google Kubernetes Engine.

It contains scripts to automatically redeploy when the image definition or chart parameters are changed.

Before we start

What you need on your local machine

Roles on Google Cloud

From the Google Cloud Console GCE, make sure you have the following roles (else adjust with owner):

Setup

The first step to using this automation is to create a Kubernetes cluster and install the server-side component Tiller on it (used for deploying applications with the Helm tool). Scripts to do so can be found here: https://github.com/pangeo-data/pangeo/tree/master/gce/setup-guide

Install git-crypt

You will need to install git-crypt. git-crypt is used to encrypt the secrets that are used for deploying your cluster. Please read this HOW GIT-CRYPT WORKS if new to it.

Configure this repository

Once you have a cluster created, you can begin customizing the configuration.

Name Description
GCR_READWRITE_KEY The JSON output of gcloud iam service-accounts keys create (ask Pangeo administrator to configure this)
GIT_CRYPT_KEY The base64 encoded output of git crypt export-key key.txt Then run base64 key.txt to get pipe the key to standard output. Copy past into the env var. Delete key.txt afterwards!
GKE_CLUSTER The name that your cluster was created with
GOOGLE_PROJECT The identifier of the project where your cluster was created
GOOGLE_REGION The Google compute region where your cluster is located (e.g. us-central1)
GOOGLE_ZONE The Google compute zone where your cluster is located (e.g. us-central1-b)
IMAGE_NAME The container registry image to build and use for your notebook and worker containers (e.g. us.gcr.io/pangeo-181919/example-pangeo-io-notebook). See documentation for setting up with your own project. Note: you need write permisson for this project. You will also have to give permisson (Storage Admin, Kubernetes Engine Admin, and Viewer) to the circleCI service account on the container registry (see doc). Then enable the registry API here
DEPLOYMENT The name of the directory in deployments you wish to deploy (e.g., example.pangeo.io)

Common Issues