Skip to content

Commit ee28a37

Browse files
shivasharma14Shiva
andauthored
Updated connect chaos infrastructure doc (#396)
Signed-off-by: Shiva <[email protected]> Co-authored-by: Shiva <[email protected]>
1 parent 5722295 commit ee28a37

File tree

1 file changed

+146
-1
lines changed

1 file changed

+146
-1
lines changed

β€Žwebsite/docs/litmusctl/connect-chaos-infrastructure.mdβ€Ž

Lines changed: 146 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,149 @@ sidebar_label: Connect Chaos Infrastructure
88

99
This guide walks you through connecting a Chaos Infrastructure to your ChaosCenter using litmusctl. A Chaos Infrastructure is required to run chaos experiments in your Kubernetes cluster.
1010

11-
Follow this [guide](https://github.com/litmuschaos/litmusctl/blob/master/Usage_0.23.0.md#steps-to-connect-a-chaos-infrastucture) to connect a Chaos Infrastructure.
11+
Follow these steps to connect a Chaos Infrastructure using `litmusctl`.
12+
13+
## Steps to connect a Chaos Infrastructure
14+
15+
1. Set up an account with litmusctl
16+
17+
Run the following command and follow the prompts to add your ChaosCenter account to `litmusctl`:
18+
19+
```shell
20+
litmusctl config set-account
21+
```
22+
23+
You will be asked to provide your ChaosCenter details:
24+
25+
- ChaosCenter URL: The URL used to access your ChaosCenter (for example, `https://preview.litmuschaos.io/`)
26+
- Username: Your ChaosCenter username
27+
- Password: Your ChaosCenter password
28+
29+
Example interaction:
30+
31+
```
32+
Host endpoint where litmus is installed: https://preview.litmuschaos.io/
33+
Username [Default: admin]: admin
34+
35+
Password:
36+
account.username/admin configured
37+
```
38+
39+
2. Connect a Chaos Infrastructure (cluster or namespace mode)
40+
41+
Run the connect command:
42+
43+
```shell
44+
litmusctl connect chaos-infra
45+
```
46+
47+
The CLI will list the existing projects. Select the project you want to connect the infrastructure to by entering the project number:
48+
49+
```
50+
Project list:
51+
1. Project-Admin
52+
53+
Select a project [Range: 1-1]: 1
54+
```
55+
56+
Next, choose the installation mode:
57+
58+
- Cluster mode: The Chaos Infrastructure can run chaos in any namespace. This mode installs cluster roles and cluster role bindings.
59+
60+
- Namespace mode: The Chaos Infrastructure runs only in its namespace and installs roles and role bindings for that namespace.
61+
62+
Note: You must create the namespace beforehand when using namespace mode.
63+
64+
Example selection and prerequisites check:
65+
66+
```
67+
Installation Modes:
68+
1. Cluster
69+
2. Namespace
70+
71+
Select Mode [Default: cluster] [Range: 1-2]: 1
72+
73+
πŸƒ Running prerequisites check....
74+
πŸ”‘ clusterrole βœ…
75+
πŸ”‘ clusterrolebinding βœ…
76+
🌟 Sufficient permissions. Installing the Chaos Infrastructure...
77+
```
78+
79+
3. Provide Chaos Infrastructure details
80+
81+
You will be prompted to enter details for the new Chaos Infrastructure. The fields and their descriptions are listed below.
82+
83+
| Field | Description |
84+
|---|---|
85+
| Chaos Infrastructure Name | A unique name for the Chaos Infrastructure within the project |
86+
| Chaos Infrastructure Description | Description/details about the Chaos Infrastructure |
87+
| Chaos EnvironmentID | The Environment ID this infra will belong to (must already exist) |
88+
| Skip SSL verification | Whether to skip SSL/TLS verification (Y/N) |
89+
| Node Selector | Optional nodeSelector labels to target specific nodes |
90+
| Platform Name | Platform where the infra is hosted (for example: AWS, GKE, Openshift, Rancher, Others) |
91+
| Namespace | Namespace to install the Chaos Infrastructure in (existing or new; litmusctl will create it if it doesn't exist) |
92+
| Service Account | Existing or new service account to use |
93+
94+
Example prompts and selections:
95+
96+
```
97+
Enter the details of the Chaos Infrastructure:
98+
99+
Chaos Infrastructure Name: New-Chaos-infrastructure
100+
101+
Chaos Infrastructure Description: This is a new Chaos Infrastructure
102+
103+
Chaos EnvironmentID: test-infra-environment
104+
105+
Do you want Chaos Infrastructure to skip SSL/TLS check (Y/N) (Default: N): n
106+
107+
Do you want NodeSelector to be added in the Chaos Infrastructure deployments (Y/N) (Default: N): N
108+
109+
Platform List:
110+
1. AWS
111+
2. GKE
112+
3. Openshift
113+
4. Rancher
114+
5. Others
115+
116+
Select a platform [Default: Others] [Range: 1-5]: 5
117+
118+
Enter the namespace (new or existing namespace) [Default: litmus]:
119+
πŸ‘ Continuing with litmus namespace
120+
```
121+
122+
4. Confirm and connect
123+
124+
After entering all fields, `litmusctl` will show a summary of the entered values. Verify the details and confirm to proceed by entering Y. The connection process may take a few seconds.
125+
126+
```
127+
Enter service account [Default: litmus]:
128+
129+
πŸ“Œ Summary
130+
Chaos Infra Name: test4
131+
Chaos EnvironmentID: test
132+
Chaos Infra Description:
133+
Chaos Infra SSL/TLS Skip: false
134+
Platform Name: Others
135+
Namespace: litmuwrq (new)
136+
Service Account: litmus (new)
137+
138+
139+
Installation Mode: cluster
140+
141+
🀷 Do you want to continue with the above details? [Y/N]: Y
142+
πŸ‘ Continuing Chaos Infrastructure connection!!
143+
144+
πŸ’‘ Connecting Chaos Infrastructure to ChaosCenter.
145+
πŸƒ Chaos Infrastructure is running!!
146+
147+
πŸš€ Chaos Infrastructure Connection Successful!! πŸŽ‰
148+
```
149+
150+
5. Verify the new Chaos Infrastructure connection
151+
152+
To verify the connection, open your ChaosCenter and go to the Targets section. You should see the newly connected Chaos Infrastructure listed and in Active state.
153+
154+
---
155+
156+
For additional details or examples, you can also refer to this [guide](https://github.com/litmuschaos/litmusctl/blob/master/Usage_0.23.0.md#steps-to-connect-a-chaos-infrastucture).

0 commit comments

Comments
Β (0)