-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathup
More file actions
executable file
·28 lines (23 loc) · 708 Bytes
/
Copy pathup
File metadata and controls
executable file
·28 lines (23 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function launch_container()
{
network=$1
index=$2
ip=172.28.5.$2
sudo docker run --name odl_${ip} -d -ti \
--cap-add NET_ADMIN \
--network=${network} --ip=${ip} \
-v $(pwd)/mounts/${index}/assembly:/odlha/karaf/target/assembly \
odl bash
sudo docker exec odl_${ip} \
/odlha/karaf/target/assembly/bin/configure_cluster.sh $index 172.28.5.1 172.28.5.2 172.28.5.3
}
set -x
if [ "$(sudo docker network list | grep 'odl-cluster')" = "" ]
then
sudo docker network create --subnet=172.28.0.0/16 --ip-range=172.28.5.0/24 --gateway=172.28.5.254 odl-cluster
fi
containers=${@:-1 2 3}
for i in $containers
do
launch_container odl-cluster $i
done