Codedeploy associates an elastic IP address with a blue-green deployment instance when it starts

0

During blue and green deployment, the blue and green machines will be started successively using the same AMI through auto scaling. Both machines need to be associated to the elastic IP through scripts at startup. I now have two elastic IP addresses eipalloc-A and eipalloc-B. , how to ensure that the green machine replacement is associated with one of the fixed elastic IP addresses every time?

DD-Boom
asked 4 months ago160 views
1 Answer
1

I recommend using an ALB with code deploy. Therefore you will not have the issue with elastic IPs. Your EC2s can live in a private subnet and your deployment issue will go away. Also this also enables you to scale without needing multiple elastic IPs on the EC2s.

Rerouting instance traffic behind an Elastic Load Balancing load balancer is fundamental to CodeDeploy blue/green deployments.

profile picture
EXPERT
answered 4 months ago
  • +1 to this main concept, but just wanted to point out that ALB IPs will change over time. So if for some reason you can't use DNS and have to use static IPs, you need a Network Load Balancer

  • ALB is used, but the purpose of using elastic IP addresses is to facilitate connection to servers with various databases and other functions. The elastic IP addresses are added to the security groups of other servers in advance, and then the blue-green deployment directly associates the elastic IP addresses when starting the machine.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions