Files
weave-scope/integration/setup.sh
Tom Wilkie 1ad7b4fce5 Speed up tests on circle.
- Ensure we use up to date build container when running tests.
- Parallelise host setup for integration tests.
- Pass some more circle env vars through to ./tools/tests so the scheduler works.
- Gather coverage from multiple shards.
- Create files as the right owner inside the container.
- Parallelise the circle.yaml
- Parallelise the intergration tests using existing machinery
- Build experimental in parallel.
- Use custom scheduler prefix for integration tests, so schedules don't clash with weave.
2015-11-04 15:35:21 +00:00

37 lines
965 B
Bash
Executable File

#!/bin/bash
set -e # NB don't set -u, as weave's config.sh doesn't like that.
. ./config.sh
echo Copying scope images and scripts to hosts
for HOST in $HOSTS; do
SIZE=$(stat --printf="%s" ../scope.tar)
cat ../scope.tar | pv -N "scope.tar" -s $SIZE | $SSH -C $HOST sudo docker load
upload_executable $HOST ../scope
upload_executable $HOST ../scope /usr/local/scope/bin/scope
done
setup_host() {
local HOST=$1
echo Installing weave on $HOST
# Download the latest released weave script locally,
# for use by weave_on
curl -sL git.io/weave -o ./weave
chmod a+x ./weave
run_on $HOST "sudo curl -sL git.io/weave -o /usr/local/bin/weave"
run_on $HOST "sudo chmod a+x /usr/local/bin/weave"
weave_on $HOST setup
echo Prefetching Images on $HOST
docker_on $HOST pull peterbourgon/tns-db
docker_on $HOST pull alpine
docker_on $HOST pull nginx
}
for HOST in $HOSTS; do
setup_host $HOST &
done
wait