Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Building JMeter - A Distributed Load Testing Workflow using Docker Compose on Swarm Mode Cluster
#Setting Up Master-Slave JMeter Distributed Load Testing Tool
#
#Pre-requisite:
#
#1- Docker
#2- Docker Compose v3.1 and later
#3- Docker Swarm Mode Running 1 Master(atleast) and N Slave Nodes(worker Nodes)
#cat docker-compose.yml
version: "3.1"
services:
master:
image: vinsdocker/jmmaster
#container_name: master
tty: true
ports:
- "60000"
networks:
- collabnet
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
placement:
constraints: [node.role == manager]
slave:
image: vinsdocker/jmserver
tty: true
networks:
- collabnet
ports:
- "50000:50000"
- "1099:1099"
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
placement:
constraints: [node.role == worker]
networks:
collabnet:
driver: overlay
It's time to test it:
{code}==>docker stack deploy –-compose-file=./docker-compose.yml collab1
Verifying on Master Node:
{code}==>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS
PORTS NAMES
bd056ae3f980 vinsdocker/jmmaster@sha256:3c4bb2cc4fde573117983494a9c95ae0c0f5619ed41222673dcba7d44958d6df "/bin/bash" 15 minutes ago Up 15 minu
tes 60000/tcp myjmeter_master.1.pvb09iyiy07794pxymz0yxgld
{code}==>
Verifying on Worker Node:
@worker-2:~$ docker ps
CONTAINER ID IMAGE COMMAND
CREATED STATUS PORTS NAMES
32660cec08eb vinsdocker/jmserver@sha256:78e5de939a92b94a9f6f6e5ce909c0b46dfa756561efcc9614a1578b71e313e6 "/bin/sh -c '$JME
T..." 27 seconds ago Up 24 seconds 1099/tcp, 50000/tcp myjmeter_slave.3.rqseeycuxy8qcgbuai364czgr
d1ae5716aaaf vinsdocker/jmserver@sha256:78e5de939a92b94a9f6f6e5ce909c0b46dfa756561efcc9614a1578b71e313e6 "/bin/sh -c '$JME
T..." 27 seconds ago Up 23 seconds 1099/tcp, 50000/tcp myjmeter_slave.6.3a87r07racusbnix2a8ob9lm4
0d592328cd4d vinsdocker/jmserver@sha256:78e5de939a92b94a9f6f6e5ce909c0b46dfa756561efcc9614a1578b71e313e6 "/bin/sh -c '$JME
T..." 27 seconds ago Up 24 seconds 1099/tcp, 50000/tcp myjmeter_slave.2.xtvw57hac8jyllq75ceeecvai
eaa2ee8dc79e vinsdocker/jmserver@sha256:78e5de939a92b94a9f6f6e5ce909c0b46dfa756561efcc9614a1578b71e313e6 "/bin/sh -c '$JME
T..." 27 seconds ago Up 23 seconds 1099/tcp, 50000/tcp myjmeter_slave.9.j73p199vxer90t6mxhbcrm7rz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.