Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.87 KB

README.md

File metadata and controls

53 lines (41 loc) · 1.87 KB

Microchaos Deployer

This project facilitates the deployment of a microchaos topology to a kubernetes cluster. You just need to create the services' configuration files and provide it to the deployer. It will take the responsability for generating the kubernetes manifests and deploy it to the cluster.

The deploy operation executes the following steps:

  1. Read the microchaos manifests
  2. Format target urls to match the internal cluster DNS addresses
  3. Store the configurations of each service at Consul
  4. Create the "microchaos" namespace in Kubernetes (if needed)
  5. Delete all existing resources inside this namespace (if any)
  6. Generate the services' manifests using helm template
  7. Apply the new services' manifests

Requirements

We suggest you use python virtual environment for running it:

sudo apt install python3-venv

Also, you will need helm, kubectl and a proper configured connection to a kubernetes cluster.

Install Helm:

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Kubectl installation guide: https://kubernetes.io/docs/tasks/tools/

The project was developed and tested using GKE - Google Kubernetes Engine.

Also, you will need to install Hashicorp Consul on your cluster. Having helm installed, just run:

./k8s/consul/consul-install.sh

How to use

From the microchaos root folder, (not inside the deployer folder) just run:

./deployer/bin/deploy <list of microchaos yaml files>  

The list of files should be separated by spaces, like this:

./deployer/bin/deploy $HOME/microchaos/svc-a.yml $HOME/microchaos/svc-b.yml $HOME/microchaos/svc-c.yml 

If you need to configure some variables, like the pod ports or the consul location inside the cluster, just modify the helm/service-chart/values.yaml file.