install the application? • How to test the application in consistent manner in all the environments? • How should we scale the application and in which conditions? • How to provide high availability?
orchestration service managed by AWS • Run Docker images from your self-hosted registry, Docker Hub or EC2 Container Registry (ECR) • Well integrated with Application Load Balancer • ECS is able to run Tasks and Services (long lived tasks) • ECS is free, you pay for the underlying resources
Docker image on ECR 3.Create an ECS cluster 4.Create a task definition 5.Create an Application Load Balancer and a Target Group 6.Create an ECS Service 7.Scale your cluster and your service
gives you the steps to execute: 1. Retrieve the docker login command that you can use to authenticate your Docker client to your registry: aws ecr get-login --no-include-email --region eu-west-1 2. Build your Docker image using the following command. For information on building a Docker file from scratch see the instructions here. You can skip this step if your image is already built: docker build -t talk-service . 3. After the build completes, tag your image so you can push the image to this repository: docker tag talk-service:latest 340754841610.dkr.ecr.eu-west- 1.amazonaws.com/talk-service:latest 4. Run the following command to push this image to your newly created AWS repository: docker push 340754841610.dkr.ecr.eu-west-1.amazonaws.com/talk-service:latest
Target Group 1. Create an ALB: • Listening on port 80 • VPC/subnets 2. Attach this ALB to a security group: • 0.0.0.0/0 and ::/0 on port 80 3. Allow the traffic from the ALB’s security group to the cluster’s security group 4. Create the target group for the application • Listening on port 80 • Configure health check (/health from Spring Boot)