A collection of script to flip a Route53 domain between two A records.
In order to keep configuration out of the scripts all variables are configured via ENV. Each tools requirements may require additional variables, however you will always need to set:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_REGION
- Region for the infrastructureBLUE_DEPLOY_DOMAIN
- the domain for "blue" platform.GREEN_DEPLOY_DOMAIN
- the domain for "green" platform.TARGET_DEPLOY_DOMAIN
- the domain you wish switch the DNS on.
We strongly advise creating a new IAM user just for Route53 just in case.
env PYTHONPATH=. /bin/current_live_environment
Returns the current live environment
env PYTHONPATH=. /bin/flip_dns_record
Points TARGET_DEPLOY_DOMAIN
at the alternate blue/green record
env PYTHONPATH=. /bin/rollback
Returns the current live environment
env PYTHONPATH=. /bin/start_instances
ELB_NAME
- The ELB name that the instances belong to
env PYTHONPATH=. /bin/stop_instances
ELB_NAME
- The ELB name that the instances belong to