Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

implement smart cluster setup

  • Loading branch information...
commit 12bdd7d487b4382e342b2e322c1114026ae996c2 1 parent 11f1a54
Pavel Paulau pavel-paulau authored
24 src/bin/install-mongo-local.sh
View
@@ -12,6 +12,24 @@ tar xzf /tmp/mongodb-linux-x86_64-${MONGO_VERSION}.tgz -C /tmp
mv /tmp/mongodb-linux-x86_64-${MONGO_VERSION}/ /usr/lib/mongodb
rm /tmp/mongodb-linux-x86_64-${MONGO_VERSION}.tgz
-mongo-bin/start-mongod.sh -r rs0
-mongo-bin/start-mongod-configsvr.sh
-mongo-bin/start-mongos.sh
+hostname=`hostname`
+
+case $hostname in
+ ycsb-node1 )
+ mongo-bin/start-mongod.sh -r rs1 -p 27017 ;;
+ mongo-bin/start-mongod.sh -r rs2 -p 27018 ;;
+ mongo-bin/start-mongod-configsvr.sh -p 27019 ;;
+ mongo-bin/start-mongos.sh -p 27020 ;;
+ ycsb-node2 )
+ mongo-bin/start-mongod.sh -r rs2 -p 27017 ;;
+ mongo-bin/start-mongod.sh -r rs1 -p 27018 ;;
+ mongo-bin/start-mongos.sh -p 27020 ;;
+ ycsb-node2 )
+ mongo-bin/start-mongod.sh -r rs3 -p 27017 ;;
+ mongo-bin/start-mongod.sh -r rs4 -p 27018 ;;
+ mongo-bin/start-mongos.sh -p 27020 ;;
+ ycsb-node2 )
+ mongo-bin/start-mongod.sh -r rs4 -p 27017 ;;
+ mongo-bin/start-mongod.sh -r rs3 -p 27018 ;;
+ mongo-bin/start-mongos.sh -p 27020 ;;
+esac
2  src/mongodb/mongo-bin/mongo-env.sh
View
@@ -1,5 +1,5 @@
MONGO_HOME="/usr/lib/mongodb"
MONDO_DB_DIR="/data"
MONGO_LOG_DIR="/var/log/mongodb"
-MONGO_ROUTER="ycsb-node1:27018"
+MONGO_ROUTER="ycsb-node1:27020"
MONGO_CONFIGDB="ycsb-node1:27019"
Please sign in to comment.
Something went wrong with that request. Please try again.