gotam
gotam

Reputation: 193

How to deploy code using CodeDeploy with AutoScalingGroup containing multiple target group

This is my case.

I am deploying code directly from bitbucket. I need code to deploy [Blue-green] to register instance automatically with all three target groups. But as per AWS CodeDeploy documentation, only one target group can be selected at the time of code deploy. Any kind of help is much appreciated.

Upvotes: 3

Views: 1555

Answers (1)

EmptyArsenal
EmptyArsenal

Reputation: 7464

At the moment, CodeDeploy does not support configuring multiple target groups in a single deployment. There are workarounds, but they're not awesome.

1. Break out each application into its own deployment group and deployment individually

You could deploy each application separately in a different deployment group, which would allow you to register/deregister to each target group. However, this approach would not work with blue/green deployments.

2. Register/deregister 2 target groups in your user scripts

You could configure your appspec to register and deregister from 2 targets groups using a script. There is a sample script on Github, though it's not not recommended for production use.

3. Break out your application into 3 sets of instances

Right now, you're running 3 different applications on the same hosts. You probably have good reason to do that, but if you could break out the applications into 3 different sets of hosts, you could break them into 3 different deployment groups and still use blue/green deployments.

Upvotes: 2

Related Questions