Skip to content

Commit aded475

Browse files
add usage to run-cluster.sh
1 parent ee63a35 commit aded475

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scripts/travis-ci/run-cluster.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
set -e
44
set -x
55

6+
function print_usage() {
7+
echo "Usage $0: [MONGO_VERSION] [CONFIGSVR_TYPE (CSRS or SCCC)] [mongodb-consistent-backup EXTRA FLAGS...]"
8+
}
9+
610
MONGO_VERSION=${1:-3.2}
711
CONFIGSVR_TYPE=${2:-CSRS}
812
MCB_EXTRA="${@:3}"
@@ -19,10 +23,14 @@ pushd $(dirname $0)
1923
export CONFIGSVR_FLAGS="--replSet=${CONFIGSVR_REPLSET}"
2024
export MONGOS_CONFIGDB="${CONFIGSVR_REPLSET}/mongo-cs-1:27017,mongo-cs-2:27017,mongo-cs-3:27017"
2125
echo "# Using CSRS-based config servers: '${MONGOS_CONFIGDB}'"
22-
else
26+
elif [ "${CONFIGSVR_TYPE}" == "SCCC" ]; then
2327
export CONFIGSVR_FLAGS=
2428
export MONGOS_CONFIGDB="mongo-cs-1:27017,mongo-cs-2:27017"
2529
echo "# Using SCCC-based config servers: '${MONGOS_CONFIGDB}'"
30+
else
31+
echo "Unsupported CONFIGSVR_TYPE field: '${CONFIGSVR_TYPE}'! Supported: CSRS (default) or SCCC"
32+
print_usage
33+
exit 1
2634
fi
2735

2836
# start mongo-mongos service (which starts the whole cluster)

0 commit comments

Comments
 (0)