ecs-deploy
ecs-deploy copied to clipboard
Support ECS deploy with CodeDeploy
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"
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
Great addition!
Any chance this gets feedback soon? @fillup
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.
@jfranzoi-gucci does your yoke application support blue green deploys via code deploy?
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.