Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECS] [CodeDeploy] [CloudFormation]: CloudFormation support for BLUE/GREEN deployments on ECS #130

Open
ilyasotkov opened this issue Jan 24, 2019 · 36 comments

Comments

@ilyasotkov
Copy link

@ilyasotkov ilyasotkov commented Jan 24, 2019

The feature was announced in November: https://www.youtube.com/watch?v=01ewawuL-IY

For blue/green deployments, AWS CloudFormation supports deployments on AWS Lambda compute platforms only.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentgroup.html

Not exactly sure whether AWS::ECS::Service.DeploymentConfiguration would be affected as well.

@ilyasotkov ilyasotkov added the Proposed label Jan 24, 2019
@abby-fuller abby-fuller added the ECS label Jan 25, 2019
@steven-cuthill-otm

This comment has been minimized.

Copy link

@steven-cuthill-otm steven-cuthill-otm commented Feb 13, 2019

would be good to get more info on this and what are the plans.

@ngamradt-turner

This comment has been minimized.

Copy link

@ngamradt-turner ngamradt-turner commented Mar 1, 2019

We would like to start experimenting with this feature, but without CloudFormation support, it is not practical for us to use.

@steven-cuthill-otm

This comment has been minimized.

Copy link

@steven-cuthill-otm steven-cuthill-otm commented Mar 1, 2019

We would like to start experimenting with this feature, but without CloudFormation support, it is not practical for us to use.

we have been promised that CFN will be getting 1st class treatment going forward ... we shall see :)

@deleugpn

This comment has been minimized.

Copy link

@deleugpn deleugpn commented Mar 1, 2019

@steven-cuthill-otm who promised that?

@steven-cuthill-otm

This comment has been minimized.

Copy link

@steven-cuthill-otm steven-cuthill-otm commented Mar 1, 2019

@deleugpn

This comment has been minimized.

Copy link

@deleugpn deleugpn commented Mar 1, 2019

I read that thread and didn't see any moment the promise to get CloudFormation support for resources as 1st class treatment. The wording says they'll open their roadmap to allow us to tell what we would like to prioritize, which for me does not translate as getting 1st class treatment.

@sarojgharat

This comment has been minimized.

Copy link

@sarojgharat sarojgharat commented Mar 11, 2019

Any update on this ?

@mmoulton

This comment has been minimized.

Copy link

@mmoulton mmoulton commented Mar 26, 2019

I'm also very interested in this capability. Specifically I'd like to use it with CDK (aws/aws-cdk#2056)

@angusfz

This comment has been minimized.

Copy link

@angusfz angusfz commented Mar 28, 2019

Waiting for CFN support

@nitzanyemal123

This comment has been minimized.

Copy link

@nitzanyemal123 nitzanyemal123 commented Apr 15, 2019

+1 For CF support

1 similar comment
@mrbueno92

This comment has been minimized.

Copy link

@mrbueno92 mrbueno92 commented May 8, 2019

+1 For CF support

@sarojgharat

This comment has been minimized.

Copy link

@sarojgharat sarojgharat commented May 8, 2019

@andrewhiles

This comment has been minimized.

Copy link

@andrewhiles andrewhiles commented May 14, 2019

Do we know if there's been any movement with this?

@JoeAlamo

This comment has been minimized.

Copy link

@JoeAlamo JoeAlamo commented May 21, 2019

This would be a killer feature to have.

@coultn coultn moved this from Researching to We're Working On It in containers-roadmap May 21, 2019
@paddie

This comment has been minimized.

Copy link

@paddie paddie commented Jun 17, 2019

Yep, blocked by this as well. I think that this article summarises pretty clearly why this is not a trivial thing for CF to handle:

It turns out that there’s actually a very good reason why this is not a supported configuration. CodeDeploy is going to be referring to an Auto Scaling Group, and it’s likely that you have defined that ASG in your CloudFormation template, and used !Ref to link the deployment group to it.

The problem comes when you do your first blue-green deployment. CodeDeploy does a blue-green deployment by cloning the ASG to make a new one with the same parameters, but whose instances run the newer version of your application. Once the new version is deployed and healthy, it winds down the old ASG. Then, it updates the deployment group configuration to point to the new ASG, and deletes the old ASG.

This is fine until you go back to your CloudFormation template and need to make a change that touches the ASG. CloudFormation will try to update the ASG that it created, only to find it doesn’t exist any more. Boom, template update failure and rollback.

@ScOut3R

This comment has been minimized.

Copy link

@ScOut3R ScOut3R commented Jun 17, 2019

In regards to ECS blue/green deployments CodeDeploy uses two already existing Target Groups to switch traffic back and forth. While the referenced article holds correct information it does not relate to ECS blue/green deployments but EC2 based ones.
I have a service where I deployed almost everything via CloudFormation, including the two Target Groups used for blue/green deployments. I provisioned the CodeDeploy side with Terraform and everything works quite neatly. Since CodeDeploy does not destroy/clone/recreate the Target Groups both parties are happy.
Apart from capacity concerns as a consumer I don't see any blockers for ECS support.

@okram999

This comment has been minimized.

Copy link

@okram999 okram999 commented Jul 16, 2019

@ScOut3R - how do the service know that the deployment type is bluegreen, if you configure them using cloudformation. The option to specify deployment type as bluegreen is what where the challenge starts. no?

@ScOut3R

This comment has been minimized.

Copy link

@ScOut3R ScOut3R commented Jul 16, 2019

@okram999 The blue/green CodeDeploy configuration is deployed by Terraform. I pass in as input variables the ECS Service and the two Target Groups (which are built by CloudForamtion) to Terraform which builds the CodeDeploy and CodePipeline configuration.

@noahxp

This comment has been minimized.

Copy link

@noahxp noahxp commented Aug 22, 2019

+1 For CF support

1 similar comment
@pferretti

This comment has been minimized.

Copy link

@pferretti pferretti commented Sep 2, 2019

+1 For CF support

@ngamradt-turner

This comment has been minimized.

Copy link

@ngamradt-turner ngamradt-turner commented Sep 6, 2019

Is there an update on this feature?

@mwarkentin

This comment has been minimized.

Copy link

@mwarkentin mwarkentin commented Sep 26, 2019

Probably helpful to add your votes and follow on the issues on the cloudformation roadmap:

@dslove

This comment has been minimized.

Copy link

@dslove dslove commented Oct 9, 2019

I need this too.

@ramanasatyavolu

This comment has been minimized.

Copy link

@ramanasatyavolu ramanasatyavolu commented Nov 4, 2019

Is there a feature provided in CloudFormation to launch blue green deployment through ECS

@coultn coultn moved this from We're Working On It to Coming Soon in containers-roadmap Nov 8, 2019
@surajtikoo

This comment has been minimized.

Copy link

@surajtikoo surajtikoo commented Nov 14, 2019

Waiting for a long time .Is any time line when it be be available in cloudFormation to launch blue green deployment through ecs fargate?

@mwarkentin

This comment has been minimized.

Copy link

@mwarkentin mwarkentin commented Nov 27, 2019

@surajtikoo

This comment has been minimized.

Copy link

@surajtikoo surajtikoo commented Nov 27, 2019

@mwarkentin Thanks for your Update, but i think with the new feature of ALB which support multiple target group with single Listeners is quite amazing. We can use weighted routing which is much easier and faster.
You are quite late with this feature. :)

https://aws.amazon.com/blogs/aws/new-advanced-request-routing-for-aws-application-load-balancers/

@deleugpn

This comment has been minimized.

Copy link

@deleugpn deleugpn commented Nov 27, 2019

I don't see how the ALB weighted request fit into CI/CD strategy. I want a limited time for weighted request instead of supporting 2 versions at all times.

@surajtikoo

This comment has been minimized.

Copy link

@surajtikoo surajtikoo commented Nov 27, 2019

@deleugpn. You can still handle this with your custom pipeline in build step to route the traffic, but i agree with your point if we need to test before forwarding traffic to your live environment then multiple versions support is quite useful.

@ngamradt-turner

This comment has been minimized.

Copy link

@ngamradt-turner ngamradt-turner commented Dec 3, 2019

Since this is still in the "Coming Soon" column, I am guessing that this feature will not come out until after re:Invent, or will something be announced yet during re:Invent?

@deleugpn

This comment has been minimized.

Copy link

@deleugpn deleugpn commented Dec 3, 2019

I think by this point it's crystal clear that AWS do not disclose release date until the day of the release.

@SoManyHs SoManyHs mentioned this issue Dec 14, 2019
0 of 2 tasks complete
@cb-manideep

This comment has been minimized.

Copy link

@cb-manideep cb-manideep commented Dec 28, 2019

+1 Need this.

@Lasim

This comment has been minimized.

Copy link

@Lasim Lasim commented Jan 4, 2020

+1

@coultn coultn moved this from Coming Soon to We're Working On It in containers-roadmap Jan 10, 2020
@coultn coultn moved this from We're Working On It to Coming Soon in containers-roadmap Jan 10, 2020
@Chidiebube

This comment has been minimized.

Copy link

@Chidiebube Chidiebube commented Jan 21, 2020

Hi @coultn I see that there a property value CODE_DEPLOY in the "DeploymentController:" property docs here does this mean that this is now available ? And this issue need to be updated ?

@mwarkentin

This comment has been minimized.

Copy link

@mwarkentin mwarkentin commented Feb 7, 2020

Also hoping that this will work with the new CodeDeploy canary deployment strategies!

#229

@richardmaltais

This comment has been minimized.

Copy link

@richardmaltais richardmaltais commented Feb 7, 2020

@paddie For that specific matter, using Blue-Green with CodeDeploy on EC2 instances, we used a custom setup to keep the original ASG, then CodeDeploy-generated ASGs are switched over as usual, drained when needed and the updated LaunchConfiguration is also "copied" over through a Lambda, so that CloudFormation doesn't freak out when comes the time to update it. However, it comes with a few limitations:

  • not possible to change the capacity of the ASG (the CodeDeploy-generated one)
  • we have to have set the capacity to 0 when applying changes to the LaunchConfiguration and the ASG. Then, the Lambdas do the rest

However, we didn't try to experiment with resource import for the CodeDeploy generated ASG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
containers-roadmap
  
Coming Soon
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
You can’t perform that action at this time.