Sha256: 2f76d301b2d14ad3fa1900c7b3e8cd050d613822fb6d22488952ec81aaa7707a
Contents?: true
Size: 500 Bytes
Versions: 1
Compression:
Stored size: 500 Bytes
Contents
require 'mongo' START_PORT = 27017 N = 4 N.times do |n| system("rm -rf /data/rs#{n}") system("mkdir -p /data/rs#{n}") system("mongod --replSet replica-set-foo --logpath '#{n}.log' --dbpath /data/rs#{n} --port #{START_PORT + n} --fork") end con =<<DOC config = {_id: 'replica-set-foo', members: [{_id: 0, host:'localhost:27017'}, {_id:1, host:'localhost:27018'}, {_id: 2, host: 'localhost:27019', arbiterOnly: true}, {_id: 3, host: 'localhost:27020'}]}" DOC puts con
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mongo-1.1.3 | test/rs.rb |