Skip to content

A Chef cookbook to set up fully automated, self-healing MongoDB replica set with AWS Autoscaling group.

Notifications You must be signed in to change notification settings

fangyizhu/mongodb-replica-set-cookbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDB Replica Set Cookbook

Requirements

Access to AWS EC2, Autoscaling group, Route 53 and S3. Proper traffic rules and roles configured.

Attributes

This cookbook works with AWS Autoscaling group to set up a self-healing replica set. When one node goes down, the autoscaling group would automatically stand up a new node, and this cookbook performs all the steps required to add the new node to the replica set including set up DNS entry in Route 53.
The cookbook assumes and will make replica set name, autoscaling group name, instance name prefix, Route 53 DNS record prefix identical.

Usage

  • Fill out the default variables in attributes/default.rb
  • Go to AWS Console - EC2 - AUTO SCALING - Launch Configurations, click "Create launch configuration"
  • Set up proper steps in user data to run this cookbook.
  • On Step 4: Add three new volumes: /dev/sdg, /dev/sdf, /dev/sdh.
    sdf is for data, sdh is for journal, sdg is for log
  • Once finished creating launch config, create an autoscaling group out of the launch config.
  • Launch!

License and Author

About

A Chef cookbook to set up fully automated, self-healing MongoDB replica set with AWS Autoscaling group.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published