Giter Club home page Giter Club logo

ecs-fargate's Introduction

Deploy an Web Application to Amazon ECS with EC2, Docker, ECR, Load balancer, Fargate

image

ELASTIC CONTAINER SERVICE

Amazon Elastic Container Service (ECS), also known as Amazon EC2 Container Service, is a managed service that allows users to run Docker-based applications packaged as containers across a cluster of EC2 instances. Running simple containers on a single EC2 instance is simple but running these applications on a cluster of instances and managing the cluster is being administratively heavy process. With ECS, Fargate launch type, the load, and responsibility of managing the EC2 cluster is transferred over to the AWS and you can focus on application development rather than management of your cluster architecture.

FARGATE

Is the AWS service that allows ECS to run containers without having to manage and provision the resources required for running these applications.

ECS : Elastic Container Service

a) Pas : Services to run container

b) Works as a pay as you go model

c) Services in AWS to run container at scale

--> ECS can be operated in 2 ways:

  1. EC2 Launch type (Manage your own server)

  2. Serverless (Fargate)

Resources required for this project :

EC2 | DOCKER | ECR | ECS | FARGATE | APPLICATION LOAD BALANCER

EXECUTION STEPS :

STEP 1 : Lauch EC2 instance, install Docker, Build dockerimage .

image

STEP 2 :

Creating ECR in Linux OR Windows

image

Login to ECR

            aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/i2d4i5f8

Tag existing image as AWS ECR repo

            docker tag myecr-repo:latest public.ecr.aws/i2d4i5f8/myecr-repo:latest

image

Push image into ECR

          docker push public.ecr.aws/i2d4i5f8/myecr-repo:latest

image

STEPS 3 :

Creating Application Load Balancer

image

STEP 4 :

Create Task Definition

Task : It is blue print, which describes how to lauch the AWS container.

task def

Create AWS ECS cluster

cluster

Creating Services

service

Steps 5 :

VALIDATION

image

STEP 6:

Set Up Auto Scaling (Optional): Configure auto-scaling for your ECS service to automatically adjust the number of tasks based on metrics such as CPU or memory utilization.

Monitor and Test: Monitor your ECS cluster and application performance using CloudWatch metrics and logs. Test your application to ensure it’s working as expected.

Conclusion:

Deploying web applications on Amazon ECS streamlines the process using containerization technology. By following these key steps and leveraging AWS services like EC2, Docker, ECR, Load Balancer, and Fargate, you can achieve scalable, reliable, and efficient deployment of your web applications on AWS.

ecs-fargate's People

Contributors

rangurahul avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.