Published: Tuesday, Jul 19, 2016 Last modified: Monday, May 27, 2024

Biggest tip use ecs-cli

This helps setup the instances, setup the tasks via docker-compose.yml and scale it!!

Example ecs-cli usage log where I setup a cluster in Oregon for

With the Amazon AMI who keeps the host machine uptodate?

~$ ssh ec2-user@

   __|  __|  __|
	  _|  (   \__ \   Amazon ECS-Optimized Amazon Linux AMI 2016.03.e

	   For documentation visit,
	   No packages needed for security; 3 packages available
	   Run "sudo yum update" to apply all updates.
	   [ec2-user@ip-172-30-0-233 ~]$ docker ps

Should I be using CoreOS?

Tip: to debug look at the events log

Here I later found my ELB was in the wrong VPC with “HTTP/1.1 503 Service Unavailable: Back-end server is at capacity”.

Tip: Be careful when setting up the EC2

You need to ensure you have right EC2 Role for ECS for a start!

Follow carefully!

Or just use ecs-cli up --capability-iam to avoid these problem space.

What log driver should I be using to get into Kibana?


What does CPU unit and memory supposed to mean?

I thought one good thing about containers is that they can share all the memory of the host!

Port mappings are kinda confusing

You map ELB front end ports to the instance ports effectively.

(service service-name) (instance instance-id) is unhealthy in (elb elb-name) due to (reason Instance has failed at least the UnhealthyThreshold number of health checks consecutively.)

Your health check is probably pointing to port 80 when you should be checking the port of your container!

What is the developer work flow? suggests ecs-cli compose service up

I realise one could run Service Update to deliver an update. However after pushing changes back to Github, how does a developer deploy to the service themselves?

Setting environment up

Sharing environment values between clusters seems pretty hard:

My question RE more env variables: &

How does one actually scale?

Because scaling ECS services is much faster than scaling an ECS cluster (of
EC2 instances), we recommend keeping the ECS cluster scaling alarm more
responsive than the ECS service alarm.

NOTICE CPUReservation and CPUUtilization alarms.

ECS scaling alarms

NOTICE EC2 autoscaling & Service autoscaling ARE NOT THE SAME!!

ECS alarm

What are my Resources? What is my memory limit?