EN
enricopesce/locuster
Deploy load test infrastructure based on Locust.io with AWS CDK
Locuster
Example how with AWS CDK you can deploy a
load test infrastructure using Locust.io
The infrastructure code is written in Python, it executes a master\slave Locust infrastructure
I totally love LOCUST and CDK!
Installation and requirements:
Install the CDK framework
npm install -g aws-cdkInstall the Python dependencies
pip install -r requirements.txtAuthenticate in your AWS account:
Follow this guide: Configuring the AWS CLI
Bootstrap AWS CDK (if needed)
cdk bootstrap --region eu-west-1Usage
Deploy locust:
export AWS_PROFILE="profilename"
export AWS_DEFAULT_REGION="eu-west-1"
cdk deploy locuster
.....
✅ locuster
Outputs:
locuster.LocustWebConsole = http://locus-nbala-15IY958M7LUVF-ab8bf6ee96743c80.elb.eu-west-1.amazonaws.com:8089After the deployment you need to wait for a 1-minute maximum, you can start the load using the output address
Destroy locust:
cdk destroy locusterLocal test:
You can try locally the platform:
cd docker
docker-compose up --scale worker=2 --buildCustomize the loucustfile test code:
You can customize the code inside the docker/code directory
Have fun!
On this page
Languages
Python92.7%Batchfile5.4%Dockerfile1.9%
Contributors
Created April 1, 2020
Updated March 22, 2024