test 838 B

1234567891011121314151617181920212223
  1. #!/bin/sh -e
  2. set -x
  3. set -e
  4. # 1. build etcd binaries
  5. [ -f bin/etcd ] || ./build
  6. # 2. build agent & tester
  7. [ -f bin/etcd-agent -a -f bin/etcd-tester ] || ./tools/functional-tester/build
  8. # 3. build docker image (alpine based)
  9. mkdir -p ./tools/functional-tester/docker/bin
  10. cp -v bin/etcd-agent bin/etcd-tester bin/etcd ./tools/functional-tester/docker/bin
  11. docker-compose -f tools/functional-tester/docker/docker-compose.yml build
  12. # 4. create network (assumption - no overlaps)
  13. docker network ls | grep etcd-functional || docker network create --subnet 172.20.0.0/16 etcd-functional
  14. # 5. run cluster and tester (assumption - agents'll get first ip addresses)
  15. docker-compose -f tools/functional-tester/docker/docker-compose.yml up -d a1 a2 a3
  16. # 6. run tester
  17. docker-compose -f tools/functional-tester/docker/docker-compose.yml run tester