- Elastic : It is scalable and available in nature -- Increase the capacity
- Container : A pkg which container the application code and it's dependencies to run the application.
- Registry : Container Registry -- (Similary to DockerHub, Quay.io or GCR) -- Used to store the docker images
- Dockerhub -- It is public and free to use, we have options like public repos and private repos
- Dockerhub -- User have to register with their own account
- ECR -- It supports private repos, bydefault it will create private repo
- ECR -- IAM USERS integrate with ECR
- ECR -- Have good integration with other AWS services like EKS
- WE NEED AWS CLI installed in the system
- Link
https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html
- Click on Repo and click on view push commands
- ECR login usig AWS CLI - Similar to docker login using CLI
- NOTE : DOCKER SHUOLD BE INSTALLED BEFORE USING THIS
- and follow the commands to push
- Auto Scaling
- Auto Healing
ECS only for AWS
- ECS does not have all the features of KUBERNTES
- Kubernetes have Custom Resource Definiations -- Extend the capability of kubernetes
- Kubernetes -- we have use ingress controller + we have lot of controllers we can add to it
- Server - EC2
- Serverless - Forgate
- Simple architecture
- We have to create a CLUSTER on aws
- Fargate or EC2
- Task defination (Like pod)
- Task is one which is running the Container
- Once the containers are running we can add the SERVICE
- this SERVICE will add Load Balancer, Ingreee policies
- It have IAM
REF LINK 1 : https://github.com/pavankumar0077/aws-devops-zero-to-hero/tree/main/day-20 REF LINK 2 : https://github.com/pavankumar0077/aws-devops-zero-to-hero/tree/main/day-21 REF LINK3 : https://mrdevops.hashnode.dev/compare-amazon-ecs-vs-eks
Step 1:
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 794982227033.dkr.ecr.us-east-1.amazonaws.com
docker build -t 794982227033.dkr.ecr.us-east-1.amazonaws.com/demo-repo:latest .
sudo docker images
docker push 794982227033.dkr.ecr.us-east-1.amazonaws.com/demo-repo:latest
Step 2 : Click on Task Defination
-
Task role -- container wants to talk to any other service like cloudwatch or s3 etc
-
Remaining details are same
-
Create it
-
Task execution role -- Agent wants to talk with other services
-
Task execution -- integrate with cloudwatch