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
已提问 4 个月前168 查看次数
1 回答
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
专家
已回答 4 个月前
  • +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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则