mirror of https://gitee.com/bigwinds/arangodb
Silence stderr as well.
This commit is contained in:
parent
1c516f5c9a
commit
b31b8d9678
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ ! -d arangod or ! -d arangosh or ! -d UnitTests ] ; then
|
if [ ! -d arangod ] || [ ! -d arangosh ] || [ ! -d UnitTests ] ; then
|
||||||
echo Must be started in the main ArangoDB source directory.
|
echo Must be started in the main ArangoDB source directory.
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -19,13 +19,13 @@ rm -rf cluster
|
||||||
mkdir cluster
|
mkdir cluster
|
||||||
cd cluster
|
cd cluster
|
||||||
echo Starting agency...
|
echo Starting agency...
|
||||||
../bin/etcd-arango 2>&1 > /dev/null &
|
../bin/etcd-arango > /dev/null 2>&1 &
|
||||||
cd ..
|
cd ..
|
||||||
sleep 1
|
sleep 1
|
||||||
echo Initializing agency...
|
echo Initializing agency...
|
||||||
bin/arangosh --javascript.execute scripts/init_agency.js 2>&1 > cluster/init_agency.log
|
bin/arangosh --javascript.execute scripts/init_agency.js > cluster/init_agency.log 2>&1
|
||||||
echo Starting discovery...
|
echo Starting discovery...
|
||||||
bin/arangosh --javascript.execute scripts/discover.js 2>&1 > cluster/discover.log &
|
bin/arangosh --javascript.execute scripts/discover.js > cluster/discover.log 2>&1 &
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
TYPE=$1
|
TYPE=$1
|
||||||
|
@ -37,7 +37,7 @@ start() {
|
||||||
--cluster.my-address tcp://localhost:$PORT \
|
--cluster.my-address tcp://localhost:$PORT \
|
||||||
--server.endpoint tcp://localhost:$PORT \
|
--server.endpoint tcp://localhost:$PORT \
|
||||||
--cluster.my-local-info $TYPE:localhost:$PORT \
|
--cluster.my-local-info $TYPE:localhost:$PORT \
|
||||||
--log.file cluster/$PORT.log 2>&1 > cluster/$PORT.stdout &
|
--log.file cluster/$PORT.log > cluster/$PORT.stdout 2>&1 &
|
||||||
}
|
}
|
||||||
|
|
||||||
PORTTOPDB=`expr 8629 + $NRDBSERVERS - 1`
|
PORTTOPDB=`expr 8629 + $NRDBSERVERS - 1`
|
||||||
|
@ -55,7 +55,7 @@ testServer() {
|
||||||
PORT=$1
|
PORT=$1
|
||||||
while true ; do
|
while true ; do
|
||||||
sleep 1
|
sleep 1
|
||||||
curl -s -X GET "http://localhost:$PORT/_api/version" 2>&1 > /dev/null
|
curl -s -X GET "http://localhost:$PORT/_api/version" > /dev/null 2>&1
|
||||||
if [ "$?" != "0" ] ; then
|
if [ "$?" != "0" ] ; then
|
||||||
echo Server on port $PORT does not answer yet.
|
echo Server on port $PORT does not answer yet.
|
||||||
else
|
else
|
||||||
|
@ -73,17 +73,17 @@ fi
|
||||||
echo Bootstrapping DBServers...
|
echo Bootstrapping DBServers...
|
||||||
for p in `seq 8629 $PORTTOPDB` ; do
|
for p in `seq 8629 $PORTTOPDB` ; do
|
||||||
curl -s -X POST "http://localhost:$p/_admin/cluster/bootstrapDbServers" \
|
curl -s -X POST "http://localhost:$p/_admin/cluster/bootstrapDbServers" \
|
||||||
-d '{"isRelaunch":false}' 2>&1 >> cluster/DBServer.boot.log
|
-d '{"isRelaunch":false}' >> cluster/DBServer.boot.log 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
echo Running DB upgrade on cluster...
|
echo Running DB upgrade on cluster...
|
||||||
curl -s -X POST "http://localhost:8530/_admin/cluster/upgradeClusterDatabase" \
|
curl -s -X POST "http://localhost:8530/_admin/cluster/upgradeClusterDatabase" \
|
||||||
-d '{"isRelaunch":false}' 2>&1 >> cluster/DBUpgrade.log
|
-d '{"isRelaunch":false}' >> cluster/DBUpgrade.log 2>&1
|
||||||
|
|
||||||
echo Bootstrapping Coordinators...
|
echo Bootstrapping Coordinators...
|
||||||
for p in `seq 8530 $PORTTOPCO` ; do
|
for p in `seq 8530 $PORTTOPCO` ; do
|
||||||
curl -s -X POST "http://localhost:8530/_admin/cluster/bootstrapCoordinator" \
|
curl -s -X POST "http://localhost:8530/_admin/cluster/bootstrapCoordinator" \
|
||||||
-d '{"isRelaunch":false}' 2>&1 >> cluster/Coordinator.boot.log
|
-d '{"isRelaunch":false}' >> cluster/Coordinator.boot.log 2>&1
|
||||||
done
|
done
|
||||||
|
|
||||||
echo Done, your cluster is ready at
|
echo Done, your cluster is ready at
|
||||||
|
|
Loading…
Reference in New Issue