mikey- / rds_auto_upgrader

Note: there are many subtleties while performing this type of upgrade operation. This fit my use-case at the time and may not fit yours! Automate the major version upgrade process of a fleet of AWS RDS DB Instances

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rds_auto_upgrader Build Status codecov

What is does:

rds_auto_upgrader allows one to perform major version upgrades on many PostgreSQL or MySQL RDS Instances in parallel. While doing so, it will automatically resolve the proper PostgreSQL or MySQL major version upgrade path, and wait for RDS Instance availability before performing subsequent upgrades.

If you're really out of date (like I was), upgrading to the latest major version for your respective DB engine on RDS can be pretty time consuming since you have to perform major version upgrades like so:

screen shot 2018-09-27 at 4 41 30 pm screen shot 2018-09-28 at 10 15 57 pm

Now, imagine upgrading an entire fleet!

With rds_auto_upgrader, a single command could take care of that for you:

$ python upgrade.py -tags {"taggedForUpgrade": True}


Pre-Reqs:

Installation:

  • pip install -r requirements.txt

Examples:

  • Perform a dry run to see how your RDSInstances will traverse major upgrade versions

    • python upgrade.py -ids my-cool-db-a --dry_run
      • RDSInstance: my-cool-db-a will be upgraded as follows: 9.4.19 -> 9.5.14 -> 9.6.10 -> 10.5
  • Upgrade many RDS instances to their latest available major version by DbInstanceIdentifers:

    • python upgrade.py -ids my-cool-db-a my-cool-db-b
  • Upgrade many RDS instances to their latest available major version by DbInstanceTags:

    • python upgrade.py -tags {"Name": "test-rds-name", "owner": "test@example.com"}
  • Upgrade a single RDS instance to a specific major version by DbInstanceIdentifer:

    • python upgrade.py -ids my-cool-db-a -v 9.6.9

Running Tests:

  • python tests.py

About

Note: there are many subtleties while performing this type of upgrade operation. This fit my use-case at the time and may not fit yours! Automate the major version upgrade process of a fleet of AWS RDS DB Instances


Languages

Language:Python 100.0%