File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ docker run -d -v "$LOCATION"/jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY="$ARANGO
2626docker 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
2727docker 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
2828
29- 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
29+ docker run -d -v " $LOCATION " /jwtSecret:/jwtSecret -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.3.1 --name coordinator1 " $1 " arangodb --cluster.start-dbserver false --cluster.start-coordinator true --starter.join agent1 --auth.jwt-secret /jwtSecret
3030docker 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
3131
3232debug_container () {
@@ -81,9 +81,6 @@ for a in 172.28.1.1:8531 \
8181 wait_server $a
8282done
8383
84- # wait for port mappings
85- wait_server localhost:8529
86-
8784docker exec coordinator1 arangosh --server.authentication=false --javascript.execute-string=' require("org/arangodb/users").update("root", "test")'
8885
8986# rm "$LOCATION"/jwtHeader "$LOCATION"/jwtSecret
Original file line number Diff line number Diff line change @@ -11,13 +11,32 @@ docker pull "$1"
1111
1212docker network create arangodb --subnet 172.28.0.0/16
1313
14- docker run -d -p 8529:8529 -e ARANGO_ROOT_PASSWORD=test -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.3.1 --name arangodb " $1 "
14+ docker run -d -e ARANGO_ROOT_PASSWORD=test -e ARANGO_LICENSE_KEY=" $ARANGO_LICENSE_KEY " --network arangodb --ip 172.28.3.1 --name arangodb " $1 "
15+
16+ debug_container () {
17+ if [ ! " $( docker ps -aqf name=" $1 " ) " ]; then
18+ echo " $1 container not found!"
19+ exit 1
20+ fi
21+
22+ running=$( docker inspect -f ' {{.State.Running}}' " $1 " )
23+
24+ if [ " $running " = false ]
25+ then
26+ echo " $1 is not running!"
27+ echo " ---"
28+ docker logs " $1 "
29+ echo " ---"
30+ exit 1
31+ fi
32+ }
1533
1634echo " waiting for arangodb ..."
1735
1836# shellcheck disable=SC2091
19- until $( curl --output /dev/null --silent --head --fail -i -u root:test ' http://localhost :8529/_api/version' ) ; do
37+ until $( curl --output /dev/null --silent --head --fail -i -u root:test ' http://172.28.3.1 :8529/_api/version' ) ; do
2038 printf ' .'
39+ debug_container arangodb
2140 sleep 1
2241done
2342echo " READY!"
You can’t perform that action at this time.
0 commit comments