Setup Litmus using ArgoCD

Image by @brett_jordan

Practice Environment setup

Let's go to practice environment setup. Firstly, you will need to deploy Argo CD from Helm Chart to have an automated minimum continuous delivery project for Litmus Portal. Do these commands below πŸ₯·πŸ»

Remember ✍🏼 : Reset Argo CD UI user password

Create a new app for Litmus on Argo CD using these configuration parameters below

Argo CD new app setup for Litmus Portal

Helm repository: https://github.com/litmuschaos/litmus-helm

After finished you will have an app on Argo CD, like this

Litmus Portal app on Argo CD
Litmus Portal Argo CD details

Or create it manually. For more details follow the instructions here (https://github.com/litmuschaos/litmus/tree/master/litmus-portal)

For now, check all the important litmus resources on the cluster namespace

Below are the 3 CRDs (Definitions taken from the official repository):

ChaosEngine: A resource to link a Kubernetes application or Kubernetes node to a ChaosExperiment. ChaosEngine is watched by Litmus’ Chaos-Operator which then invokes Chaos-Experiments

ChaosExperiment: A resource to group the configuration parameters of a chaos experiment. ChaosExperiment CRs are created by the operator when experiments are invoked by ChaosEngine.

ChaosResult: A resource to hold the results of a chaos-experiment. The Chaos-exporter reads the results and exports the metrics into a configured Prometheus server.

Now It’s time to create our chaos experiments!

With Argo CD setup for Litmus Portal finished, do a port forward on litmus portal frontend service to access Litmus portal UI

Litmus Portal

Remember ✍🏼: Litmus portal default user and password is admin:litmus

  1. Prepare your cluster

Apply this to your cluster:

2. Install experiments

Litmus Chaos experiments contain the actual details for chaos events to be triggered. There are experiments already listed on the chaos hub that can be readily installed onto the cluster. For now, we will install all of the generic experiments and use pod-delete and pod-autoscaler which we will need to get onto our cluster:

Example: Deploying PHP Guestbook application with MongoDB to use on Chaos

Objectives

  • Start up a Mongo database.
  • Start up the guestbook frontend.
  • Expose and view the Frontend Service.
  • Apply Chaos Engine for pod-delete
  • Apply Chaos Engine for pod-autoscale
  • Clean up.

Startup stack demo for chaos

Apply this to our cluster:

Apply Chaos Engine for pod-delete on stack demo FrontEnd

Apply this to our cluster:

Applying the Chaos on target deployment:

To check the status/result of the experiment:

Chaos Engine for pod-autoscale:

Applying the Chaos on target deployment:

To check the status/result of the experiment:

A brain dump about SRE, DevSecOps, DevOps, Kubernetes, Infrastructure as a code and Cloud

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store