@@ -17,25 +17,56 @@ 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- docker run -d --rm -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
21- docker run -d --rm -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
22- docker run -d --rm -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
20+ echo " Starting containers..."
2321
24- docker run -d --rm - 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
25- docker run -d --rm - 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
26- docker run -d --rm - 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
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+ 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
24+ 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
2725
28- docker run -d --rm -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
29- docker run -d --rm -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
26+ 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
27+ 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
28+ 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
29+
30+ 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
31+ 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
32+
33+ debug_container () {
34+ running=$( docker inspect -f ' {{.State.Running}}' " $1 " )
35+
36+ if [ " $running " = false ]
37+ then
38+ echo " $1 is not running!"
39+ echo " ---"
40+ docker logs " $1 "
41+ echo " ---"
42+ exit 1
43+ fi
44+ }
45+
46+ debug () {
47+ for c in agent1 \
48+ agent2 \
49+ agent3 \
50+ dbserver1 \
51+ dbserver2 \
52+ dbserver3 \
53+ coordinator1 \
54+ coordinator2 ; do
55+ debug_container $c
56+ done
57+ }
3058
3159wait_server () {
3260 # shellcheck disable=SC2091
3361 until $( curl --output /dev/null --silent --head --fail -i -H " $AUTHORIZATION_HEADER " " http://$1 /_api/version" ) ; do
3462 printf ' .'
63+ debug
3564 sleep 1
3665 done
3766}
3867
68+ echo " Waiting..."
69+
3970# Wait for agents:
4071for a in 172.28.1.1:8531 \
4172 172.28.1.2:8531 \
0 commit comments