Skip to content

Commit a6cbe11

Browse files
authored
Adding Version 2.0.0-Beta8 Docs. (#41)
Signed-off-by: Jonsy13 <vedant.shrotria@chaosnative.com>
1 parent 754786c commit a6cbe11

39 files changed

+2479
-2
lines changed

website/docs/litmus-uninstallation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ helm uninstall litmuschaos --namespace litmus
1515
kubectl delete ns litmus
1616
```
1717
18-
----
18+
----
1919

2020
### **Uninstallation of Litmus Control Plane using kubectl**
2121

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
---
2+
id: agent-install
3+
title: Litmus Chaos Agent Install
4+
sidebar_label: Chaos Agent
5+
---
6+
7+
In Litmus the Agents can be classified as two types
8+
9+
- Self Agent
10+
- External Agent
11+
12+
As part of Litmus installation by default, a self cluster would be registered as Agent in the Portal. From Portal you induce chaos into self cluster and observe the results from the Portal.
13+
14+
As you are aware by now, Portal is a Cross Cloud Chaos Control plane. That is you can connect multiple external kubernetes agents to this portal. Once connected you can manage the chaos from the Portal that is you can induce chaos into this agent from the Portal and observe the results from the Portal. Using the command line utility _litmusctl_ you can connect the external agents to the Portal.
15+
16+
# Litmusctl
17+
18+
Litmusctl is a command line interface to manage LitmusPortal services.
19+
20+
## Requirements
21+
22+
The litmusctl CLI requires the following things:
23+
24+
- Kubeconfig - litmusctl needs the kubeconfig of the k8s cluster where we need to connect litmus agents. The CLI currently uses the default path of kubeconfig i.e. `~/.kube/config`.
25+
26+
## Installation
27+
28+
To install the latest version of litmusctl follow the below steps:
29+
30+
- Download the latest litmusctl(master) binary from:
31+
32+
| Platforms | Download Link |
33+
| ------------------------------ | ------------------------------------------------------------------------------------------------------- |
34+
| litmusctl-darwin-386 (MacOS) | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-darwin-386-master.tar.gz) |
35+
| litmusctl-darwin-amd64 (MacOS) | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-darwin-amd64-master.tar.gz) |
36+
| litmusctl-linux-386 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-linux-386-master.tar.gz) |
37+
| litmusctl-linux-amd64 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-linux-amd64-master.tar.gz) |
38+
| litmusctl-linux-arm | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-linux-arm-master.tar.gz) |
39+
| litmusctl-linux-arm64 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-linux-arm64-master.tar.gz) |
40+
| litmusctl-windows-386 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-windows-386-master.tar.gz) |
41+
| litmusctl-windows-amd64 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-windows-amd64-master.tar.gz) |
42+
| litmusctl-windows-arm | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-windows-arm-master.tar.gz) |
43+
44+
<br />
45+
46+
- Download the litmusctl(v0.2.0) binary from:
47+
48+
| Platforms | Download Link |
49+
| ------------------------------ | ------------------------------------------------------------------------------------------------------- |
50+
| litmusctl-darwin-386 (MacOS) | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-darwin-386-v0.2.0.tar.gz) |
51+
| litmusctl-darwin-amd64 (MacOS) | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-darwin-amd64-v0.2.0.tar.gz) |
52+
| litmusctl-linux-386 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-linux-386-v0.2.0.tar.gz) |
53+
| litmusctl-linux-amd64 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-linux-amd64-v0.2.0.tar.gz) |
54+
| litmusctl-linux-arm | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-linux-arm-v0.2.0.tar.gz) |
55+
| litmusctl-linux-arm64 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-linux-arm64-v0.2.0.tar.gz) |
56+
| litmusctl-windows-386 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-windows-386-v0.2.0.tar.gz) |
57+
| litmusctl-windows-amd64 | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-windows-amd64-v0.2.0.tar.gz) |
58+
| litmusctl-windows-arm | [Click here](https://litmusctl-bucket.s3-eu-west-1.amazonaws.com/litmusctl-windows-arm-v0.2.0.tar.gz) |
59+
60+
<br />
61+
62+
- Extract the binary
63+
64+
```shell
65+
$ tar -zxvf litmusctl-<OS>-<ARCH>-<VERSION>.tar.gz
66+
```
67+
68+
- Provide necessary permissions
69+
70+
```shell
71+
$ chmod +x litmusctl
72+
```
73+
74+
- Move the litmusctl binary to /usr/local/bin/litmusctl
75+
76+
```shell
77+
$ sudo mv litmusctl /usr/local/bin/litmusctl
78+
```
79+
80+
## Basic Commands
81+
82+
litmusctl CLI command has the following structure:
83+
84+
```shell
85+
$ litmusctl <command> <subcommand> <subcommand> [options and parameters]
86+
```
87+
88+
To get the version of the litmusctl CLI:
89+
90+
```shell
91+
$ litmusctl version
92+
```
93+
94+
### Connecting an agent
95+
96+
To connect Litmus Chaos agent:
97+
98+
```shell
99+
$ litmusctl agent connect
100+
```
101+
102+
Next, you need to enter LitmusPortal details to login into your LitmusPortal account. Fields to be filled in:
103+
104+
**LitmusPortal UI URL:** Enter the URL used to access the Litmus Portal UI.
105+
Example, http://172.17.0.2:31696/
106+
107+
**Username:** Enter your LitmusPortal username.
108+
**Password:** Enter your LitmusPortal password.
109+
110+
```shell
111+
🔥 Connecting LitmusChaos agent
112+
113+
📶 Please enter LitmusChaos details --
114+
👉 Host URL where litmus is installed: http://172.17.0.2:31696/
115+
🤔 Username [admin]: admin
116+
🙈 Password:
117+
✅ Login Successful!
118+
```
119+
120+
Upon successful login, there will be a list of exiting projects displayed on the terminal. Select the desired project by entering the sequence number indicated against it.
121+
122+
```shell
123+
✨ Projects List:
124+
1. abc
125+
126+
🔎 Select Project: 1
127+
```
128+
129+
Next, select the installation mode. In case the selected mode was a Cluster there will be a prerequisites check to verify ClusterRole and ClusterRoleBinding.
130+
131+
```shell
132+
🔌 Installation Modes:
133+
1. Cluster
134+
2. Namespace
135+
136+
👉 Select Mode [cluster]: 1
137+
138+
🏃 Running prerequisites check....
139+
🔑 clusterrole - ✅
140+
🔑 clusterrolebinding - ✅
141+
142+
🌟 Sufficient permissions. Connecting Agent
143+
```
144+
145+
Next, enter the details of the new agent.
146+
147+
Fields to filled in:
148+
**Agent Name:** Enter the name for the new agent.
149+
150+
**Agent Description:** Fill in details about the agent.
151+
152+
**Platform Name:** Enter the platform name on which this agent is hosted. For example, AWS, GCP, Rancher etc.
153+
154+
**Enter the namespace:** You can either enter an existing namespace or enter a new namespace. In cases where the namespace does not exist, LitmusPortal creates it for you.
155+
156+
**Enter service account:** Enter a name for your service account.
157+
158+
```shell
159+
🔗 Enter the details of the agent ----
160+
🤷 Agent Name: my-agent
161+
📘 Agent Description: This is a new agent.
162+
📦 Platform List
163+
1. AWS
164+
2. GKE
165+
3. Openshift
166+
4. Rancher
167+
5. Others
168+
🔎 Select Platform [Others]: 5
169+
📁 Enter the namespace (new or existing) [litmus]: litmus
170+
🔑 Enter service account [litmus]: litmus
171+
```
172+
173+
Once, all these steps are implemented you will be able to see a summary of all the entered fields.
174+
After verification of these details, you can proceed with the connection of the agent by entering Y. The process of connection might take up to a few seconds.
175+
176+
```shell
177+
📌 Summary --------------------------
178+
179+
Agent Name: my-agent
180+
Agent Description: This is a new agent.
181+
Platform Name: Others
182+
Namespace: litmus
183+
Service Account: litmus
184+
Installation Mode: cluster
185+
186+
-------------------------------------
187+
188+
🤷 Do you want to continue with the above details? [Y/N]: Y
189+
190+
💡 Connecting agent to Litmus Portal.
191+
🏃 Agents running!!
192+
🚀 Agent Connection Successful!! 🎉
193+
👉 Litmus agents can be accessed here: http://172.17.0.2:31696/targets
194+
```
195+
196+
To verify, if the connection process was successful you can view the list of connected agents from the Targets section on your LitmusPortal and ensure that the connected agent is in Active State.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
id: agent-uninstall
3+
title: Litmus Chaos Agent Uninstall
4+
sidebar_label: Chaos Agent
5+
---
6+
7+
As part of uninstalling agent components, we need to perform two steps
8+
1. Disconnect the Agent from Portal
9+
10+
- Login to Chaos Control Plane
11+
12+
- Click on Agent
13+
14+
- Click on the Disconnect icon on the required Chaos Agent which needs to be disconnected
15+
16+
- On the above operation it would remove the subscriber component from Chaos Agent and removes the connectivity between the Chaos Agent and Chaos Control Plane.
17+
18+
**Note** If the Chaos Agent is not reachable it would remove only the entry from the database of the Chaos control plane
19+
20+
2. Remove the Chaos Agent components from the system manually
21+
22+
23+
```bash
24+
kubectl delete chaosengine,chaosexperiments,chaosresults --all -A
25+
kubectl delete ns litmus
26+
```
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
id: architecture
3+
title: Litmus Architecture
4+
sidebar_label: Architecture
5+
---
6+
7+
---
8+
9+
<img src={require('./assets/portal-arch.jpg').default} width="800" />
10+
11+
The above picture gives you a high-level architecture of the Litmus. At highlevel, Litmus components can be classified into two parts
12+
13+
1. Portal
14+
2. Agents
15+
16+
**Portal** is a set of Litmus components which act as Cross Cloud Chaos Control plane (WebUI) which is be used to orchestrate and observe the chaos workflows on Agents.
17+
18+
**Agent** is the set of Litmus components which induces Chaos using the chaos workflows on the K8S cluster component.
19+
20+
Typical user scenario, The user would install litmus. This would in-turn install Portal and Agent on the self cluster. Using the portal user can create/schedule new chaos workflows on the Agents and observe the results from here. User can also connect more clusters to the portal, and use the Portal as single window pane for cross cloud chaos management.
21+
22+
23+
24+
**Portal Components**
25+
26+
Portal has the following components
27+
28+
- Litmus WebUI
29+
30+
Litmus UI provides web user interface, where user can construct and observe the chaos workflow at ease. Also this act as cross cloud chaos control plane that is
31+
32+
- Litmus Server
33+
34+
Litmus Server act as middle ware which is use to handle API request from the user interface, store the config and results details into the DB. This also act as interface to communicate between the requests and scheduling the workflow to Agent.
35+
36+
- Litmus DB
37+
38+
Litmus DB act as config store for chaos workflows and its results.
39+
40+
**Agent components**
41+
42+
Agents has the following Litmus components
43+
44+
- Chaos Operator
45+
46+
Chaos-Operator watches for the ChaosEngine CR and executes the Chaos-Experiments mentioned in the CR. Chaos-Operator is namespace scoped. By default, it runs in `litmus` namespace. Once the experiment is completed, chaos-operator invokes chaos-exporter to export chaos metrics to a Prometheus database.
47+
48+
- CRDs
49+
50+
During installation, the following three CRDs are installed on the Kubernetes cluster.
51+
52+
```
53+
chaosexperiments.litmuschaos.io
54+
chaosengines.litmuschaos.io
55+
chaosresults.litmuschaos.io
56+
```
57+
58+
- Chaos Experiment
59+
60+
Chaos Experiment is a CR and are available as YAML files on [Chaos Hub](https://hub.litmuschaos.io/). For more details visit Chaos Hub [documentation](https://litmusdocs-beta.netlify.app/docs/chaoshub).
61+
62+
- Chaos Engine
63+
64+
ChaosEngine CR links application to experiments. User has to create ChaosEngine YAML by specifying the application label and experiments and create the CR. The CR is watched by Chaos-Operator and chaos-experiments are executed on a given application.
65+
66+
- Chaos Results
67+
68+
ChaosResult resource holds the results of a ChaosExperiment with a namespace scope. It is created or updated at runtime by the experiment itself. It holds important information like the ChaosEngine reference, Experiment State, Verdict of the experiment (on completion), salient application/result attributes. It is also a source for metrics collection. It is updated/patched with the status of the experiment run. It is not removed as part of the default cleanup procedures to allow for extended reference.
69+
70+
- Chaos Probes
71+
72+
Litmus probes are pluggable checks that can be defined within the ChaosEngine for any chaos experiment. The experiment pods execute these checks based on the mode they are defined in & factor their success as necessary conditions in determining the verdict of the experiment (along with the standard “in-built” checks).
73+
74+
- Chaos Exporter
75+
76+
Optionally metrics can be exported to a Prometheus database. Chaos-Exporter implements the Prometheus metrics endpoint.
77+
78+
- Subscriber
79+
80+
Subscriber is the component used in Agent side which interact with Litmus Server component to get the details of Chaos workflow and send the results back.
81+
32.8 KB
Loading
134 KB
Loading
14.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)