Skip to content

Commit 9d97636

Browse files
committed
test docker subnet
1 parent 706a61f commit 9d97636

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

docker/find_active_endpoint.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
22

3-
COORDINATORS=("172.17.0.1:8529" "172.17.0.1:8539" "172.17.0.1:8549")
3+
GW=172.28.0.1
4+
COORDINATORS=("$GW:8529" "$GW:8539" "$GW:8549")
45

56
for a in ${COORDINATORS[*]} ; do
67
if curl -u root:test --silent --fail "http://$a"; then

docker/start_db.sh

+8-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ SSL=${SSL:=false}
1616
DATABASE_EXTENDED_NAMES=${DATABASE_EXTENDED_NAMES:=false}
1717

1818
STARTER_DOCKER_IMAGE=docker.io/arangodb/arangodb-starter:latest
19+
GW=172.28.0.1
20+
docker network create arangodb --subnet 172.28.0.0/16
1921

2022
# exit when any command fails
2123
set -e
@@ -32,10 +34,10 @@ AUTHORIZATION_HEADER=$(cat "$LOCATION"/jwtHeader)
3234
STARTER_ARGS=
3335
SCHEME=http
3436
ARANGOSH_SCHEME=http+tcp
35-
COORDINATORS=("172.17.0.1:8529" "172.17.0.1:8539" "172.17.0.1:8549")
37+
COORDINATORS=("$GW:8529" "$GW:8539" "$GW:8549")
3638

3739
if [ "$STARTER_MODE" == "single" ]; then
38-
COORDINATORS=("172.17.0.1:8529")
40+
COORDINATORS=("$GW:8529")
3941
fi
4042

4143
if [ "$SSL" == "true" ]; then
@@ -66,7 +68,7 @@ docker run -d \
6668
$STARTER_ARGS \
6769
--docker.container=adb \
6870
--auth.jwt-secret=/jwtSecret \
69-
--starter.address=172.17.0.1 \
71+
--starter.address="${GW}" \
7072
--docker.image="${DOCKER_IMAGE}" \
7173
--starter.local --starter.mode=${STARTER_MODE} --all.log.level=debug --all.log.output=+ --log.verbose
7274

@@ -87,12 +89,15 @@ done
8789

8890
set +e
8991
for a in ${COORDINATORS[*]} ; do
92+
echo ""
93+
echo "Setting username and password..."
9094
docker run --rm ${DOCKER_IMAGE} arangosh --server.endpoint="$ARANGOSH_SCHEME://$a" --server.authentication=false --javascript.execute-string='require("org/arangodb/users").update("root", "test")'
9195
done
9296
set -e
9397

9498
for a in ${COORDINATORS[*]} ; do
9599
echo ""
100+
echo "Requesting endpoint version..."
96101
curl -u root:test --insecure --fail "$SCHEME://$a/_api/version"
97102
done
98103

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
arangodb.hosts=172.17.0.1:8529
1+
arangodb.hosts=172.28.0.1:8529
22
arangodb.password=test
33
arangodb.acquireHostList=true

0 commit comments

Comments
 (0)