diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-30 13:05:34 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-10-30 13:05:34 -0700 |
commit | f808138a942893188537bf82a064932a2523d34d (patch) | |
tree | 871099e8e8591592aac020b8449979309e7fdac2 /tests/http/run-a-big-test.sh | |
parent | b845dd1b88b966c7931524721d8369e6db240ed7 (diff) | |
download | infinitytier-f808138a942893188537bf82a064932a2523d34d.tar.gz infinitytier-f808138a942893188537bf82a064932a2523d34d.zip |
docs and stuff
Diffstat (limited to 'tests/http/run-a-big-test.sh')
-rwxr-xr-x | tests/http/run-a-big-test.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/http/run-a-big-test.sh b/tests/http/run-a-big-test.sh new file mode 100755 index 00000000..1c125345 --- /dev/null +++ b/tests/http/run-a-big-test.sh @@ -0,0 +1,28 @@ +#!/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 + +exit 0 |