Open nam20485 opened 5 years ago
@MikeTheCanuck @DingoEatingFuzz @BrianHGrant
Looks to me like a problem in the script’s code - “unary operator” - and might be the same problem as here:
The unary operator lines may be red herrings. Looks like it's failing in the getTaskDefinition
function.
The first thing that function is trying to do is look up the ECS service definition and task definition. Neither of which exist yet.
Even though the ECR repo was created, the ECS service and task were not, and all three need to be in place before we can expect CI/CD to work.
The way we handled this last year was to "bootstrap" services by deploying them to prod with an expected task count of 0. This way the metadata was in place, but no resources were scheduled.
Alright, that’ll be my next task, hopefully tomorrow depending on how the yard project goes.
I think it's also worth taking a stab at updating the deploy script to be resilient in this scenario. It could check if the service/task exists and if it doesn't, still push the new images to ECR and warn about there being no service to restart. Something like...
$ ./deploy.sh
...
Tagging image latest
Pushing to ECR...
Restarting service in ECS...
WARNING: Service <service_name> not found. Exiting early
This might make it easier to get things up and running incrementally.
I think it's also worth taking a stab at updating the deploy script to be resilient in this scenario. It could check if the service/task exists and if it doesn't, still push the new images to ECR and warn about there being no service to restart. Something like...
$ ./deploy.sh ... Tagging image latest Pushing to ECR...
Restarting service in ECS... WARNING: Service
not found. Exiting early This might make it easier to get things up and running incrementally.
OK I can make these changes.
Description of problem
Deployment of docker image to ECS infrastructure fails, producing the following output:
This is the result of the execution of following line:
https://github.com/hackoregon/deploy-scripts/blob/5165d85c8a80a1a67d666f9255bc1a56db311896/bin/ecs-deploy.sh#L144
From the log of the deployment here: https://travis-ci.org/hackoregon/2019-sandbox-backend/jobs/554900654
Steps to Reproduce the Problem
Where x is the next version of release that is listed here: https://github.com/hackoregon/2019-sandbox-backend/releases. e.g. If the latest release listed is 1.52, use x = 1.53
Expected Behavior
ECS deploy and travis build succeeds
Actual Behavior
ECS deploy and travis build fails with the above-listed output
Logs/Screenshots
See above
Related Code
See above
Any idea of problem? What to do to fix?
Probably has to do with the SSM parameters needing to be set.