Parallelise the copying of imaages etc
This commit is contained in:
1 parent
da36c78942
commit
e7676979ee
1 file changed
+9
-1
+9
-1
@@ -10,7 +10,9 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
echo "Copying weave images, scripts, and certificates to hosts, and"
|
||||
echo " prefetch test images"
|
||||
for HOST in $HOSTS; do
|
||||
|
||||
setup_host() {
|
||||
HOST=$1
|
||||
docker_on $HOST load -i ../weave.tar
|
||||
DANGLING_IMAGES="$(docker_on $HOST images -q -f dangling=true)"
|
||||
[ -n "$DANGLING_IMAGES" ] && docker_on $HOST rmi $DANGLING_IMAGES 1>/dev/null 2>&1 || true
|
||||
@@ -21,4 +23,10 @@ for HOST in $HOSTS; do
|
||||
for IMG in $TEST_IMAGES ; do
|
||||
docker_on $HOST inspect --format=" " $IMG >/dev/null 2>&1 || docker_on $HOST pull $IMG
|
||||
done
|
||||
}
|
||||
|
||||
for HOST in $HOSTS; do
|
||||
setup_host $HOST &
|
||||
done
|
||||
|
||||
wait
|
||||
Reference in new issue
Block a user