0

I'm trying to use Terraform to setup a blue/green Jenkins deployment. The idea is to setup a green infrastructure for testing, and when that is good, promote it as the blue node to be used for production. So far I have these steps

  • Setup green infrastructure, which creates a Route53 URL, e.g., jenkins1.mycompany.com
  • Test green infrastructure
  • When satisfied, move the Route53 URL production URL to point to the above UR, so jenkins.mycompany.com --> jenkins1.mycompany.com

The next time we need to create a new green infrastructure, we do similar steps, except the Route53 URLs are done differently.

  • Setup green infrastructure, which creates a Route53 URL, e.g., jenkins0.mycompany.com
  • Test green infrastructure
  • When satisfied, move the Route53 URL production URL to point to the above UR, so jenkins.mycompany.com --> jenkins0.mycompany.com

IOW, we flip-flop between the jenkins0.mycompany.com and jenkins1.mycompany.com URLs. Is this a sound approach?

When setting up the green infra, I do

  • Create a snapshot of the blue volume
  • Create a volume from the snapshot
  • Create an EC2 instance with the Jenkins Docker image, and mount the volume
  • Create a Route53 -> ALB -> target group -> EC2 infrastructure

Good approach? Is there a better one?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.