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
Welcome to the local development setup guide for **`litmusctl`**. This guide will walk you through the steps required to set up and run **`litmusctl`** on your local machine.
6
+
7
+
## Important Note
8
+
9
+
Before running **`litmusctl`**, make sure you have a Chaos Centre running. Ensure that the Chaos Centre version is compatible with the **`litmusctl`** version you are using.
10
+
11
+
## Prerequisites
12
+
13
+
Before you begin, ensure that you have the following prerequisites installed on your machine:
14
+
15
+
-[Go programming language](https://golang.org/doc/install) (version or later)
- Kubeconfig - `litmusctl` needs the kubeconfig of the k8s cluster where we need to connect litmus Chaos Delegates. The CLI currently uses the default path of kubeconfig i.e. `~/.kube/config`.
Before running **`litmusctl`**, update the following configuration paths in the **`pkg/utils/constants.go`**
36
+
37
+
From this
38
+
39
+
```go
40
+
// Graphql server API path
41
+
GQLAPIPath = "/api/query"
42
+
43
+
// Auth server API path
44
+
AuthAPIPath = "/auth"
45
+
```
46
+
47
+
To this
48
+
49
+
```go
50
+
// Graphql server API path
51
+
GQLAPIPath = "/query"
52
+
53
+
// Auth server API path
54
+
AuthAPIPath = ""
55
+
```
56
+
57
+
## **Running `litmusctl`**
58
+
59
+
Execute the following command to run **`litmusctl`** locally:
60
+
61
+
```bash
62
+
go run main.go <command><subcommand><subcommand> [options and parameters]
63
+
```
64
+
65
+
## **Testing `litmusctl`**
66
+
67
+
To run tests, use the following command:
68
+
69
+
```bash
70
+
go test ./...
71
+
```
72
+
73
+
## **Contributing Guidelines**
74
+
75
+
If you wish to contribute to **`litmusctl`**, please follow our [contributing guidelines](https://github.com/litmuschaos/litmus/blob/master/CONTRIBUTING.md). Your contributions are valuable, and adhering to these guidelines ensures a smooth and collaborative development process.
76
+
77
+
## **Troubleshooting**
78
+
79
+
If you encounter any issues during setup, refer to our [troubleshooting guide](https://docs.litmuschaos.io/docs/troubleshooting) or reach out to our community for assistance. We're here to help you overcome any obstacles and ensure a successful setup.
80
+
81
+
## **Additional Information**
82
+
83
+
For more details on using **`litmusctl`**, refer to our [official documentation](https://docs.litmuschaos.io/). This documentation provides comprehensive information to help you make the most out of **`litmusctl`**.
84
+
85
+
Thank you for setting up **`litmusctl`** locally! Feel free to explore and contribute to the project. Your involvement is crucial to the success of the **`litmusctl`** community.
The Litmuschaos command-line tool, litmusctl, allows you to manage litmuschaos's agent plane. You can use litmusctl to connect Chaos Delegates, create project, schedule Chaos Scenarios, disconnect Chaos Delegates and manage multiple litmuschaos accounts.
8
9
9
10
## Usage
11
+
10
12
For more information including a complete list of litmusctl operations, see the litmusctl reference documentation.
13
+
11
14
* For 0.23.0 or latest: <ahref="https://github.com/litmuschaos/litmusctl/blob/master/Usage_0.23.0.md">Click here</a>
12
15
* For v0.12.0 to v0.22.0: <ahref="https://github.com/litmuschaos/litmusctl/blob/master/Usage_interactive.md">Click here</a>
13
16
* For v0.2.0 or earlier && compatible with Litmus-2.0.0-Beta8 or earlier: <ahref="https://github.com/litmuschaos/litmusctl/blob/master/Usage_v0.2.0.md">Click here</a>
@@ -17,8 +20,7 @@ For more information including a complete list of litmusctl operations, see the
17
20
The litmusctl CLI requires the following things:
18
21
19
22
- kubeconfig - litmusctl needs the kubeconfig of the k8s cluster where we need to connect litmus Chaos Delegates. The CLI currently uses the default path of kubeconfig i.e. `~/.kube/config`.
20
-
- kubectl- litmusctl is using kubectl under the hood to apply the manifest. To install kubectl, follow: [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
21
-
23
+
- kubectl- litmusctl is using kubectl under the hood to apply the manifest. To install kubectl, follow: [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)
22
24
23
25
## Compatibility matrix
24
26
@@ -185,44 +187,48 @@ To install the latest version of litmusctl follow the below steps:
185
187
186
188
### Linux/MacOS
187
189
188
-
* Extract the binary
190
+
- Extract the binary
189
191
190
192
```shell
191
193
tar -zxvf litmusctl-<OS>-<ARCH>-<VERSION>.tar.gz
192
194
```
193
195
194
-
* Provide necessary permissions
196
+
- Provide necessary permissions
195
197
196
198
```shell
197
199
chmod +x litmusctl
198
200
```
199
201
200
-
* Move the litmusctl binary to /usr/local/bin/litmusctl. Note: Make sure to use root user or use sudo as a prefix
202
+
- Move the litmusctl binary to /usr/local/bin/litmusctl. Note: Make sure to use root user or use sudo as a prefix
201
203
202
204
```shell
203
205
mv litmusctl /usr/local/bin/litmusctl
204
206
```
205
207
206
-
* You can run the litmusctl command in Linux/macOS:
208
+
- You can run the litmusctl command in Linux/macOS:
207
209
208
210
```shell
209
211
litmusctl <command><subcommand><subcommand> [options and parameters]
210
212
```
211
213
212
214
### Windows
213
215
214
-
* Extract the binary from the zip using WinZip or any other extraction tool.
216
+
- Extract the binary from the zip using WinZip or any other extraction tool.
215
217
216
-
* You can run the litmusctl command in windows:
218
+
- You can run the litmusctl command in windows:
217
219
218
220
```shell
219
221
litmusctl.exe <command><subcommand><subcommand> [options and parameters]
220
222
```
221
223
222
-
* To check the version of the litmusctl:
224
+
- To check the version of the litmusctl:
223
225
224
226
```shell
225
227
litmusctl version
226
228
```
227
229
228
-
----
230
+
## Development Guide
231
+
232
+
You can find the local setup guide for **`litmusctl`**[here](DEVELOPMENT.md).
0 commit comments