2016-07-24 11:08:47 -07:00
|
|
|
#! /bin/bash
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
DOCKER_IMAGE=$1
|
|
|
|
NETWORK_NAME=$2
|
2016-12-12 13:00:21 -08:00
|
|
|
N=$3
|
2016-12-21 13:39:06 -08:00
|
|
|
APP_PROXY=$4
|
2016-07-24 11:08:47 -07:00
|
|
|
|
|
|
|
cd $GOPATH/src/github.com/tendermint/tendermint
|
|
|
|
|
|
|
|
# create docker network
|
|
|
|
docker network create --driver bridge --subnet 172.57.0.0/16 $NETWORK_NAME
|
|
|
|
|
2016-08-25 15:27:21 -07:00
|
|
|
seeds="$(test/p2p/ip.sh 1):46656"
|
2016-07-24 11:08:47 -07:00
|
|
|
for i in `seq 2 $N`; do
|
2016-08-25 15:27:21 -07:00
|
|
|
seeds="$seeds,$(test/p2p/ip.sh $i):46656"
|
2016-07-24 11:08:47 -07:00
|
|
|
done
|
|
|
|
echo "Seeds: $seeds"
|
|
|
|
|
|
|
|
for i in `seq 1 $N`; do
|
2016-12-21 13:39:06 -08:00
|
|
|
bash test/p2p/peer.sh $DOCKER_IMAGE $NETWORK_NAME $i $APP_PROXY $seeds
|
2016-07-24 11:08:47 -07:00
|
|
|
done
|