Add ECS Service redeploy command to Makefile#24
Conversation
This adds `make` commands to easily redeploy the quepid service after a new conatainer is pushed to ECR. There is one command each for dev, stage, and prod.
JPrevost
left a comment
There was a problem hiding this comment.
make service-redeploy-dev
aws ecs update-service
--cluster $(aws ecs list-clusters --output text | grep quepid-ecs-dev | cut -d'/' -f2)
--service
--force-new-deployment
An error occurred (AccessDeniedException) when calling the UpdateService operation: User: arn:aws:sts::[REDACTED]:assumed-role/AWSReservedSSO_QuepidManagers_[REDACTED] is not authorized to perform: ecs:UpdateService on resource: arn:aws:ecs:us-east-1:REDACTED:service/quepid-ecs-dev-cluster/quepid-ecs-dev because no identity-based policy allows the ecs:UpdateService action
I updated the IAM policy for the QuepidManagers role to address this (and ran a quick test of my own). Can you retest the make command yourself? If it all works, I'll need to push through this small policy change via the infrastructure repo before the See https://github.com/MITLibraries/mitlib-tf-workloads-quepid/pull/11 |
JPrevost
left a comment
There was a problem hiding this comment.
This works with the policy you now have in dev1.
Description
This adds three (3)
makecommands to easily redeploy the quepid Fargate service after a new container is pushed to ECR. There is one command for each environment (dev, stage, prod) and it is required that the developer authenticates to the appropriate AWS account before running the command.Additionally, the Makefile was updated to include a
helptarget and to include all the listed targets in thePHONYlist.Motivation and Context
This simplifies the effort for DiscoEng when then need to redeploy the Fargate service in ECS to pick up an updated environment variable.
How Has This Been Tested?
make service-redeploy-devredeployed the service in Dev1 if I was already authenticated to Dev1.make service-redeploy-stagefailed when I was authenticated to Dev1make service redeploy-prodfailed when I was authenticated to Dev1make service-redeploy-devfailed when I was authenticated to StageScreenshots or GIFs (if appropriate):
Types of changes
Checklist: