New ECS Instance registration with ECS cluster Using CMD and Console

vaibhavi_shah - Jan 25 '22 - - Dev Community

Amazon ECS makes it easy to deploy, manage, and scale Docker containers running applications, services, and batch processes. Amazon ECS places containers across your cluster based on your resource needs and is integrated with familiar features like Elastic Load Balancing, EC2 security groups, EBS volumes and IAM roles

Step-1: Go to the ecs service and click on the cluster.

Createe cluster

Step-2: select the create cluster option and select Ec2 linux + networking

Select clster type

Step-3: configure the details as below

Configure the cluster

Step-4: Cluster is createed as below.

Cluster is created succesfully

Step-5: Go to the view cluster.

Cluster is created

Step-6: Go to the ECS-Instances

As per the ECS configuration, Auto scalling group is created and one ECS instance is launched from Autoscalling group.

ECS-instance created

Step-7: Move to the Launch configuration of autoscalling group.

ECS launch configuaration

Step-8: Under the details tab view the userdata script.

Userdata script

Variable ECS_CLUSTER attach the ecs-instance to the define cluster.

Step-9: ssh into the created instance

SSH using private key

Step-10: View ecs.config file for the configuration. Path for file is /etc/ecs/ecs.config

ecs.config

It is very useful when we work with multi cluster environment.

These is done by docker agent.

For verify these follow the below steps.

Step-11: Run the Docker ps command which gives the whole information.

docker ps

Registration details can be also find from docker log as below.

Step-12: Docker Log

Command for docker log

docker logs container-id

Docker log

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player