DEV Community

Revathi Joshi for AWS Community Builders

Posted on

6-part series - (3) Create Fargate Cluster, and a Service which can access customized Docker image

In this 6-part series on configuring a CI/CD pipeline using Customized Docker image on an Apache Web Server, Application Load Balancer, ECS, ECR, CodeCommit, CodeBuild, CodeDeply services -

In the 3rd article, We will create Fargate Cluster, and a Service which access customized Docker image

1st article

2nd article

Let’s get started!

Please visit my GitHub Repository for CI-CD/Docker/ECS/ECR articles on various topics being updated on constant basis.

Objectives:

1. Create Cluster

2. Create service

3. Edit and Check LB Security groups

4. Test the DNS - Access the image from the web browser

Pre-requisites:

  • AWS user account with admin access, not a root account.
  • AWS CLI.

Resources Used:

Amazon Elastic Container Service

AWS Fargate

Steps for implementation to this project:

1. Create Cluster

  • On Elastic Container Service, Clusters, Create Cluster, my_cluster, default vpc, 2 Public subnets - us-east-1a and us-east-1b

  • Create

Image description

2. Create service

  • On Amazon Elastic Container Service, click my_cluster, Under Services, click Create, my_cluster is already selected, Launch_type, FARGATE, Platform version - LATEST, Service, Family - my_task REVISION - (2) LATEST, my_service, Desired tasks, 2, under Networking, default vpc, choose 2 Public subnets us-east-1a and us-east-1b, use an existing sg - defaultSG, Public IP - turnend on

  • Load balancing, Application LB, use an existing lb, my-alb, my_container 80:80, use an existing listener, listener, 80:HTTP
    create a new target group, new-tg, HTTP, Path pattern - /*, evaluation order - 1, Health check path - /, ch ek protocol - HTTP, time - 30 sec

  • Create

2 Tasks Running

Image description

3. Edit and Check LB Security groups

  • Load Balancer Security Groups

Image description

4. Test the DNS - Access the image from the web browser

-Copy the load balancer DNS name and paste it in the browser tab.

You should be able to see the HTML page

Image description

What we have done so far

  • We have successfully created a Fargate Cluster, and a Service which access customized Docker image from the browser.

Top comments (0)