Giter Site home page Giter Site logo

demo-locust-loadtest's Introduction

Load Test

loadtest-architecture

This module proposes a simple and uncomplicated way to run your load tests created with Locust on AWS as IaaS.

1. AWS Authentication

export AWS_ACCESS_KEY_ID=AIAXXXXXXXXXXXXXXXXX
export AWS_SECRET_ACCESS_KEY=T9HyXXXXXXXXXXXXXXXXXXXXXXXXXXXX

2. Configure your provisioning

  • Don't forget to provide the correct subnet name in the variable file
  • Define location and file of your locust plan script
  • Define the number of nodes to create

variables.tf

variable "node_size" {
    description = "Size of total nodes"
    default = 2
}

variable "loadtest_dir_source" {
    default = "../plan/"
}

variable "locust_plan_filename" {
    default = "main.py"
}

variable "subnet_name" {
    default = "subnet-prd-a"
    description = "Subnet name"
}

3. Execute Terraform

cd terraform
terraform init
terraform apply --auto-approve

4. Access UI

Click on the link below to access the UI:

Result exemple:

Apply complete! Resources: 14 added, 0 changed, 0 destroyed.

Outputs:

dashboard_url = "http://3.237.255.123"
leader_private_ip = "10.17.5.119"
leader_public_ip = "3.237.255.123"
nodes_private_ip = [
  "10.17.5.167",
  "10.17.5.39",
]
nodes_public_ip = [
  "3.235.45.218",
  "100.24.124.0",
]

5. Cleanup

terraform destroy --auto-approve

demo-locust-loadtest's People

Contributors

luanelioliveira avatar

Watchers

 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.