Created
December 14, 2013 07:46
-
-
Save ashrithr/7956607 to your computer and use it in GitHub Desktop.
mongodb puppet usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shard server - in replica set 'mongoShard1' | |
node 'shardsvr1.cw.com' { | |
include mongodb | |
mongodb::mongod { | |
'mongo_shard1': | |
mongod_instance => 'Shard1', | |
mongod_replSet => 'mongoShard1', | |
mongod_shardsvr => 'true', | |
} | |
} | |
# Shard server - in replica set 'mongoShard1' | |
node 'shardsvr2.cw.com' { | |
include mongodb | |
mongodb::mongod { | |
'mongo_shard2': | |
mongod_instance => 'Shard2', | |
mongod_replSet => 'mongoShard1', | |
mongod_shardsvr => 'true', | |
} | |
} | |
# Shard server - in replica set 'mongoShard1' | |
node 'shardsvr3.cw.com' { | |
include mongodb | |
mongodb::mongod { | |
'mongo_shard3': | |
mongod_instance => 'Shard3', | |
mongod_replSet => 'mongoShard1', | |
mongod_shardsvr => 'true', | |
} | |
} | |
# Config server | |
node 'configsvr1.cw.com' { | |
include mongodb | |
mongodb::mongod { | |
'mongo_config1': | |
mongod_instance => 'mongoConfig1', | |
mongod_configsvr => 'true', | |
mongod_port => '27018', | |
} | |
} | |
# Router | |
mongodb::mongos { | |
'mongos': | |
mongos_instance => 'mongoproxy', | |
mongos_port => 27017, | |
mongos_configServers => 'configsvr1.cw.com:27018,configsvr2.cw.com:27018,configsvr3.cw.com:27018' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment