Giter Site home page Giter Site logo

koudaiii / distributed-load-testing-using-locust-on-aks Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 21 KB

Distributed load testing using locust on AKS

Home Page: https://koudaiii.medium.com/introducing-distributed-load-testing-using-locust-on-aks-4b998f68429d

License: MIT License

Dockerfile 3.87% Makefile 20.18% Python 15.38% Go 3.77% Shell 56.80%
azure aks locust distributed-load-testing kubernetes load-testing

distributed-load-testing-using-locust-on-aks's Introduction

Distributed Load Testing Using locust on AKS

Distributed-load-testing-using-locust-on-aks is making an easy to scalable distributed load testing using AKS and locust.

Table of Contents

Created by gh-md-toc

Getting Started

1. Require

  • az command
  • kubectl command

2. Run Bootstrap script

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)]

3. How to use WebUI

$ kubectl port-forward svc/locust-master 8089:8089 -n locust
$ open http://localhost:8089
# Change your target url

Example: using myapp

$ script/apply-for-myapp

This locust is already set target URL: http://myapp.myapp.svc.cluster.local

Clean-up

$ script/clean

# Usage: script/clean \
#    [-g MYRESOURCE_GROUP_NAME(Default: DistributedLoadTesting)]

How to use in local

Require

  • Docker
  • kubectl
  • minikube
    • enable metrics-server

Use minikube

  1. deploy to locust and application on minikube
$ kubectl config use-context minikube
$ script/apply
$ script/apply-for-myapp
  1. port forward to locust-master
$ kubectl port-forward svc/locust-master 8089:8089 -n locust
  1. open locust
$ open http://localhost:8089

Use docker-compose

$ cd myapp
$ make
$ cd ../
$ docker-compose up --build

Development

Require

  • locust

How to customize

  • Copy this repository
  • Edit some task files(locustfile.py and lib/)
  • Run locust command, And open http://localhost:8089 .
  • Edit docker image name at Makefile and kubernetes/ manifest files
  • create docker image and push docker image
make push

Contribution

  1. Fork (https://github.com/koudaiii/distributed-load-testing-using-locust-on-aks/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Create a new Pull Request

Author

koudaiii

License

MIT License

distributed-load-testing-using-locust-on-aks's People

Contributors

dependabot[bot] avatar koudaiii avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.