File tree 2 files changed +22
-6
lines changed
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
26
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
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
28
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
30
30
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
31
31
32
32
debug_container () {
@@ -81,9 +81,6 @@ for a in 172.28.1.1:8531 \
81
81
wait_server $a
82
82
done
83
83
84
- # wait for port mappings
85
- wait_server localhost:8529
86
-
87
84
docker exec coordinator1 arangosh --server.authentication=false --javascript.execute-string=' require("org/arangodb/users").update("root", "test")'
88
85
89
86
# rm "$LOCATION"/jwtHeader "$LOCATION"/jwtSecret
Original file line number Diff line number Diff line change @@ -11,13 +11,32 @@ docker pull "$1"
11
11
12
12
docker network create arangodb --subnet 172.28.0.0/16
13
13
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
+ }
15
33
16
34
echo " waiting for arangodb ..."
17
35
18
36
# 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
20
38
printf ' .'
39
+ debug_container arangodb
21
40
sleep 1
22
41
done
23
42
echo " READY!"
You can’t perform that action at this time.
0 commit comments