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

Support ECS deploy with CodeDeploy #168

Open
antonbabenko opened this issue Dec 18, 2018 · 6 comments
Open

Support ECS deploy with CodeDeploy #168

antonbabenko opened this issue Dec 18, 2018 · 6 comments

Comments

@antonbabenko
Copy link

Great project!

Unfortunately, it does not work for my use case where I want to use it for blue-green deployments via CodeDeploy with ECS services (as described here).

The error is like this:

/usr/local/bin/aws --output json ecs --region eu-central-1 update-service --cluster staging --service backend --task-definition arn:aws:ecs:eu-central-1:633306250246:task-definition/backend:4

An error occurred (InvalidParameterException) when calling the UpdateService operation: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Please use Code Deploy to trigger a new deployment.

The question is, whether it is possible and easily to extend this script to work for me or should I make my own script just for this?

Instead of aws ecs update-service the script should call aws ecs deploy like this:

aws ecs deploy \
          --cluster "$cluster" \
          --service "$service" \
          --task-definition "$TASK_DEF_FILENAME" \
          --codedeploy-appspec "$APPSPEC_FILENAME" \
          --codedeploy-application "$service" \
          --codedeploy-deployment-group "$service"
@antonbabenko
Copy link
Author

While waiting for the feedback here. I am sharing my script which does ECS blue-green deployments with CodeDeploy - https://gist.github.com/antonbabenko/632b54e8e488b9f48d016238792a9193

@maartenvanderhoef
Copy link

Great addition!

@rnegron
Copy link

rnegron commented Jan 23, 2020

Any chance this gets feedback soon? @fillup

@jfranzoi-gucci
Copy link

Hi @rnegron,
not sure you're still interested in this!

As part of this PR I've managed to introduce specific behaviours for individual deployment controllers, and provided support for EXTERNAL one, while CODE_DEPLOY is still unsupported. Please, consider if that's a good starting point and in case, you can find it already merged as part of my fork here.

@angelozignaltinho
Copy link

@jfranzoi-gucci does your yoke application support blue green deploys via code deploy?

@jfranzoi-gucci
Copy link

jfranzoi-gucci commented Jul 21, 2022

Hi @angelozignaltinho, no as I was sharing, ecs-deploy fork used by yoke has just been restructured in order to easily support multiple deployment controllers, and enriched to support not only ECS default one, but EXTERNAL one, for canary releases.

What I was mentioning to @rnegron is that, given that restructuring, it should be easier to add support for CODE_DEPLOY as well, starting from the snippet shared by @antonbabenko.

Hope it's clearer now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants