You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
10
10
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) |
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.
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