Skip to content

Commit 0de70b0

Browse files
author
Joohwan Oh
committed
add missing script
1 parent d2a34fe commit 0de70b0

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

setup_arangodb_2.3.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
3+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4+
cd $DIR
5+
6+
VERSION=2.3.4
7+
NAME=ArangoDB-$VERSION
8+
9+
if [ ! -d "$DIR/$NAME" ]; then
10+
# download ArangoDB
11+
echo "wget http://www.arangodb.org/repositories/travisCI/$NAME.tar.gz"
12+
wget http://www.arangodb.org/repositories/travisCI/$NAME.tar.gz
13+
echo "tar zxf $NAME.tar.gz"
14+
tar zvxf $NAME.tar.gz
15+
fi
16+
17+
ARCH=$(arch)
18+
PID=$(echo $PPID)
19+
TMP_DIR="/tmp/arangodb.$PID"
20+
PID_FILE="/tmp/arangodb.$PID.pid"
21+
ARANGODB_DIR="$DIR/$NAME"
22+
ARANGOD="${ARANGODB_DIR}/bin/arangod_x86_64"
23+
24+
# create database directory
25+
mkdir ${TMP_DIR}
26+
27+
echo "Starting ArangoDB '${ARANGOD}'"
28+
29+
${ARANGOD} \
30+
--database.directory ${TMP_DIR} \
31+
--configuration none \
32+
--server.endpoint tcp://127.0.0.1:8529 \
33+
--javascript.app-path ${ARANGODB_DIR}/js/apps \
34+
--javascript.startup-directory ${ARANGODB_DIR}/js \
35+
--database.maximal-journal-size 1048576 \
36+
--server.disable-authentication true &
37+
38+
sleep 2
39+
40+
echo "Check for arangod process"
41+
process=$(ps auxww | grep "bin/arangod" | grep -v grep)
42+
43+
if [ "x$process" == "x" ]; then
44+
echo "no 'arangod' process found"
45+
echo "ARCH = $ARCH"
46+
exit 1
47+
fi
48+
49+
echo "Waiting until ArangoDB is ready on port 8529"
50+
while [[ -z `curl -s 'http://127.0.0.1:8529/_api/version' ` ]] ; do
51+
echo -n "."
52+
sleep 2s
53+
done
54+
55+
echo "ArangoDB is up"

0 commit comments

Comments
 (0)