Slide 1

Slide 1 text

Deploying Fargate services with CloudFormation

Slide 2

Slide 2 text

# whoami Omer Hamerman Devops IL github.com/omerxx omer@devops.co.il @omergsr

Slide 3

Slide 3 text

Why Architecture Handling scale Fargate

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Architecture https://github.com/awslabs/ecs-refarch-cloudformation CloudFormation VPC ECS + ALB CloudWatch Logs + Alerts

Slide 7

Slide 7 text

ECS Cluster

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Amazon ECS Launch Types An Amazon ECS launch type determines the type of infrastructure on which your tasks and services are hosted. Fargate EC2

Slide 10

Slide 10 text

Value of property RequiresCompatibilities must be of type List of String

Slide 11

Slide 11 text

> Fargate only supports network mode awsvpc > Fargate requires that the privileged setting be false at the container level > Fargate requires log configuration options to include awslogs-stream-prefix to support log driver awslogs > Fargate requires task definition to have execution role ARN to support log driver awslogs > Fargate requires that 'memory' be defined at the task level > No Fargate configuration exists for given values > The provided target group has target type instance, which is incompatible with the awsvpc network mode specified in the task definition > Network Configuration must be provided when networkMode 'awsvpc' is specified > You cannot specify an IAM role for services that require a service linked role > Placement strategies are not supported with FARGATE launch type > CannotPullContainerError: API error (500): Get https://000.dkr.ecr.us-east-1.amazonaws.com/v2/

Slide 12

Slide 12 text

awsvpc Amazon Elastic Container Service Service NetworkConfiguration: The only option

Slide 13

Slide 13 text

Open files as an example Pricing vs Buffer ~+35% OPTIONS=” — default-ulimit nofile=1024:4096"

Slide 14

Slide 14 text

blog.devopspro.co.uk http://bit.ly/2zg6cwU Deploying FARGATE services using CloudFormation The guide I wish I had

Slide 15

Slide 15 text

Reading materials and links https://github.com/omerxx/ecscale - Scaling ECS instances down autmatically https://blog.devopspro.co.uk/deploying-fargate-services-using-cloudformation-the-guide- i-wish-i-had-d89b6dc62303 - Migrating CloudFormation from EC2 to FARGATE https://github.com/awslabs/ecs-refarch-cloudformation - AWSLABS CloudFormation http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html

Slide 16

Slide 16 text

Omer Hamerman Devops IL github.com/omerxx omer@devops.co.il @omergsr blog.devopspro.co.uk medium.com/@omerxx