Skip to content

Commit

Permalink
feat: Provide a Mongors service that helps setting up a MongoDB Repli…
Browse files Browse the repository at this point in the history
…ca Set #178
  • Loading branch information
Christophe Nouguier committed Nov 13, 2020
1 parent e75c9a7 commit f9e6738
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/guides/advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,18 +269,19 @@ Execute the following procedure
$docker exec -ti <constainer_id> bash
```

5. Configure the **Replica Set**
5. [Initiate](https://docs.mongodb.com/manual/tutorial/deploy-replica-set/#initiate-the-replica-set) the **Replica Set**

```bash
$mongo --host mongodb0 --eval 'rs.initiate({ _id: "mongors", version: 1, members: [ { _id: 0, host : "mongodb0:27017" }, { _id: 1, host : "mongodb1:27017" }, { _id: 2, host : "mongodb2:27017" } ] })'
```

6. Check the status of the **Replica Set**
6. [Check the status](https://docs.mongodb.com/manual/tutorial/troubleshoot-replica-sets/#check-replica-set-status) of the **Replica Set**

```bash
$mongo --host mongodb0 --eval 'rs.status()'
```


### Troubleshooting the Replica Set

A member of a replica set could enter `RECOVERING` state when it is not ready to accept reads.
Expand Down

0 comments on commit f9e6738

Please sign in to comment.