From a68d444c336b5282e717fae418c83d31d2bc83bb Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 2 Apr 2015 10:14:43 +0100 Subject: [PATCH] launch multiple test weaves --- bin/multiweave | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 bin/multiweave diff --git a/bin/multiweave b/bin/multiweave new file mode 100755 index 00000000..cfd04f94 --- /dev/null +++ b/bin/multiweave @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +N_WEAVES=${NUM_WEAVES:-29} + +case "$1" in + launch) + PREV= + for i in $(seq 1 $N_WEAVES); do + ID=$(WEAVE_CONTAINER_NAME=weave$i ./weave --local test-launch --connlimit=$N_WEAVES $PREV) + status=$(docker inspect --format='{{.State.Running}} {{.NetworkSettings.IPAddress}}' $ID) + PREV="${status#true }" + echo $ID $PREV + done + ;; + stop) + for i in $(seq 1 $N_WEAVES); do + echo Stopping weave$i + WEAVE_CONTAINER_NAME=weave$i ./weave --local stop + done + ;; +esac