Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DevopsArtFactory/klocust
A command-line tool for managing Locust distributed load testing on Kubernetes.
https://github.com/DevopsArtFactory/klocust
Last synced: 3 months ago
JSON representation
A command-line tool for managing Locust distributed load testing on Kubernetes.
- Host: GitHub
- URL: https://github.com/DevopsArtFactory/klocust
- Owner: DevopsArtFactory
- License: apache-2.0
- Created: 2020-10-12T23:25:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-15T02:29:48.000Z (6 months ago)
- Last Synced: 2024-05-15T20:15:47.947Z (6 months ago)
- Language: Go
- Homepage:
- Size: 16.7 MB
- Stars: 64
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-locust - klocust - A command-line tool for managing Locust distributed load testing on Kubernetes. (Tools / Distributed)
README
# klocust
Klocust is a command-line tool for managing [Locust](https://locust.io/) distributed load testing on [Kubernetes](https://kubernetes.io/).## Installation
### Required
- [kubernetes](https://kubernetes.io/) version 1.16 or higher
- kubeconfig for connect to your k8s cluster### Recommend
- [Ingress Controller](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/)
exposes your locust cluster to outside of the k8s cluster. (internal or internet-facing)
- [ExternalDNS](https://github.com/kubernetes-sigs/external-dns)
create(update) and delete domain for your locust cluster automatically.### Install klocust binary
```bash
$ brew tap DevopsArtFactory/devopsart
$ brew update
$ brew install klocust
$ klocust version
0.0.1
```### Build from source
- See here on how to [build klocust CLI from source](./docs/build_from_source.md).### shell autocompletion for bash/zsh
```bash
echo 'source <(kubectl completion bash)' >>~/.bashrc
or
echo 'source <(kubectl completion zsh)' >>~/.zsh
```## Usages
### klocust list
- Display all of Locust clusters
```bash
$ klocust list>>> 1 locust deployments in loadtest namespace. (PREFIX: locust-main-)
+-------+---------------------+-------+------------+-----------+------+
| NAME | DEPLOYMENT | READY | UP-TO-DATE | AVAILABLE | AGE |
+-------+---------------------+-------+------------+-----------+------+
| hello | locust-main-hello | 1/1 | 1 | 1 | 9m5s |
+-------+---------------------+-------+------------+-----------+------+
```### klocust init
- Create config & locust files before applying. (ex name: hello)
```bash
$ klocust init hello
```#### Update config & locust files
- Update config & locust files what you need. (ex name: hello)
```bash
$ vi hello-klocust.yaml
$ vi hello-locustfile.py
```- If you want test locust in your local environments
```bash
$ docker run -p 8089:8089 -v $PWD:/mnt/locust locustio/locust -f /mnt/locust/hello-locustfile.pyor
$ pip3 install locust
$ locust -f hello-locustfile.py
```### klocust apply
- Create or Update locust cluster with config & locust files. (ex name: hello)
```bash
$ klocust apply hello
```- **Connect to your locust cluster and do load testing.**
(ex name: hello)
```bash
$ open https://locust-hello.{your domain}
```### klocust delete
- Delete locust cluster (ex name: hello)
```bash
$ klocust delete hello
```## Contribution Guide
- Check [CONTRIBUTING.md](CONTRIBUTING.md)