bash setup.sh ~/test 30000 /usr/bin
param1: base path
all files will be generate at ~/test
param2: base port
base port is 30000
param3: mongo_bin_dir
mongo_bin_dir is /usr/bin
bash run.sh
bash stop.sh
shard num default to be 3
each shard has three replset instance, exp, 3 shard will run 9 shard replset instances
mongos num default to be 3
config server port is [base port + 1, base port + 2, base port + 3]
mongos server port is [base port + 11, base port + 21, base port + 31 ... ]
mongo shard server port is [base port + 100 * shard_idx + 1, base port + 100 * shard_idx + 2, base port + 100 * shard_idx + 3 ... ]
all log in {base path}/log
all conf in {base path}/log
all data in {base path}/data