John Mike
John Mike

Reputation: 2095

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?

Upvotes: 9

Views: 8685

Answers (2)

Kumar Abhishek
Kumar Abhishek

Reputation: 3124

Your tag for instances should match.

enter image description here

Once you have given the tag to your instances, same name tag can be used for deployment group which will figure out.

enter image description here

Upvotes: 2

Deblina Gupta
Deblina Gupta

Reputation: 190

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.

Upvotes: 10

Related Questions