Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blue green deploy for codedeploy fails ( The deployment failed because no instances were found in your green fleet. (Error code: NO_INSTANCES))

I'm trying to setup a blue/green deployment with CodeDeploy. So far I've set it up with to manually provision instances using an autoscaling group that I've created. Additionally I've enabled load balancing and linked it to an ALB.

The ASG I created has a minimum number of 1 instances running with 2 max.

When I trigger a deploy, I see the following error:

enter image description here

This confuses me as it seems to skip provisioning replacement instances and states that there were no instances found in the green fleet.

Any ideas?

like image 507
John Mike Avatar asked Dec 04 '17 20:12

John Mike


1 Answers

For a Blue/Green deployment you have two options when creating the deployment group:

  1. Manually provision instances
  2. Automatically copy Auto Scaling group

When you choose Manually provision instances you would specify the green fleet yourself while creating the deployment. In this case CodeDeploy will not provision a new ASG (Auto-Scaling Group) for you and that's why step 1 is skipped.

For step 2 it looks like the ASG that you manually specified as your green fleet does not have any instances in running state, you might want to cross check that. Also make sure the green fleet size is same as the original blue fleet size.

like image 95
Deblina Gupta Avatar answered Oct 27 '22 16:10

Deblina Gupta