Coder Social home page Coder Social logo

locust-demo's Introduction

locust-demo

An opinionated demonstration using locust

1 -- clone repo

git clone https://github.com/doitintl/locust-demo

2 -- setup docker to use google container registry

  • examples will need to be swapped to your project name

gcloud auth configure-docker
docker build . -t us.gcr.io/andy-playground-264516/locust-image:latest
docker push us.gcr.io/andy-playground-264516/locust-image:latest

3 -- setup k8s

  • examples will need to be swapped to your project specifics

gcloud config set account [email protected]
gcloud config set compute/region us-central1
gcloud config set compute/zone us-central1-c
gcloud config set project andy-playground-264516

gcloud container clusters create locust-cluster \
         --zone us-central1-c \
         --scopes "https://www.googleapis.com/auth/cloud-platform" \
         --num-nodes "3" \
         --enable-autoscaling --min-nodes "3" \
         --max-nodes "10" \
         --addons HorizontalPodAutoscaling,HttpLoadBalancing  

gcloud config set container/cluster locust-cluster

4 -- setup kubectl to use against new cluster

gcloud container clusters get-credentials locust-cluster \
 --zone us-central1-c \
 --project andy-playground-264516

5 -- set up k8s resources from this projects yaml (NOTE: this yaml will need to be modified also for the gcr container image)

kubectl apply -f ./kubernetes/deployment-master.yaml  
kubectl apply -f ./kubernetes/deployment-worker.yaml  
kubectl apply -f ./kubernetes/locust-master-service.yaml  
  • once the master container is running (check via 'kubectl get po') run the following command to port forward to the pod:
kubectl port-forward locust-master-84d545bcdf-6qwpv 8089  

note: replace locust-master-84d545bcdf-6qwpv with you pod name

6 -- run load

locust-demo's People

Contributors

powellandy 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.