Tool required for human users to be able clone RDS Cluster/Instance for blue/green deployment and also restore in case of disaster recovery scenarios.
First of all clone this repo and change into that directory.
$ git clone https://github.com/adeelahmad84/aws_rds_cli.git
$ cd aws_rds_cli
The installation into a virtualenv is heavily recommended.
You would need to install the dependancies using the following command
$ virtualenv venv
$ . venv/bin/activate
$ pip install --editable .
The script will be executabe and can be called as you would using a cli environment.
To test to see if your script has been installed properly type rds --help
you should expect to see:
$ rds --help
Usage: rds [OPTIONS] COMMAND [ARGS]...
Command Line Tool to clone and restore RDS DB instance or cluster for
Blue-Green deployments. Please the sub commands below. You can also use
the options below to get more help.
NOTE: Please ensure the RDS instance ID is stored in your environment
variable as DBINSTANCEID
Options:
--help Show this message and exit.
Commands:
clone Prints the ARN of the snapshot to stdout.
deploy Deploy new DB from snapshot and print ARN to...
If you run the help switch on each command you see the following:
$ rds clone --help
Usage: rds clone [OPTIONS]
Prints the ARN of the snapshot to stdout.
NOTE: Please ensure the RDS instance ID is stored in your environment
variable as DBINSTANCEID
Options:
--instance_id TEXT Retrieved from ENV
--help Show this message and exit.
$ rds deploy --help
Usage: rds deploy [OPTIONS]
Deploy new DB from snapshot and print ARN to stdout.
NOTE: Please ensure the RDS instance ID is stored in your environment
variable as DBINSTANCEID
Options:
--instance_id TEXT The ID of the DB Instance.
--new_db_id TEXT The ID of the new DB.
--help Show this message and exit.
Explain how to run the automated tests for this system
Explain what these tests test and why
Give an example
Explain what these tests test and why
Give an example
Add additional notes about how to deploy this on a live system
Python2.7 and using Click framework
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
To be determined.
- Adeel Ahmad - Initial work - adeelahmad84
This project is licensed under the MIT License - see the LICENSE.md file for details