9f0c5d62f971dbb2f8810a114461082e053e229c
wiki/info/landscape/creating-ec2-mongodb-image-from-scratch.md
| ... | ... | @@ -99,4 +99,15 @@ will change the ownerships of the directory mounted from ephemeral storage accor |
| 99 | 99 | |
| 100 | 100 | ## MongoDB Replica Set Configuration |
| 101 | 101 | |
| 102 | -Connect to the MongoDB on that instance, then issue the command ``rs.initiate()`` in order to turn the instance into the "seed" of a replica set. You can then, for the time being, ``quit()`` the mongo shell. Re-connecting, e.g., with ``mongo "mongodb://localhost:27017/?replicaSet=live"``, will show the ``PRIMARY`` of the new replica set. |
|
| ... | ... | \ No newline at end of file |
| 0 | +Connect to the MongoDB on that instance, then issue the command ``rs.initiate()`` in order to turn the instance into the "seed" of a replica set. You can then, for the time being, ``quit()`` the mongo shell. Re-connecting, e.g., with ``mongo "mongodb://localhost:27017/?replicaSet=live"``, will show the ``PRIMARY`` of the new replica set. |
|
| 1 | + |
|
| 2 | + |
|
| 3 | +TODO: not functional yet; clients don't see the PRIMARY because it wants to re-direct to localhost/127.0.0.1. rs.config() shows the issue: |
|
| 4 | + |
|
| 5 | +``` |
|
| 6 | + "members" : [ |
|
| 7 | + { |
|
| 8 | + "_id" : 0, |
|
| 9 | + "host" : "localhost:27017", |
|
| 10 | + ... |
|
| 11 | +``` |