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.
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.
Before you begin, ensure that you have the following prerequisites installed on your machine:
- Go programming language (version or later)
- Git
- 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
.
git clone https://github.com/litmuschaos/litmusctl.git
cd litmusctl
go mod download
Before running litmusctl
, update the following configuration paths in the pkg/utils/constants.go
From this
// Graphql server API path
GQLAPIPath = "/api/query"
// Auth server API path
AuthAPIPath = "/auth"
To this
// Graphql server API path
GQLAPIPath = "/query"
// Auth server API path
AuthAPIPath = ""
Execute the following command to run litmusctl
locally:
go run main.go <command> <subcommand> <subcommand> [options and parameters]
To run tests, use the following command:
go test ./...
Setting up pre-commit:
Execute the following command to create a symbolic link named pre-commit
in the .git/hooks
directory that points to the .pre-commit
.
ln -s ../../.pre-commit .git/hooks/pre-commit
If you wish to contribute to litmusctl
, please follow our contributing guidelines. Your contributions are valuable, and adhering to these guidelines ensures a smooth and collaborative development process.
If you encounter any issues during setup, refer to our troubleshooting guide or reach out to our community for assistance. We're here to help you overcome any obstacles and ensure a successful setup.
For more details on using litmusctl
, refer to our official documentation. This documentation provides comprehensive information to help you make the most out of litmusctl
.
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.
Let the chaos begin! 🚀🔥