Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

TheKeyholdingCompany/python-aws-blue-green

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Blue/Green Deploy Scrips

A collection of script to flip a Route53 domain between two A records.

Prerequisites

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 infrastructure
  • BLUE_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.

Tools

Retrieving currently live domain

env PYTHONPATH=. /bin/current_live_environment

Returns the current live environment

Flipping currently live domain

env PYTHONPATH=. /bin/flip_dns_record

Points TARGET_DEPLOY_DOMAIN at the alternate blue/green record

Rollback

env PYTHONPATH=. /bin/rollback

Returns the current live environment

Start Instances for ELB

env PYTHONPATH=. /bin/start_instances

Extra Environment Variables

  • ELB_NAME - The ELB name that the instances belong to

Stop Instances for ELB

env PYTHONPATH=. /bin/stop_instances

Extra Environment Variables

  • ELB_NAME - The ELB name that the instances belong to

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%