-
Notifications
You must be signed in to change notification settings - Fork 314
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
Comments
would be good to get more info on this and what are the plans. |
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 :) |
@steven-cuthill-otm who promised that? |
|
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. |
Any update on this ? |
I'm also very interested in this capability. Specifically I'd like to use it with CDK (aws/aws-cdk#2056) |
Waiting for CFN support |
+1 For CF support |
1 similar comment
+1 For CF support |
Any update on this?
…On Wed, May 8, 2019, 15:07 Mauricio Bueno ***@***.***> wrote:
+1 For CF support
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#130 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AG7GOJFC4I55K4LUQYWREI3PULF7HANCNFSM4GSAGLIQ>
.
|
Do we know if there's been any movement with this? |
This would be a killer feature to have. |
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:
|
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. |
@ScOut3R - how do the service know that the deployment type is bluegreen, if you configure them using cloudformation. The option to specify |
@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. |
+1 For CF support |
1 similar comment
+1 For CF support |
Is there an update on this feature? |
Probably helpful to add your votes and follow on the issues on the cloudformation roadmap: |
I need this too. |
Is there a feature provided in CloudFormation to launch blue green deployment through ECS |
Also hoping that this will work with the new CodeDeploy canary deployment strategies! |
@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:
However, we didn't try to experiment with resource import for the CodeDeploy generated ASG. |
+1 For CF support |
We are excited to announce you can now use AWS CloudFormation to perform Amazon ECS blue/green and canary deployments through AWS CodeDeploy. Blue/green deployments are a safe deployment strategy provided by AWS CodeDeploy for minimizing interruptions caused by changing application versions. To learn more visit our announcement and the user guide. |
I've been tracking this ticket for a few months and I was excited to see it close, however, the solution provided did not solve the problem I expected. It seems that the new capability allows one to use Cloudformation as the deployment controller - in particular you would be monitoring the deployment in Cloudformation rather than the CodeDeploy console and release changes through stack updates. This may be exactly what others were looking for, but I was expecting was to have the ability to create a deployment group (with CF) using the ECS BlueGreen deployment type and be able to manage the deployment process (once created by CF) in the CodeDeploy console. Here's an example that I hoped would work after this change
Based on the Youtube video I thought this is what we were trying to accomplish because it shows several Deploy stages with ECS Blue/Green Deploy (not a Cloudformation deploy). Could someone let me know if this is an issue that is being worked on on the roadmap and/or am I doing something wrong to expect this to work? (I based this CF template on a working CLI command that I have) Thanks! PS: The error I get is "Encountered unsupported property BlueGreenDeploymentConfiguration" |
@sethstone You are correct. This feature does not support creating and configuring a CodeDeploy deployment group to naively perform blue/green deployments for ECS. That is a coverage gap being tracked: aws-cloudformation/cloudformation-coverage-roadmap#37 |
That issue was also closed: @sethstone A new issue was created on the CloudFormation roadmap here requesting coverage in |
There are a couple of limitations which mean that this feature won't work with our ECS platform (convox):
Are there plans / work in progress to handle these use cases? Or for more complex use cases like this would it be meant to be handled by the CodeDeploy DeploymentGroup support described above? |
Thanks for the analysis @mwarkentin. it's meant to me that there is no sense yet to use this feature if these functions are not implemented. |
I see that the issue has been closed since the Cloudformation support has been announced. But, as @mwarketin pointed it out, the limitations are quite crippling. Is there a separate issue where these limitations and their fixes are tracked? |
I opened this issue on the CloudFormation roadmap |
This change adds the option to set the `DeploymentController` on `ApplicationLoadBalanced`, `NetworkLoadBalanced` and `QueueProcessing` Fargate services. `MultipleTargetGroups` services are not updated because this option might not be applicable for them - one service might be using the default deployment controller while others might use `CODE_DEPLOY` or `EXTERNAL`. By default if this options is not passed it will use the default one from the `FargateService` construct which is `ECS`'s rolling updates. Related to aws/containers-roadmap#130
…es (#10452) This change adds the option to set the `DeploymentController` on `ApplicationLoadBalanced`, `NetworkLoadBalanced` and `QueueProcessing` ECS Services (both EC2 and Fargate). `MultipleTargetGroups` services are not updated because this option might not be applicable for them - one service might be using the default deployment controller while others might use `CODE_DEPLOY` or `EXTERNAL`. By default if this options is not passed it will use the default one from the respective Service construct which is `ECS`'s rolling updates. Related to aws/containers-roadmap#130 Closes #10971. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…es (aws#10452) This change adds the option to set the `DeploymentController` on `ApplicationLoadBalanced`, `NetworkLoadBalanced` and `QueueProcessing` ECS Services (both EC2 and Fargate). `MultipleTargetGroups` services are not updated because this option might not be applicable for them - one service might be using the default deployment controller while others might use `CODE_DEPLOY` or `EXTERNAL`. By default if this options is not passed it will use the default one from the respective Service construct which is `ECS`'s rolling updates. Related to aws/containers-roadmap#130 Closes aws#10971. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
June 24th 2022. Does anybody know how to control blue/green ECS deployment using Cloudformation(CF) without all the stupid limitations that the hook imposes (no outputs, no dynamic references, no other updates ...)? I mean at this point I am OK with implementing my own custom resource or even custom resource type. I am willing to bend and punish CF in ugly ways, the only thing I want is a way to perform ECS blue/green deployment as a part of CF deployment (update) process without all the stupid limits. Edit: I was thinking about implementing custom Cloudformation resource type. This resource would be in control of performing the deployment (lets call it "control resource"). It would use aws code deploy sdk to control the deployment. Do you think it would be possible, or do you see any obstacles? What I am worried about is erroneous cases when for example the stack update is interrupted due to something and the "control resource" is in progress. I am not sure how does Cloudformation behave in such case (will the "control resource" be notified that the stack update was interrupted?). And there are more cases like that. I guess this implementation would require deep dive into Cloudformation's internal functioning, which might be pretty exhausting. And it still might end up being dead-end. |
@simi-obs I can assure you that using a custom resource as a workaround for this is not a dead end. I implemented one myself (my very first lambda actually) back in 2019 when I started watching this issue and it's been used thousands of times over in production with a high success rate. I unfortunately can't post or give you the code without express permission from my employer, but I'll try to give you the rundown of the overall process and the gotchas / lessons learned along the way. In 2019, it was not possible to create a CloudFormation custom resource that was responsible for just the deployment itself (the "control resource" as you call it), because some the configuration required to create a CodeDeploy enabled ECS service was not allowed by the existing I suggest you approach writing your lambda on an event-by-event basis:
The caveats to watch out for:
Hope this helps! |
@teekennedy Very nice breakdown, thank you.
Regarding the overlapping deployments:
Also I believe I will still have to handle the ECS:Service as a part of the custom resource. Otherwise, I might run into the problem with Cloudformation trying to replace the service (which would probably end up in error) once the TaskDefinition changes. Overall, thank you for all the tips, will let the community here know how I ended up. |
The feature was announced in November: https://www.youtube.com/watch?v=01ewawuL-IY
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.The text was updated successfully, but these errors were encountered: