This repo contains all configuration files for Google Cloud Platform and our Kubernetes Cluster.
Here you can find our sequence diagram.
We are using two databases to separate ingestion and serving data. You can find the entity-relationship-diagrams here.
We are using terraform
for configuring all used Google Cloud Services. All configuration files
are located in /gcp
HashiCorp Terraform enables you to safely and predictably create, change, and improve infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned. https://www.terraform.io/
Terraform is built on top of Google Cloud API and applies your configuration files to your Google Cloud Project.
Mac OS with Homebrew
$ sudo brew install terraform
Or use the official instructions: https://www.terraform.io/intro/getting-started/install.html
cd /gcp
terraform init
will install provider binaries to access GCloud APIterraform plan
will show all planned changesterraform apply
will apply your changes
Currently we are running a single production cluster. The /kubernetes
directory contains k8s manifests about:
- deployments
- services
- ingresses
- ssl-certificates and letsencrypt-issuer
- cluster-role-bindings (access permissions)
For setting up the cluster helm was used as k8s package manager. Following things were installed using helm:
- nginx ingress-controller
- cert-manager (using letsencrypt)
You can access the cluster using kubectl
Mac OS with Homebrew
$ sudo brew install kubernetes-cli
Ubuntu with snap
$ sudo snap install kubectl --classic
For authenticating you have to install Google Cloud SDK.
After installing run: gcloud init
Now you can use gcloud-cli to auto-generate your ~/.kube/config
which will be used by kubectl
gcloud container clusters get-credentials production --zone europe-west3-a --project triangl-215714
Now you can start using: kubectl