Distributed-load-testing-using-locust-on-aks is making an easy to scalable distributed load testing using AKS and locust.
Created by gh-md-toc
az
commandkubectl
command
The bootstrap script launches your AKS cluster.
$ script/bootstrap
# Usage: script/bootstrap \
# [-g MYRESOURCE_GROUP_NAME(Default: DistributedLoadTesting)] \
# [-a AKS_CLUSTER_NAME(Default: LocustOnAKS)] \
# [-l LOCATION_NAME(Default: eastus)] \
# [-c NODE_COUNT(Default: 5)] \
# [-s NODE_VM_SIZE(Default: Standard_DS3_v2)]
$ kubectl port-forward svc/locust-master 8089:8089 -n locust
$ open http://localhost:8089
# Change your target url
$ script/apply-for-myapp
This locust is already set target URL: http://myapp.myapp.svc.cluster.local
$ script/clean
# Usage: script/clean \
# [-g MYRESOURCE_GROUP_NAME(Default: DistributedLoadTesting)]
Docker
kubectl
minikube
- enable
metrics-server
- enable
- deploy to locust and application on minikube
$ kubectl config use-context minikube
$ script/apply
$ script/apply-for-myapp
- port forward to locust-master
$ kubectl port-forward svc/locust-master 8089:8089 -n locust
- open locust
$ open http://localhost:8089
$ cd myapp
$ make
$ cd ../
$ docker-compose up --build
locust
- Copy this repository
- Edit some task files(
locustfile.py
andlib/
) - Run
locust
command, And open http://localhost:8089 . - Edit docker image name at
Makefile
andkubernetes/
manifest files - create docker image and push docker image
make push
- Fork (https://github.com/koudaiii/distributed-load-testing-using-locust-on-aks/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Create a new Pull Request