Git Product home page Git Product logo

aws-fargate-configuration's Introduction

AWS-Fargate-Configuration

Configuration of ECS Fargate starts from defining a Task. To define a Task with docker we need to dockerize the code base and need to upload to ECR.

Make Docker image

docker build -t <name> .

Tag the image

docker tag aws-rds-node-api:latest 9999999999999.dkr.ecr.us-east-1.amazonaws.com/aws-rds-node-api:latest

Retrive login passward for he repository

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 999999999999.dkr.ecr.us-east-1.amazonaws.com

Push the image to ECR

docker push 9999999999.dkr.ecr.us-east-1.amazonaws.com/aws-rds-node-api:latest

Docker-Image-Push-ECR

Now the image is ready in the ECR for deployment AWS-ECR-Image

Fargate Task Configuration There are two things need to do before start the Task Configuration. There must be Task Role. Other one is define production environment variables.

Create production.env I created S3 bucket to store production.env under the folder cssamlabs/lab-node-atlas-api/. Env-S3

Then create a Task Execution Role. I added RDSFullAccess since application needs to access RDS. ECS-Task-Execution-Role

There must be a policy to access S3 to read productio.env file. Access-S3-Env-Role

Now start configuring Task Definition Task-Definition-Configuration-1

Task-Definition-Configuration-2

Need to add a container Fargate-Container-add

Copy image name from ECR Port is map to 3040 where NodeJS application configured in Dockerfile.

Configure Production env in Environment Files section by giving the file's ARN Fargate-Env-S3-Add

Once create Task Definition is like Task Definition

Next step is to create Fargate Cluster Configured Cluster is Lab-Cluster

Create a Container Service A Service Name needed. Select the Cluster created above. Fargate-Service-Create

Select the VPC and Subnects. Usually it creates new Security Group. Fargate-Service-Configuration

Load Balancing Fargate-service-ALB

Port Configuration Fargate-Service-ALB-Ports

Fargate Service Configured Labs - Fargate Service

Now Creating a Task from Task Definition could carryout. Task running in Fargate Service Fargate-Service-Running

Task

aws-fargate-configuration's People

Contributors

cssam 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.