big-test-ready.sh 904 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # Edit as needed -- note that >1000 per host is likely problematic due to Linux kernel limits
  3. NUM_CONTAINERS=100
  4. CONTAINER_IMAGE=zerotier/http-test
  5. #
  6. # This script is designed to be run on Docker hosts to run NUM_CONTAINERS
  7. #
  8. # It can then be run on each Docker host via pssh or similar to run very
  9. # large scale tests.
  10. #
  11. export PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin:/sbin
  12. # Kill and clean up old test containers if any -- note that this kills all containers on the system!
  13. #docker ps -q | xargs -n 1 docker kill
  14. #docker ps -aq | xargs -n 1 docker rm
  15. # Pull latest if needed -- change this to your image name and/or where to pull it from
  16. #docker pull $CONTAINER_IMAGE
  17. # Run NUM_CONTAINERS
  18. #for ((n=0;n<$NUM_CONTAINERS;n++)); do
  19. # docker run --device=/dev/net/tun --privileged -d $CONTAINER_IMAGE
  20. #done
  21. pssh -h big-test-hosts -i -t 0 -p 256 "docker pull $CONTAINER_IMAGE"
  22. exit 0