I've set up pipeline which talks to ECS and spins EC2Spot instance. Getting stuck on following message

PRIMARY  task ******:5 - runningCount = 0 , desiredCount = 1,  pendingCount = 0

Which basically means that I'm waiting for task to start, but something is off in a set up and it never gets started. Any suggestions on where to look?

Note:

  1. This is a testing app which spins up a browser so no ports required

  2. No load balancer

  3. Possibly quay.io integration miss, but cant figure out with no logs

  4. CloudTrail log is empty with only success messaged upon taskDefinition create and update

Thanks

1

There are 1 answers

0
Sergio13 On

About 8 hours of hammering head of the wall and this issue was solved.

Long time ago, by this fella - https://stackoverflow.com/a/36533601/5332494

Steps that It took me to figure it out.

  1. Look in the CloudTrail => Event history => Even name column(UpdateService) => click on View event => Find error message(was unable to place a task because no container instance met all of its requirements. Reason: No Container Instances were found in your cluster. For more information, see the Troubleshooting section of the Amazon ECS Developer Guide) there which will take you to https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-event-messages.html#service-event-messages-1

  2. Page in a link above specifies possible issues you are having if you got same message as I(see step 1). First option on that page:

No container instances were found in your cluster

took me to https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html

  1. That's where I've added docker instance to my ecs cluster and finally was able to add ec2 Spot instance through codefresh pipeline talking to ecs.

Notes: Ecs had to talk to QUAY.io to pull docker image from their private registry. And all I had to do is create secret in AWS secret manager with default following format

{ "username": "your-Quay-Username",
  "password": "your-Quay-password"
}

That's it :)