mbdvg
mbdvg

Reputation: 2714

Deploying through codedeploy for stopped instances scenario

I am trying to implement codedeploy poc setup. I have a ELB behind that attached more than 10 servers.We have servers in stopped state kept for add incase load increased. All these servers are tagged with same value to identify easily. Problem is Codedeploy identifies these tags and while deploying these servers are marked as Fail causing deployment gets failed. My concern is :
1. Is there any way to exclude stopped instances from Codedeploy.
2. Is there any better approach for this problem.

Any help would be highly appreciated.

Upvotes: 2

Views: 555

Answers (1)

Amartya Datta Gupta
Amartya Datta Gupta

Reputation: 77

The most elegant solution would be to use Autoscalng instead of stopped instances. However if you must use stopped instances, I can think of 2 quick solutions:

  1. Use a second set of tags to distinguish stopped vs running instances.
  2. Adjust the MINIMUM_HEALTHY_HOSTS constraint in away to make the deployment pass, even if it considers the stopped instances as failed.

Thanks, Amartya Datta Gupta

Upvotes: 1

Related Questions