Skip to content

Commit bed5b0c

Browse files
Added the local development setup guide (#168)
* added the local dev setup guide Signed-off-by: deep-poharkar <[email protected]> * fixed the link Signed-off-by: deep-poharkar <[email protected]> * removed unwanted settings for litmusconfig Signed-off-by: deep-poharkar <[email protected]> --------- Signed-off-by: deep-poharkar <[email protected]>
1 parent 3bac6d7 commit bed5b0c

File tree

2 files changed

+103
-10
lines changed

2 files changed

+103
-10
lines changed

DEVELOPMENT.md

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Litmusctl Local Development Setup Guide
2+
3+
## Introduction
4+
5+
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)
16+
- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
17+
- 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`.
18+
19+
## Clone the Repository
20+
21+
```bash
22+
git clone https://github.com/litmuschaos/litmusctl.git
23+
24+
cd litmusctl
25+
```
26+
27+
## **Install Dependencies**
28+
29+
```bash
30+
go mod download
31+
```
32+
33+
## **Configuration**
34+
35+
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.
86+
87+
Let the chaos begin! 🚀🔥

README.md

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Litmusctl
2+
23
[![BCH compliance](https://bettercodehub.com/edge/badge/litmuschaos/litmusctl?branch=master)](https://bettercodehub.com/)
34
![GitHub Workflow](https://github.com/litmuschaos/litmusctl/actions/workflows/push.yml/badge.svg?branch=master)
45
[![GitHub stars](https://img.shields.io/github/stars/litmuschaos/litmusctl?style=social)](https://github.com/litmuschaos/litmusctl/stargazers)
@@ -7,7 +8,9 @@
78
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.
89

910
## Usage
11+
1012
For more information including a complete list of litmusctl operations, see the litmusctl reference documentation.
13+
1114
* For 0.23.0 or latest: <a href="https://github.com/litmuschaos/litmusctl/blob/master/Usage_0.23.0.md">Click here</a>
1215
* For v0.12.0 to v0.22.0: <a href="https://github.com/litmuschaos/litmusctl/blob/master/Usage_interactive.md">Click here</a>
1316
* For v0.2.0 or earlier && compatible with Litmus-2.0.0-Beta8 or earlier: <a href="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
1720
The litmusctl CLI requires the following things:
1821

1922
- 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)
2224

2325
## Compatibility matrix
2426

@@ -185,44 +187,48 @@ To install the latest version of litmusctl follow the below steps:
185187

186188
### Linux/MacOS
187189

188-
* Extract the binary
190+
- Extract the binary
189191

190192
```shell
191193
tar -zxvf litmusctl-<OS>-<ARCH>-<VERSION>.tar.gz
192194
```
193195

194-
* Provide necessary permissions
196+
- Provide necessary permissions
195197

196198
```shell
197199
chmod +x litmusctl
198200
```
199201

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
201203

202204
```shell
203205
mv litmusctl /usr/local/bin/litmusctl
204206
```
205207

206-
* You can run the litmusctl command in Linux/macOS:
208+
- You can run the litmusctl command in Linux/macOS:
207209

208210
```shell
209211
litmusctl <command> <subcommand> <subcommand> [options and parameters]
210212
```
211213

212214
### Windows
213215

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.
215217

216-
* You can run the litmusctl command in windows:
218+
- You can run the litmusctl command in windows:
217219

218220
```shell
219221
litmusctl.exe <command> <subcommand> <subcommand> [options and parameters]
220222
```
221223

222-
* To check the version of the litmusctl:
224+
- To check the version of the litmusctl:
223225

224226
```shell
225227
litmusctl version
226228
```
227229

228-
----
230+
## Development Guide
231+
232+
You can find the local setup guide for **`litmusctl`** [here](DEVELOPMENT.md).
233+
234+
---

0 commit comments

Comments
 (0)