Skip to main content
Version: 3.0.0-beta8

Run your First Chaos Scenario in 5 minutes


Welcome to this scenario, in this section you will get an overview of how to execute a sample LitmusChaos Scenario on your application to induce Chaos as well as to observe the results and resilience score.

Prerequisites​

Before starting with your first Chaos Scenario make sure the Litmus ChaosCenter is installed in either one of these scopes

Aim of the scenario​

In this scenario we will execute a pod-delete fault on a sample micro-service application called Podtato Head. This scenario will help you

  • Install and execute a pod-delete fault on the Podtato Head Application
  • Visualize and analyze the chaos experiment

Schedule your First Chaos Scenario​

Select the podtato-head predefined Chaos Scenario​

  1. Click on Schedule a Chaos Scenario from the ChaosCenter Homepage or from the top right button in the Litmus Workflows tab.
Schedule Chaos Scenario from Homepage Schedule Chaos Scenario from Litmus Chaos Scenarios

  1. Select Self Chaos Delegate as the target Chaos Delegate for Chaos Injection. This is where we'll select which Chaos Delegate to choose as the Chaos Delegate.

    Selecting Self Chaos Delegate
  2. Expand the first radio button (To create a new Chaos Scenario from Predefined Chaos Scenario Templates) and select podtato-head from the list of Predefined Chaos Scenarios.

    Select Podtato Head
  3. View the Chaos Scenario details in the Chaos Scenario Settings, you can modify the name and description of the Chaos Scenario to suit your needs.

    Modify Details of Podtato Head Chaos Scenario

Simulate the Chaos Scenario Steps Visualization​

  1. View the visualization of the Litmus Chaos Scenario you are about to execute. This step also allows for you to edit or modify the YAML/tunable if required. We would just stick with the default configurations for now.

    Visualize Podtato Head Chaos Scenario

    By default in the Podtato Head Chaos Scenario Template the steps to gracefully delete the Chaos Resources (revert-chaos) and also the Podtato Head application (delete-application) are present.

Assign Weights to the Chaos Scenario Experiments​

  1. Assign weights to the chaos experiments that are part of the Chaos Scenario using the slider. This is typically used when there are multiple experiments as part of a Chaos Scenario. These weights influence the Resilience Score calculation for the Chaos Scenario.

    Assign Weights for Chaos Scenario Experiments

Schedule the Podtato-Head Chaos Scenario​

  1. Schedule the Litmus Chaos Scenario for immediate and one-time execution by selecting the Schedule Now option

    Choose a Schedule for Chaos Scenario Execution
  2. Verify and click on Finish to start the Chaos Injection

    Verify and Schedule the Podtato Head Chaos Scenario

Congratulations​

And with that you have successfully scheduled your first Chaos Scenario with Litmus.

Podtato Head Chaos Scenario Scheduled Successfully

Visualize and Analyze​

  1. To check the current progress of the Podtato-Head Chaos Scenario, view the status of the Chaos Scenario from the Litmus Chaos Scenarios Tab.

    Podtato Head Chaos Scenario in Running State
  2. Litmus deploys a sample multi-replica hello-service application before going onto pull the pod-delete ChaosExperiment template. In the next step, it creates the ChaosEngine to launch the chaos injection via dedicated pods.

    To see all these steps live in action on the chaos scenario name from the Runs Tab or select Show the Chaos Scenario from the three dot menu.

    Podtato Head Chaos Scenario in Action

    To see them in action on the terminal itself watch the pods in the namespace where ChaosCenter is installed.

    In this case we would consider ChaosCenter to be installed in the litmus namespace

    kubectl get pods -n litmus
    Expected Output
    NAME                                        READY   STATUS              RESTARTS   AGE
    chaos-exporter-547b59d887-4dm58 1/1 Running 0 6h16m
    chaos-operator-ce-84ddc8f5d7-l8c6d 1/1 Running 0 6h16m
    event-tracker-5bc478cbd7-xlflb 1/1 Running 0 6h16m
    litmusportal-frontend-698bcb686f-xm4q5 1/1 Running 0 6h26m
    litmusportal-server-5bb94f65d7-llzng 2/2 Running 1 6h26m
    mongo-0 1/1 Running 0 6h26m
    pod-delete-llu29u-vh8w9 1/1 Running 0 21s
    podtato-5554584d7-68bts 1/1 Running 0 94s
    podtato-5554584d7-cjmv6 0/1 ContainerCreating 0 2s
    podtato-5554584d7-z4cwl 0/1 Terminating 0 94s
    podtato-head-chaos-1622018315-1170130526 0/2 Completed 0 112s
    podtato-head-chaos-1622018315-3739956689 2/2 Running 0 31s
    podtato-head-chaos-1622018315-80657052 0/2 Completed 0 79s
    podtato-head-pod-delete-chaosx55vh-runner 1/1 Running 0 25s
    subscriber-958948965-qbx29 1/1 Running 0 6h16m
    workflow-controller-78fc7b6c6-w82m7 1/1 Running 0 6h16m
  3. Post Chaos Execution view the Experiment Results. Click on the pod-delete node on the graph to launch a results console. Click on the Chaos Results tab to view the details around success/failure of the steady-state hypothesis constraints (podtato-head website availability through pod deletion period) and the experiment verdict.

    ChaosResult of Podtato Head

Resources​

Beginner Friendly Resources​

✨ Below is a list of beginner-level resources, everything you need to get started in your Cloud-Native Chaos Engineering journey ✨

List of Beginner Friendly Resources

Various Ways of Learning Litmus​