Skip to content

maxwellhealth/terraform-module-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-module-mongo

A terraform module for creating a mongo replica set that is kind of self healing. If an individual member dies, the auto scale group should relaunch it and it should rejoin automagically.

Requirements

  • base ami (ubuntu, untested with anything else)
    • mongodb installed and configured
    • EBS volume available at /dev/xvdg
    • name prefixed with mongo-

Initial Setup

  1. terraform apply
  2. log into created mongo hosts via ssh
  3. stop mongo (probably not running properly, because an admin user doesn't exist yet)
  4. create mongo admin user
  5. restart mongo on all hosts
  6. on a single host, create a replica set, using the DNS name created in route53 instead of the hostname of the box
  7. add the other instances to the replica set using the DNS names
  8. your replica set should be up

About

A terraform module for creating a self-healing mongo cluster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages