https://github.com/squallstar/mongo-cluster
Mongo Cluster (Replicaset) recipe for Amazon OpsWorks
https://github.com/squallstar/mongo-cluster
Last synced: about 2 months ago
JSON representation
Mongo Cluster (Replicaset) recipe for Amazon OpsWorks
- Host: GitHub
- URL: https://github.com/squallstar/mongo-cluster
- Owner: squallstar
- Created: 2015-04-29T14:05:01.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2016-02-29T14:22:37.000Z (over 10 years ago)
- Last Synced: 2025-07-07T15:00:02.645Z (12 months ago)
- Language: Ruby
- Homepage: http://aws.amazon.com/opsworks
- Size: 3.91 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mongo Replicaset cluster for AWS OpsWorks
## OpsWorks Stack configuration
- Chef version: **11.10**
- Use custom Chef cookbooks: **yes**
- Repository URL: **https://github.com/squallstar/mongo-cluster**
- Manage Berkshelf: **yes**
- Berkshelf version: **3.2.0**
## Custom JSON
```
{
"mongodb" : {
"config": {
"auth": true,
"replSet": "mongo-rs"
},
"cluster_name": "mongo-cluster",
"auto_configure": {
"replicaset": true
},
"key_file_content": "foo",
"admin": {
"username": "baradmin",
"password": "bar"
},
"users": [
{
"username": "bazuser",
"password": "baz"
}
]
}
}
```
After creating the first machine, log via **ssh** to **mongo**, create your users and trigger a **rs.initiate()**.
## Adding secondary nodes
Provision your new nodes, then log into the primary mongo and add the other machine as a replica:
```
rs.add("second-machine.example.org")
```