SE-1787 Add mongo backups

Description

This adds support for automated backups on a mongo db node to an EBS volume.

This has been used successfully on a client's mongo cluster. The way it works is to have a mongo node designated as the `MONGO_BACKUP_NODE`. On this node is a cron job that periodically launches the backup script. This backup script does roughly the following:

  • mounts an ebs volume

  • deletes all the files

  • dumps the mongo database with mongodump

  • unmounts the ebs volume

  • creates a snapshot of the volume

  • prunes old snapshots of the volume

This allows for flexible, consistent backups, versioned with ebs snapshots on aws.

*JIRA tickets*: TBD

*Dependencies*: None

*Merge deadline*: None

*Testing instructions*:

1. set appropriate vars for the `MONGO_BACKUP_*` vars found in
`playbooks/roles/mongo_3_2/defaults/main.yml`
2. deploy a mongo node on aws
3. verify that the backup script runs on the `MONGO_BACKUP_NODE` instance.

*Reviewers*

  • [ ] @itsyed

  • [ ] edX reviewer[s] TBD

Assignee

Unassigned

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Samuel Walladge

Repo

edx/configuration

Customer

Epic Link

None

OSCM Assignee

None

Platform Map Area (Levels 1 & 2)

Developer Experiences

Platform Map Area (Levels 3 & 4)

None

Blended Hour Utilization Percentage

None

Priority

Unset
Configure