6 changed files with 14 additions and 70 deletions
@ -1,18 +1,9 @@
|
||||
#!/bin/bash |
||||
|
||||
# Edit as needed -- note that >1000 per host is likely problematic due to Linux kernel limits |
||||
NUM_CONTAINERS=100 |
||||
CONTAINER_IMAGE=zerotier/http-test |
||||
|
||||
# |
||||
# This script is designed to be run on Docker hosts to run NUM_CONTAINERS |
||||
# |
||||
# It can then be run on each Docker host via pssh or similar to run very |
||||
# large scale tests. |
||||
# |
||||
# Kills all running Docker containers on all big-test-hosts |
||||
|
||||
export PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin:/sbin |
||||
|
||||
pssh -h big-test-hosts -i -t 0 -p 256 "docker ps -aq | xargs -r docker rm -f" |
||||
pssh -h big-test-hosts -i -t 0 -p 256 "sudo docker ps -aq | xargs -r sudo docker rm -f" |
||||
|
||||
exit 0 |
||||
|
||||
@ -1,30 +0,0 @@
|
||||
#!/bin/bash |
||||
|
||||
# Edit as needed -- note that >1000 per host is likely problematic due to Linux kernel limits |
||||
NUM_CONTAINERS=100 |
||||
CONTAINER_IMAGE=zerotier/http-test |
||||
|
||||
# |
||||
# This script is designed to be run on Docker hosts to run NUM_CONTAINERS |
||||
# |
||||
# It can then be run on each Docker host via pssh or similar to run very |
||||
# large scale tests. |
||||
# |
||||
|
||||
export PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin:/sbin |
||||
|
||||
# Kill and clean up old test containers if any -- note that this kills all containers on the system! |
||||
#docker ps -q | xargs -n 1 docker kill |
||||
#docker ps -aq | xargs -n 1 docker rm |
||||
|
||||
# Pull latest if needed -- change this to your image name and/or where to pull it from |
||||
#docker pull $CONTAINER_IMAGE |
||||
|
||||
# Run NUM_CONTAINERS |
||||
#for ((n=0;n<$NUM_CONTAINERS;n++)); do |
||||
# docker run --device=/dev/net/tun --privileged -d $CONTAINER_IMAGE |
||||
#done |
||||
|
||||
pssh -h big-test-hosts -i -t 0 -p 256 "docker pull $CONTAINER_IMAGE" |
||||
|
||||
exit 0 |
||||
@ -1,30 +1,12 @@
|
||||
#!/bin/bash |
||||
|
||||
# Edit as needed -- note that >1000 per host is likely problematic due to Linux kernel limits |
||||
NUM_CONTAINERS=50 |
||||
# More than 500 container seems to result in a lot of sporadic failures, probably due to Linux kernel scaling issues with virtual network ports |
||||
# 250 with a 16GB RAM VM like Amazon m4.xlarge seems good |
||||
NUM_CONTAINERS=250 |
||||
CONTAINER_IMAGE=zerotier/http-test |
||||
|
||||
# |
||||
# This script is designed to be run on Docker hosts to run NUM_CONTAINERS |
||||
# |
||||
# It can then be run on each Docker host via pssh or similar to run very |
||||
# large scale tests. |
||||
# |
||||
|
||||
export PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin:/sbin |
||||
|
||||
# Kill and clean up old test containers if any -- note that this kills all containers on the system! |
||||
#docker ps -q | xargs -n 1 docker kill |
||||
#docker ps -aq | xargs -n 1 docker rm |
||||
|
||||
# Pull latest if needed -- change this to your image name and/or where to pull it from |
||||
#docker pull $CONTAINER_IMAGE |
||||
|
||||
# Run NUM_CONTAINERS |
||||
#for ((n=0;n<$NUM_CONTAINERS;n++)); do |
||||
# docker run --device=/dev/net/tun --privileged -d $CONTAINER_IMAGE |
||||
#done |
||||
|
||||
pssh -h big-test-hosts -o big-test-out -t 0 -p 256 "for ((n=0;n<$NUM_CONTAINERS;n++)); do docker run --device=/dev/net/tun --privileged -d $CONTAINER_IMAGE; sleep 0.25; done" |
||||
pssh -h big-test-hosts -o big-test-out -t 0 -p 256 "for ((n=0;n<$NUM_CONTAINERS;n++)); do sudo docker run --device=/dev/net/tun --privileged -d $CONTAINER_IMAGE; sleep 0.1; done" |
||||
|
||||
exit 0 |
||||
|
||||
Loading…
Reference in new issue