DevOps(Day-62) :Amazon Elastic Container Service(ECS) - Part2
TABLE OF CONTENTS
What is ECS?
Task: Set up ECS by setting up Nginx on ECS.
What is ECS?
ECS (Elastic Container Service) is a fully-managed container orchestration service provided by Amazon Web Services (AWS). It allows you to run and manage Docker containers on a cluster of virtual machines (EC2 instances) without having to manage the underlying infrastructure.
With ECS, you can easily deploy, manage, and scale your containerized applications using the AWS Management Console, the AWS CLI, or the API. ECS supports both "Fargate" and "EC2 launch types", which means you can run your containers on AWS-managed infrastructure or your own EC2 instances.
ECS also integrates with other AWS services, such as Elastic Load Balancing, Auto Scaling, and Amazon VPC, allowing you to build scalable and highly available applications. Additionally, ECS has support for Docker Compose and Kubernetes, making it easy to adopt existing container workflows.
Overall, ECS is a powerful and flexible container orchestration service that can help simplify the deployment and management of containerized applications in AWS.
- Create Task definition
In order to run the cluster we need to create a task. Navigate to task defination.
Go to the public Elastic Container Repository(ECR) gallery.ecr.aws to copy the NGINX image url.
In the task, provide the Nginx image details along with port mappings for the image.
Provide the CPU and Memory according to the requirement.
Review and create the task.
The task is now created.
- Create a service.
We need to create a service in the Cluster. So navigate to the cluster created and go to the service section to create a service.
Use the default settings.
Choose the Family to specify the task that was already created with the particular version if you had created multiple same tasks previously.
Choose the security group and ensure the security group have port 80 opened. Else you can also create a new security group instantly and open the HTTP port.
Now service is created.
Navigate to cluster and choose the task.
Copy the Public Ip to access the URL.
Now, the NGINX page is live.
Thanks for reading my article. Have a nice day.
Comments
Post a Comment