Skip to content

Commit fae7cca

Browse files
Added docs for 2.14.0 ChaosCenter (#212)
* Added docs for litmus 2.14.0 and litmusctl 0.14.0 Signed-off-by: Sarthak Jain <[email protected]> * Updated litmusctl download links and compatibility matrix Signed-off-by: Sarthak Jain <[email protected]> Signed-off-by: Sarthak Jain <[email protected]>
1 parent 01f8adc commit fae7cca

File tree

283 files changed

+18869
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+18869
-4
lines changed

website/docs/litmusctl/installation.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,23 @@ To check compatibility of litmusctl with Chaos Center
4949
</tr>
5050
<tr>
5151
<td>0.10.0</td>
52-
<td>2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0</td>
52+
<td>2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0, 2.14.0</td>
5353
</tr>
5454
<tr>
5555
<td>0.11.0</td>
56-
<td>2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0</td>
56+
<td>2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0, 2.14.0</td>
5757
</tr>
5858
<tr>
5959
<td>0.12.0</td>
60-
<td>2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0</td>
60+
<td>2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0, 2.14.0</td>
6161
</tr>
6262
<tr>
6363
<td>0.13.0</td>
64-
<td>2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0</td>
64+
<td>2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0, 2.14.0</td>
65+
</tr>
66+
<tr>
67+
<td>0.14.0</td>
68+
<td>2.9.0, 2.10.0, 2.11.0, 2.12.0, 2.13.0, 2.14.0</td>
6569
</tr>
6670
</table>
6771

@@ -71,6 +75,7 @@ To install the latest version of litmusctl follow the below steps:
7175

7276
<table>
7377
<th>Platforms</th>
78+
<th>0.14.0</th>
7479
<th>0.13.0</th>
7580
<th>0.12.0</th>
7681
<th>v0.11.0</th>
@@ -82,6 +87,7 @@ To install the latest version of litmusctl follow the below steps:
8287
<th>master(Unreleased)</th>
8388
<tr>
8489
<td>litmusctl-darwin-amd64 (MacOS)</td>
90+
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-0.14.0.tar.gz">Click here</a></td>
8591
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-0.13.0.tar.gz">Click here</a></td>
8692
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-0.12.0.tar.gz">Click here</a></td>
8793
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-darwin-amd64-v0.11.0.tar.gz">Click here</a></td>
@@ -94,6 +100,7 @@ To install the latest version of litmusctl follow the below steps:
94100
</tr>
95101
<tr>
96102
<td>litmusctl-linux-386</td>
103+
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-0.14.0.tar.gz">Click here</a></td>
97104
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-0.13.0.tar.gz">Click here</a></td>
98105
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-0.12.0.tar.gz">Click here</a></td>
99106
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-386-v0.11.0.tar.gz">Click here</a></td>
@@ -106,6 +113,7 @@ To install the latest version of litmusctl follow the below steps:
106113
</tr>
107114
<tr>
108115
<td>litmusctl-linux-amd64</td>
116+
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-0.14.0.tar.gz">Click here</a></td>
109117
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-0.13.0.tar.gz">Click here</a></td>
110118
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-0.12.0.tar.gz">Click here</a></td>
111119
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-amd64-v0.11.0.tar.gz">Click here</a></td>
@@ -118,6 +126,7 @@ To install the latest version of litmusctl follow the below steps:
118126
</tr>
119127
<tr>
120128
<td>litmusctl-linux-arm</td>
129+
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-0.14.0.tar.gz">Click here</a></td>
121130
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-0.13.0.tar.gz">Click here</a></td>
122131
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-0.12.0.tar.gz">Click here</a></td>
123132
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm-v0.11.0.tar.gz">Click here</a></td>
@@ -130,6 +139,7 @@ To install the latest version of litmusctl follow the below steps:
130139
</tr>
131140
<tr>
132141
<td>litmusctl-linux-arm64</td>
142+
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-0.14.0.tar.gz">Click here</a></td>
133143
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-0.13.0.tar.gz">Click here</a></td>
134144
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-0.12.0.tar.gz">Click here</a></td>
135145
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-linux-arm64-v0.11.0.tar.gz">Click here</a></td>
@@ -142,6 +152,7 @@ To install the latest version of litmusctl follow the below steps:
142152
</tr>
143153
<tr>
144154
<td>litmusctl-windows-386</td>
155+
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-0.14.0.tar.gz">Click here</a></td>
145156
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-0.13.0.tar.gz">Click here</a></td>
146157
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-0.12.0.tar.gz">Click here</a></td>
147158
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-386-v0.11.0.tar.gz">Click here</a></td>
@@ -154,6 +165,7 @@ To install the latest version of litmusctl follow the below steps:
154165
</tr>
155166
<tr>
156167
<td>litmusctl-windows-amd64</td>
168+
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-0.14.0.tar.gz">Click here</a></td>
157169
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-0.13.0.tar.gz">Click here</a></td>
158170
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-0.12.0.tar.gz">Click here</a></td>
159171
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-amd64-v0.11.0.tar.gz">Click here</a></td>
@@ -166,6 +178,7 @@ To install the latest version of litmusctl follow the below steps:
166178
</tr>
167179
<tr>
168180
<td>litmusctl-windows-arm</td>
181+
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-0.14.0.tar.gz">Click here</a></td>
169182
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-0.13.0.tar.gz">Click here</a></td>
170183
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-0.12.0.tar.gz">Click here</a></td>
171184
<td><a href="https://litmusctl-production-bucket.s3.amazonaws.com/litmusctl-windows-arm-v0.11.0.tar.gz">Click here</a></td>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
id: architecture-summary
3+
title: Architecture Summary
4+
sidebar_label: Architecture Summary
5+
---
6+
7+
---
8+
9+
<img src={require("../assets/architecture-summary.png").default} alt="Architecture Overview" />
10+
11+
The Litmus architecture can be segregated into two parts:
12+
13+
1. **Control Plane:** Contains the components required for the functioning of Chaos Center, the website-based portal for Litmus.
14+
15+
2. **Execution Plane:** Contains the components required for the injection of chaos in the target resources.
16+
17+
Chaos Center can be used for creating, scheduling, and monitoring Chaos Scenarios, a set of chaos experiments defined in a definitive sequence to achieve desired chaos impact on the target resources upon execution. Users can log in to the Chaos Center using valid login credentials and leverage the interactive web UI to define their chaos scenario to target multiple aspects of their infrastructure. Once the user creates a Chaos Scenario using the Chaos Center, it is passed on to the Execution Plane. The Execution Plane can be present either in the host cluster containing the Control Plane if the self chaos delegate is being used, or in the target cluster if an external chaos delegate is being used. The Execution Plane interprets the Chaos Scenario as a list of steps required for injecting chaos into the target resources. It ensures efficient orchestration of chaos in cloud-native environments using various Kubernetes CRs. Once the Chaos Scenario is executed, Execution Plane sends the chaos result to the Control Plane for their post-processing using either the built-in monitoring dashboard of Litmus or using external observability tools such as Prometheus DB and Grafana dashboard. Litmus also achieves automated Chaos Scenario runs to execute chaos as part of the CI/CD pipeline based on a set of defined conditions using GitOps.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
id: chaos-control-plane
3+
title: Chaos Control Plane
4+
sidebar_label: Chaos Control Plane
5+
---
6+
7+
---
8+
9+
<img src={require("../assets/chaos-control-plane.png").default} alt="Chaos Control Plane" />
10+
11+
Chaos Control Plane consists of micro-services responsible for the functioning of the Chaos Center, the website-based portal that can be used for interacting with Litmus, apart from the CLI. Chaos Plane facilitates the creation and scheduling of chaos scenarios, system observability during the event of chaos, and post-processing and analysis of experiment results.
12+
13+
## Chaos Control Plane Components
14+
15+
- **Authentication Server:** A Golang micro-service that is responsible for authorizing, authenticating the requests received from Chaos Center and managing users along with their projects. It primarily serves the cause of user creation, user login, resetting the password, updating user information, creating project, managing project related operations.
16+
17+
- **Backend Server:** A GraphQL based Golang micro-service that serves the requests received from Chaos Center, by either querying the database for the relevant information or by fetching information from the Execution Plane.
18+
19+
- **Database:** A NoSQL MongoDB database micro-service that is accountable for storing users' information, past chaos scenarios, saved chaos scenario templates, user projects, ChaosHubs, and GitOps details, among the other information.
20+
21+
- **Chaos Center:** Refers to the interfaces used by Litmus for creation and scheduling of chaos scenarios, system observability during chaos injection, and post chaos result analysis. It includes:
22+
23+
- **Web UI:** A React.js based frontend application micro-service with built-in system observability capabilities and an analytics dashboard. It also facilitates teams of users to collaborate over chaos scenarios using role-based user accounts.
24+
25+
- **Litmusctl:** A command-line tool that allows management of Litmus Chaos Delegate Infrastructure components. It can be used to create chaos delegates, project, and manage multiple Litmus accounts.
26+
27+
- **Litmus API:** Refers to two different Litmus APIs, namely Litmus Authentication API and Litmus Portal API:
28+
29+
- **Litmus Authentication API:** Used to authenticate the identity of a user and to perform several user and project specific tasks like create new users, update profile, update password, create project, invite users to project, get project details etc. It uses the Authentication Server to perform these tasks.
30+
31+
- **Litmus Portal API:** Provides command-line and UI experience for managing and monitoring the events around chaos scenarios. It uses the Backend Server to perform its functions.
32+
33+
## Standard Chaos Control Plane Flow
34+
35+
1. The User logs in to the ChaosCenter using a valid login credential. A default project is created for the user on initial login. Every user is a part of a project and has a role assigned to them. To schedule a chaos scenario, the user needs to have an Editor or Owner role assigned in the project.
36+
2. The user uploads a Chaos Scenario manifest using the ChaosCenter, which is received by the Backend Server.
37+
3. Backend Server stores the manifest in the Database and also sends it to the Chaos Delegate.
38+
4. Chaos Delegate uses the Chaos Scenario manifest to inject chaos into the target resources. The steps of the Chaos Scenario execution can be visualized using the ChaosCenter.
39+
5. Chaos Delegate returns the results of the chaos experiments that were a part of the chaos scenario back to the Backend Server, along with the experiment logs.
40+
6. Backend Server then sends the chaos experiment results and logs to the ChaosCenter. It also stores the results into the Database for generating post-chaos scenario statistics and information.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
id: chaos-execution-plane
3+
title: Chaos Execution Plane
4+
sidebar_label: Chaos Execution Plane
5+
---
6+
7+
---
8+
9+
<img src={require("../assets/chaos-execution-plane.png").default} alt="Chaos Execution Plane" />
10+
11+
Chaos Execution Plane contains the components responsible for orchestrating the chaos injection in the target resources. They get installed in either an external target cluster if an external chaos delegate is being used or in the host cluster containing the control plane if a self chaos delegate is being used. It can be further segregated into Litmus Chaos Delegate Infrastructure components and Litmus Backend Execution Infrastructure components.
12+
13+
## Litmus Execution Plane Components
14+
15+
Litmus Chaos Delegate Infrastructure components help facilitate the chaos injection, manage chaos observability, and enable chaos automation for target resources. These components include:
16+
17+
1. **Workflow Controller:** The Argo Workflow Controller responsible for the creation of Chaos Scenarios using the Chaos Scenario CR.
18+
19+
2. **Subscriber:** Serves as the link between the Chaos Execution Plane and the Control Plane. It has a few distinct responsibilities such as performing health check of all the components in Chaos Execution Plane, creation of a Chaos Scenario CR from a Chaos Scenario template, watching for Chaos Scenario events during its execution, and sending the chaos scenario result to the Control Plane.
20+
21+
3. **Event Tracker:** An optional component that is capable of triggering automated chaos scenario runs based on a set of defined conditions for any given resources in the cluster. It is a controller that manages EventTrackerPolicy CR, which is basically the set of defined conditions that is validated by Event Tracker. If the current state of the tracked resources match with the state defined in the EventTrackerPolicy CR, the chaos scenario run run gets triggered. This feature can only be used if GitOps is enabled.
22+
23+
4. **Chaos Exporter:** An optional component that facilitates external observability in Litmus by exporting the chaos metrics generated during the chaos injection as time-series data to the Prometheus DB for its processing and analysis.
24+
25+
Litmus Backend Execution Infrastructure components orchestrate the execution of Chaos Scenario in target resources. These components include:
26+
27+
1. **Chaos Scenario CR:** Refers to the Argo Workflow CR which describes the steps that are executed as a part of the chaos scenario. It is used to define failures during a certain workload condition (such as, say, percentage load), multiple (parallel) failures of dependent and independent services etc.
28+
29+
2. **ChaosExperiment CR:** Used for defining the low-level execution information for any Litmus chaos experiment as well as to store the various experiment tunables.
30+
31+
3. **ChaosEngine CR:** Used to hold information about how the chaos experiments are executed. It connects an application instance with one or more chaos experiments while allowing the users to specify run-level details.
32+
33+
4. **Chaos Operator:** A Kubernetes custom-controller that manages the lifecycle of certain resources or applications intending to validate their "desired state". It helps reconcile the state of the ChaosEngine by performing specific actions upon CRUD of the ChaosEngine. It also defines a secondary resource (the ChaosEngine Runner pod), which is created & managed by it to implement the reconcile functions.
34+
35+
<div style={{textAlign: 'center'}}>
36+
<img src={require("../assets/chaos-execution-plane-chaos-operator.png").default} alt="Chaos Operator" />
37+
</div>
38+
39+
5. **ChaosResult CR:** Holds the results of a chaos experiment, such as ChaosEngine reference, Experiment State, Verdict of the experiment (on completion), salient application/result attributes. It also acts as a source for metrics collection for observability.
40+
41+
6. **Chaos Runner:** Acts as a bridge between the Chaos Operator and Chaos Experiments. It is a lifecycle manager for the chaos experiments that creates Experiment Jobs for the execution of experiment business logic and monitors the experiment pods (jobs) until completion.
42+
43+
<div style={{textAlign: 'center'}}>
44+
<img src={require("../assets/chaos-execution-plane-chaos-runner.png").default} alt="Chaos Runner" />
45+
</div>
46+
47+
7. **Experiment Jobs:** Refers to the pods that execute the experiment logic. One experiment pod is created per chaos experiment in the chaos scenario.
48+
49+
## Standard Chaos Execution Plane Flow
50+
51+
1. Subscriber receives the Chaos Scenario manifest from the Control Plane and applies the manifest to create a Chaos Scenario CR.
52+
2. Chaos Scenario CRs are tracked by the Argo Workflow Controller. When the Workflow Controller finds a new Chaos Scenario CR, it creates the ChaosExperiment CRs and the ChaosEngine CRs for the chaos experiments that are a part of the chaos scenario.
53+
3. ChaosEngine CRs are tracked by the Chaos Operator. Once a ChaosEngine CR is ready, the Chaos Operator updates the ChaosEngine state to reflect that the particular ChaosEngine is now being executed.
54+
4. For each ChaosEngine resource, a Chaos Runner is created by the Chaos Operator.
55+
5. Chaos Runner firstly reads the chaos parameters from the ChaosExperiment CR and overrides them with values from the ChaosEngine CR. It then constructs the Experiment Jobs and monitors them until their completion.
56+
6. Experiment Jobs execute the experiment business logic and undertake chaos injection on target resources. Once done, the ChaosResult is updated with the experiment verdict.
57+
7. Chaos Runner then fetches the updated ChaosResult and updates the ChaosEngine status as well as the verdict.
58+
8. Once the ChaosEngine is updated, Subscriber fetches the ChaosEngine details and the ChaosResult and forwards them to Chaos Control Plane.
59+
60+
It is worth noticing that:
61+
62+
- If configured, Chaos Exporter fetches data from the ChaosResult CR and converts it in a time-series format to be consumed by the Prometheus DB.
63+
64+
- An Event Tracker Policy can also be set up as part of the Backend GitOps, where the Backend GitOps Controller tracks a set of specified resources in the target cluster for any change. If any of the tracked resources undergo any change and their resulting state matches the state defined in the Event Tracker Policy, then a pre-defined Chaos Scenario is executed.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
id: chaos-experiment-flow
3+
title: Chaos Experiment Flow
4+
sidebar_label: Chaos Experiment Flow
5+
---
6+
7+
---
8+
9+
<img src={require("../assets/experiment-flow.png").default} alt="Chaos Experiment Flow" />
10+
11+
The experiment execution is triggered upon the creation of a ChaosEngine resource. The ChaosEngine resource interacts with Chaos Runner, which is created by the Chaos Operator. The Chaos Runner creates Experiment Jobs that execute the experiment business logic. Typically, these ChaosEngines are embedded within the 'steps' of a Litmus Chaos Scenario. However, one may also create and apply the Chaos Engines manually, and then the chaos-operator reconciles this resource and triggers the experiment execution. Chaos experiments are classified as:
12+
13+
- Kubernetes Experiments
14+
- Pod-Level Chaos
15+
- Node-Level Chaos
16+
- Application Chaos
17+
- Cloud Infrastructure
18+
19+
## Chaos Experiment Flow Steps
20+
21+
1. Chaos experiment execution gets triggered by the Experiment Job.
22+
2. Experiment tunables and low-level execution details are fetched.
23+
3. ChaosResult gets initialized and its verdict is updated as "Awaited" to indicate that the experiment is currently running.
24+
4. Steady-state condition for the respective experiment is validated. If the condition is found to be invalid, the experiment execution is stopped and the ChaosResult is updated as "Fail".
25+
5. Once the steady-state condition is validated, experiment resources are created to facilitate the chaos injection.
26+
6. Chaos injection is performed on the target resources for the specified chaos duration.
27+
7. Chaos injection gets reverted.
28+
8. Post chaos status-check is performed to ensure that the steady-state is still maintained.
29+
9. If the check is invalid, the ChaosEngine and ChaosResult verdicts are updated as "Fail", otherwise they are updated as "Pass".
30+
10. Experiment execution ends.

0 commit comments

Comments
 (0)