GithubHelp home page GithubHelp logo

houssoli / jmeter-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajeetraina/jmeter-docker

1.0 2.0 0.0 109 KB

Setting up JMeter Distributed Load Testing Environment under Docker 17.03 Swarm Mode Cluster

Dockerfile 100.00%

jmeter-docker's Introduction

jmeter-docker

Setting up JMeter under Swarm Mode

Pre-requisite:

  1. Installing Docker 17.03 on all the cluster of nodes
  2. Setting up Swarm Mode Cluster( running atleast 1 master and n-number of Slave Nodes)
  3. Installing Docker Compose on the master node

1. Installing Docker 17.03 on all the cluster of nodes:

            $curl -sSL https://get.docker.com/ | sh

2. Setting up Swarm Mode Cluster:

On Master Node:

          $docker swarm init --listen-addr <master-ip>:2377 --advertise-addr <master-ip>:2377

On Slave Node:

          $docker swarm join --token <TOKEN> master-ip  <-- Run this command on all the slave nodes

3. Installing Docker Compose on the master node:

        $curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > /usr/local 
          /bin/docker-compose
          $chmod +x /usr/local/bin/docker-compose

Pulling the Repository

Login to master node and pull the repository:

            $git clone https://github.com/ajeetraina/jmeter-docker
            $cd jmeter-docker

Running Docker Compose

               sudo docker stack deploy -c docker-compose.yml myjm

It will push jmeter-master to the master node and jmeter-server to the slave nodes and make it ready to start load using the external JMX file.

          @master:~$ docker service ls
          ID            NAME         MODE        REPLICAS  IMAGE
          mlffd5djek3t  myjm_slave   replicated  3/3       ajeetraina/jmeter-server:latest
          rv1r3cjvzkg3  myjm_master  replicated  1/1       ajeetraina/jmeter-master:latest

Let us verify these containers on both the nodes:

      @master:~$ docker ps
      CONTAINER ID        IMAGE                                                                                                     
      COMMAND             CREATED             STATUS              PORTS               NAMES
      4954e3ef40f6        ajeetraina/jmeter-master@sha256:1ad38973587725480e76a8914463c674ca95ddfe32e180e4695b8f9150c34981       
      "/bin/bash"         2 hours ago         Up 2 hours          60000/tcp           myjm_master.1.bz2r7rrdrzomqwv56dpxi0m08

Use the same command to verify on the slave nodes.

Pushing the JMX file into the container

   $docker exec -i <container-running-on-master-node> sh -c 'cat > /jmeter/apache-jmeter-2.13/bin/jmeter-docker.jmx' < jmeter-docker.jmx

Starting the Load testing

  $docker exec -it <container-on-master-node> bash
  root@4954e3ef40f6:/#cd /jmeter/apache-jmeter-2.13/bin
  $./jmeter -n -t jmeter-docker.jmx -R<list of containers running on slave nodes seperated by commas)

Handful Commands

Listing the Slave IPs

   $ docker inspect --format '{{ .Name }} => {{ .NetworkSettings.IPAddress }}' $(sudo docker ps -a -q)

Stopping all the containers in a single shot

   $docker stop $(docker ps -a -q)

jmeter-docker's People

Contributors

ajeetraina avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar Lionel Houssou 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.