@@ -17,27 +17,6 @@ echo "Averysecretword" > "$LOCATION"/jwtSecret
1717docker run --rm -v " $LOCATION " /jwtSecret:/jwtSecret " $1 " arangodb auth header --auth.jwt-secret /jwtSecret > " $LOCATION " /jwtHeader
1818AUTHORIZATION_HEADER=$( cat " $LOCATION " /jwtHeader)
1919
20- echo " Starting containers..."
21-
22- docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.1.1 --name agent1 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator false --auth.jwt-secret /jwtSecret
23- sleep 1
24- docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.1.2 --name agent2 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
25- sleep 1
26- docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.1.3 --name agent3 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
27- sleep 1
28-
29- docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.2.1 --name dbserver1 " $1 " arangodb --cluster.start-dbserver true --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
30- sleep 1
31- docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.2.2 --name dbserver2 " $1 " arangodb --cluster.start-dbserver true --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
32- sleep 1
33- docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.2.3 --name dbserver3 " $1 " arangodb --cluster.start-dbserver true --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
34- sleep 1
35-
36- docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.3.1 --name coordinator1 -p 8529:8529 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator true --starter.join agent1 --auth.jwt-secret /jwtSecret
37- sleep 1
38- docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.3.2 --name coordinator2 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator true --starter.join agent1 --auth.jwt-secret /jwtSecret
39- sleep 1
40-
4120debug_container () {
4221 running=$( docker inspect -f ' {{.State.Running}}' " $1 " )
4322
@@ -73,19 +52,31 @@ wait_server() {
7352 done
7453}
7554
76- echo " Waiting..."
77-
78- # Wait for agents:
79- for a in 172.28.1.1:8531 \
80- 172.28.1.2:8531 \
81- 172.28.1.3:8531 \
82- 172.28.2.1:8530 \
83- 172.28.2.2:8530 \
84- 172.28.2.3:8530 \
85- 172.28.3.1:8529 \
86- 172.28.3.2:8529 ; do
87- wait_server $a
88- done
55+
56+ echo " Starting containers..."
57+
58+ docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.1.1 --name agent1 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator false --auth.jwt-secret /jwtSecret
59+ docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.1.2 --name agent2 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
60+ docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.1.3 --name agent3 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
61+
62+ echo " Waiting for agents..."
63+ wait_server 172.28.1.1:8531
64+ wait_server 172.28.1.2:8531
65+ wait_server 172.28.1.3:8531
66+
67+ docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.2.1 --name dbserver1 " $1 " arangodb --cluster.start-dbserver true --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
68+ docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.2.2 --name dbserver2 " $1 " arangodb --cluster.start-dbserver true --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
69+ docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.2.3 --name dbserver3 " $1 " arangodb --cluster.start-dbserver true --cluster.start-coordinator false --starter.join agent1 --auth.jwt-secret /jwtSecret
70+
71+ docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.3.1 --name coordinator1 -p 8529:8529 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator true --starter.join agent1 --auth.jwt-secret /jwtSecret
72+ docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.3.2 --name coordinator2 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator true --starter.join agent1 --auth.jwt-secret /jwtSecret
73+
74+ echo " Waiting for dbservers and coordinators..."
75+ wait_server 172.28.2.1:8530
76+ wait_server 172.28.2.2:8530
77+ wait_server 172.28.2.3:8530
78+ wait_server 172.28.3.1:8529
79+ wait_server 172.28.3.2:8529
8980
9081# wait for port mappings
9182wait_server 127.0.0.1:8529
0 commit comments