SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Mythical Mysfits: Monolith to Microservice
with Docker and AWS Fargate
Ed Chan
Solutions Architect
AWS
C O N 2 1 4
Andy Mui
Solutions Architect
AWS
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Related Breakouts
Tuesday, Nov 27*
CON321-R1: Mythical Mysfits: DevSecOps with Docker and AWS Fargate
12:15pm – 2:30pm | MGM, Level 3, Premier Ballroom 320
Wednesday, Nov 28**
CON322-R: Mythical Mysfits: Management and Ops with AWS Fargate
11:30am – 1:45pm | Mirage, Mirage Event Center C1
* Repeat session if full – CON321-R2
** Repeat session if full – CON322-R1
See session catalog for times and locations.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
Containers and Docker
Amazon Elastic Container Service (Amazon ECS)
AWS Fargate
Monolith to Microservices
Hands-on Lab
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers and Docker
A container is a standard unit of software that packages up code and all
its dependencies so the application runs quickly and reliably from one
computing environment to another.1
1 https://www.docker.com/resources/what-container
Server
Operating System
Docker Engine
AppA
AppB
AppC
AppD
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Docker Architecture
Docker daemon manages images, containers,
networks, and volumes
Docker CLI communicates with Docker daemon
through a REST API
Sample commands:
docker build – build image from Dockerfile
docker images – list images on Docker host
docker run – run an image
docker ps – list running containers
docker stop – stop a running container
Docker daemon /
REST API
Docker Host
Container 1
Container 2
Container n
Ubuntu Image
Nginx Image
Custom Image
Docker Client
Docker Registry
Docker
Hub
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Docker Image
Read-only template
Used to launch container
Start with base image, additional data or
dependencies added as layers
Union file system merges layers into
single image
Instructions documented in Dockerfile
kernel
Base Image
Image layer
Image layer
Image layer
References
parent image
layer
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Dockerfile
FROM dockerfile/ubuntu
RUN 
add-apt-repository -y ppa:nginx/stable && 
apt-get update && 
apt-get install -y nginx && 
rm -rf /var/lib/apt/lists/* && 
echo "ndaemon off;" >> /etc/nginx/nginx.conf && 
chown -R www-data:www-data /var/lib/nginx
VOLUME ["/etc/nginx/sites-enabled",
"/etc/nginx/conf.d", "/var/log/nginx",
"/var/www/html"]
WORKDIR /etc/nginx
CMD ["nginx"]
EXPOSE 80
Pull base image
Install Nginx
Define mountable
directories
Define working
directory
Define default
command
Expose ports
yourimage:1.0.0
9c9e81692ae9
02071fceb21b
b35224abf821
fbc63d321d73
8c2e06607696
E7829950cee3
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS and AWS Fargate
Scheduling and Orchestration
Cluster Manager Placement Engine
Availability Zone 1 Availability Zone 2 Availability Zone 3
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
Container 1 Container 1
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS Constructs
Cluster
• Resource grouping and isolation
• IAM permissions boundary
Service
• Maintains desired # of
running tasks
• Replaces unhealthy tasks
• ELB integration
Task
• Running instance of a task
definition
• One or more containers
Task Definition
• Template used by Amazon ECS
to launch tasks
• Parallels to docker run
parameters
• Defines requirements – e.g.
• CPU/Memory
• Container image(s)
• Logging
• IAM role
Container 1
Container 1
Container 1
Container 1Container 1
{ ; }
JSON
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Task Definition
{
"containerDefinitions": [
{
"memory": 128,
"portMappings": [
{
"hostPort": 80,
"containerPort": 80,
"protocol": "tcp"
}
],
"essential": true,
"name": "nginx-container",
"image": "nginx",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "ecs-log-streaming",
"awslogs-region": "us-west-2",
"awslogs-stream-prefix": "fargate-task-1"
}
},
"cpu": 0
}
],
…continued…
"networkMode": "awsvpc",
"executionRoleArn":
"arn:aws:iam::123456789012:role/ecsTaskExecutionRole",
"memory": "2048",
"cpu": "1024",
"requiresCompatibilities": [
"FARGATE"
],
"family": "example_task_1"
}
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservices
“A software architecture style in which complex applications are
composed of small, independent processes communicating with each
other using language-agnostic APIs. These services are small, highly
decoupled and focus on doing a small task, facilitating a modular
approach to system-building.” –Wikipedia
Further reading:
https://martinfowler.com/articles/microservices.html
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monolith to Microservices
https://www.martinfowler.com/bliki/StranglerApplication.html
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Hands-on Lab
www.mythicalmysfits.com
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Our mission: Ethical, mythical creature care.
Our priority: Find homes for the abandoned, and often misunderstood, mythical creatures in our
community.
Help us find their forever homes!
Your mission: Modernize and innovate on the Mythical stack.
Lab 1: Containerize the monolithic application
Lab 2: Deploy containers using AWS Fargate
Lab 3: Scale and lay the foundation for microservices with an AWS Application Load Balancer (ALB)
Lab 4: Our developers completed Project Cuddle which adds a “like” feature to the application. Since we
want to move to a microservices design, help us break this functionality from the monolith and deploy it
with AWS Fargate as its own containerized microservice.
Welcome to Mythical Mysfits
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lab 1: Build/Test Monolith Docker Image
VPC
AWS Cloud
Public subnet Private subnet
users
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lab 2: Deploy with Fargate
VPC
AWS Cloud
Public subnet Private subnet
users
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lab 3: Scale with ALB
VPC
AWS Cloud
Private subnet Private subnet
users
/
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Lab 4: Deploy ”Like” Microservice
VPC
AWS Cloud
Private subnet Private subnet
users
/ + /fulfill-like
/like
/fulfill-like
/fulfill-like
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Instructions:
http://www.mythicalmysfits.com/fargate
Raise your hand if you have any questions. Feel free to work together with folks at
your table. Near the end, we’ll hand out AWS credit codes to cover costs for the
workshop.
High-five your neighbors and have fun! Please fill out feedback forms and follow
the clean-up instructions once you are done!
Email us with comments/questions/feedback:
aws-mythical-mysfits@amazon.com
Logistics
Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.

Mais conteúdo relacionado

Mais procurados

Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Amazon Web Services
 
使用 AWS 無伺服器化應用程式模型 (SAM) 釋放您的 "敏捷" 能量 (Level 300)
使用 AWS 無伺服器化應用程式模型 (SAM) 釋放您的 "敏捷" 能量 (Level 300)使用 AWS 無伺服器化應用程式模型 (SAM) 釋放您的 "敏捷" 能量 (Level 300)
使用 AWS 無伺服器化應用程式模型 (SAM) 釋放您的 "敏捷" 能量 (Level 300)Amazon Web Services
 
Mythical Mysfits: Management and Ops with AWS Fargate (CON322-R1) - AWS re:In...
Mythical Mysfits: Management and Ops with AWS Fargate (CON322-R1) - AWS re:In...Mythical Mysfits: Management and Ops with AWS Fargate (CON322-R1) - AWS re:In...
Mythical Mysfits: Management and Ops with AWS Fargate (CON322-R1) - AWS re:In...Amazon Web Services
 
Making Hybrid Work for You: Getting into the Cloud Fast (GPSTEC308) - AWS re:...
Making Hybrid Work for You: Getting into the Cloud Fast (GPSTEC308) - AWS re:...Making Hybrid Work for You: Getting into the Cloud Fast (GPSTEC308) - AWS re:...
Making Hybrid Work for You: Getting into the Cloud Fast (GPSTEC308) - AWS re:...Amazon Web Services
 
Best Practices for Using AWS Lambda with RDS/RDBMS Solutions (SRV301-R1) - AW...
Best Practices for Using AWS Lambda with RDS/RDBMS Solutions (SRV301-R1) - AW...Best Practices for Using AWS Lambda with RDS/RDBMS Solutions (SRV301-R1) - AW...
Best Practices for Using AWS Lambda with RDS/RDBMS Solutions (SRV301-R1) - AW...Amazon Web Services
 
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...Amazon Web Services
 
Enterprise DevOps: Patterns of Efficiency (ENT311-R1) - AWS re:Invent 2018
Enterprise DevOps: Patterns of Efficiency (ENT311-R1) - AWS re:Invent 2018Enterprise DevOps: Patterns of Efficiency (ENT311-R1) - AWS re:Invent 2018
Enterprise DevOps: Patterns of Efficiency (ENT311-R1) - AWS re:Invent 2018Amazon Web Services
 
Instrumenting Applications for Observability Using AWS X-Ray (DEV402-R2) - AW...
Instrumenting Applications for Observability Using AWS X-Ray (DEV402-R2) - AW...Instrumenting Applications for Observability Using AWS X-Ray (DEV402-R2) - AW...
Instrumenting Applications for Observability Using AWS X-Ray (DEV402-R2) - AW...Amazon Web Services
 
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018Amazon Web Services
 
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018Amazon Web Services
 
善用 GraphQL 與 AWS AppSync 讓您的 Progressive Web App (PWA) 加速進化 (Level 200)
善用  GraphQL 與 AWS AppSync 讓您的  Progressive Web App (PWA) 加速進化 (Level 200)善用  GraphQL 與 AWS AppSync 讓您的  Progressive Web App (PWA) 加速進化 (Level 200)
善用 GraphQL 與 AWS AppSync 讓您的 Progressive Web App (PWA) 加速進化 (Level 200)Amazon Web Services
 
Breaking Containers: Chaos Engineering for Modern Applications on AWS (CON310...
Breaking Containers: Chaos Engineering for Modern Applications on AWS (CON310...Breaking Containers: Chaos Engineering for Modern Applications on AWS (CON310...
Breaking Containers: Chaos Engineering for Modern Applications on AWS (CON310...Amazon Web Services
 
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018Amazon Web Services
 
Moving to DevOps the Amazon Way (DEV210-R1) - AWS re:Invent 2018
Moving to DevOps the Amazon Way (DEV210-R1) - AWS re:Invent 2018Moving to DevOps the Amazon Way (DEV210-R1) - AWS re:Invent 2018
Moving to DevOps the Amazon Way (DEV210-R1) - AWS re:Invent 2018Amazon Web Services
 
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018Amazon Web Services
 
Driving DevOps Transformation in Enterprises (DEV320) - AWS re:Invent 2018
Driving DevOps Transformation in Enterprises (DEV320) - AWS re:Invent 2018Driving DevOps Transformation in Enterprises (DEV320) - AWS re:Invent 2018
Driving DevOps Transformation in Enterprises (DEV320) - AWS re:Invent 2018Amazon Web Services
 
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...Amazon Web Services
 
Announcing AWS RoboMaker: A New Cloud Robotics Service (ROB201-R) - AWS re:In...
Announcing AWS RoboMaker: A New Cloud Robotics Service (ROB201-R) - AWS re:In...Announcing AWS RoboMaker: A New Cloud Robotics Service (ROB201-R) - AWS re:In...
Announcing AWS RoboMaker: A New Cloud Robotics Service (ROB201-R) - AWS re:In...Amazon Web Services
 
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018Amazon Web Services
 
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...Amazon Web Services
 

Mais procurados (20)

Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
Driving Innovation with Serverless Applications (GPSBUS212) - AWS re:Invent 2018
 
使用 AWS 無伺服器化應用程式模型 (SAM) 釋放您的 "敏捷" 能量 (Level 300)
使用 AWS 無伺服器化應用程式模型 (SAM) 釋放您的 "敏捷" 能量 (Level 300)使用 AWS 無伺服器化應用程式模型 (SAM) 釋放您的 "敏捷" 能量 (Level 300)
使用 AWS 無伺服器化應用程式模型 (SAM) 釋放您的 "敏捷" 能量 (Level 300)
 
Mythical Mysfits: Management and Ops with AWS Fargate (CON322-R1) - AWS re:In...
Mythical Mysfits: Management and Ops with AWS Fargate (CON322-R1) - AWS re:In...Mythical Mysfits: Management and Ops with AWS Fargate (CON322-R1) - AWS re:In...
Mythical Mysfits: Management and Ops with AWS Fargate (CON322-R1) - AWS re:In...
 
Making Hybrid Work for You: Getting into the Cloud Fast (GPSTEC308) - AWS re:...
Making Hybrid Work for You: Getting into the Cloud Fast (GPSTEC308) - AWS re:...Making Hybrid Work for You: Getting into the Cloud Fast (GPSTEC308) - AWS re:...
Making Hybrid Work for You: Getting into the Cloud Fast (GPSTEC308) - AWS re:...
 
Best Practices for Using AWS Lambda with RDS/RDBMS Solutions (SRV301-R1) - AW...
Best Practices for Using AWS Lambda with RDS/RDBMS Solutions (SRV301-R1) - AW...Best Practices for Using AWS Lambda with RDS/RDBMS Solutions (SRV301-R1) - AW...
Best Practices for Using AWS Lambda with RDS/RDBMS Solutions (SRV301-R1) - AW...
 
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
 
Enterprise DevOps: Patterns of Efficiency (ENT311-R1) - AWS re:Invent 2018
Enterprise DevOps: Patterns of Efficiency (ENT311-R1) - AWS re:Invent 2018Enterprise DevOps: Patterns of Efficiency (ENT311-R1) - AWS re:Invent 2018
Enterprise DevOps: Patterns of Efficiency (ENT311-R1) - AWS re:Invent 2018
 
Instrumenting Applications for Observability Using AWS X-Ray (DEV402-R2) - AW...
Instrumenting Applications for Observability Using AWS X-Ray (DEV402-R2) - AW...Instrumenting Applications for Observability Using AWS X-Ray (DEV402-R2) - AW...
Instrumenting Applications for Observability Using AWS X-Ray (DEV402-R2) - AW...
 
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
Running Kubernetes Across Multiple AWS Accounts (CON409) - AWS re:Invent 2018
 
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
Machine Learning at the IoT Edge (IOT214) - AWS re:Invent 2018
 
善用 GraphQL 與 AWS AppSync 讓您的 Progressive Web App (PWA) 加速進化 (Level 200)
善用  GraphQL 與 AWS AppSync 讓您的  Progressive Web App (PWA) 加速進化 (Level 200)善用  GraphQL 與 AWS AppSync 讓您的  Progressive Web App (PWA) 加速進化 (Level 200)
善用 GraphQL 與 AWS AppSync 讓您的 Progressive Web App (PWA) 加速進化 (Level 200)
 
Breaking Containers: Chaos Engineering for Modern Applications on AWS (CON310...
Breaking Containers: Chaos Engineering for Modern Applications on AWS (CON310...Breaking Containers: Chaos Engineering for Modern Applications on AWS (CON310...
Breaking Containers: Chaos Engineering for Modern Applications on AWS (CON310...
 
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
Operations for Containerized Applications (CON334-R1) - AWS re:Invent 2018
 
Moving to DevOps the Amazon Way (DEV210-R1) - AWS re:Invent 2018
Moving to DevOps the Amazon Way (DEV210-R1) - AWS re:Invent 2018Moving to DevOps the Amazon Way (DEV210-R1) - AWS re:Invent 2018
Moving to DevOps the Amazon Way (DEV210-R1) - AWS re:Invent 2018
 
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
Continuous Integration Best Practices (DEV319-R1) - AWS re:Invent 2018
 
Driving DevOps Transformation in Enterprises (DEV320) - AWS re:Invent 2018
Driving DevOps Transformation in Enterprises (DEV320) - AWS re:Invent 2018Driving DevOps Transformation in Enterprises (DEV320) - AWS re:Invent 2018
Driving DevOps Transformation in Enterprises (DEV320) - AWS re:Invent 2018
 
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
Hands-On: Automating AWS Infrastructure with PowerShell (WIN308) - AWS re:Inv...
 
Announcing AWS RoboMaker: A New Cloud Robotics Service (ROB201-R) - AWS re:In...
Announcing AWS RoboMaker: A New Cloud Robotics Service (ROB201-R) - AWS re:In...Announcing AWS RoboMaker: A New Cloud Robotics Service (ROB201-R) - AWS re:In...
Announcing AWS RoboMaker: A New Cloud Robotics Service (ROB201-R) - AWS re:In...
 
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
Developing Well-Architected Android Apps with AWS (MOB302) - AWS re:Invent 2018
 
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
Building PaaS with Amazon EKS for the Large-Scale, Highly Regulated Enterpris...
 

Semelhante a Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON214-R1) - AWS re:Invent 2018

Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Amazon Web Services
 
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...Amazon Web Services
 
Workshop Interstella GTC - Tiffany Jernigan.pdf
Workshop Interstella GTC - Tiffany Jernigan.pdfWorkshop Interstella GTC - Tiffany Jernigan.pdf
Workshop Interstella GTC - Tiffany Jernigan.pdfAmazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 
SRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS FargateSRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS FargateAmazon Web Services
 
Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK Amazon Web Services
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWSDevOps.com
 
Containerizing Legacy .NET Workloads (CON348-R1) - AWS re:Invent 2018
Containerizing Legacy .NET Workloads (CON348-R1) - AWS re:Invent 2018Containerizing Legacy .NET Workloads (CON348-R1) - AWS re:Invent 2018
Containerizing Legacy .NET Workloads (CON348-R1) - AWS re:Invent 2018Amazon Web Services
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfAmazon Web Services
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfAmazon Web Services
 
Interstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSInterstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSAmazon Web Services
 
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018Amazon Web Services
 
Introduction To Containers - Builders Day Israel
Introduction To Containers - Builders Day IsraelIntroduction To Containers - Builders Day Israel
Introduction To Containers - Builders Day IsraelAmazon Web Services
 
Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveAmazon Web Services
 
Building Secure Services using Containers
Building Secure Services using ContainersBuilding Secure Services using Containers
Building Secure Services using ContainersAmazon Web Services
 
Introducing AWS Fargate - AWS Online Tech Talks
Introducing AWS Fargate - AWS Online Tech TalksIntroducing AWS Fargate - AWS Online Tech Talks
Introducing AWS Fargate - AWS Online Tech TalksAmazon Web Services
 

Semelhante a Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON214-R1) - AWS re:Invent 2018 (20)

Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
 
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
 
Workshop Interstella GTC - Tiffany Jernigan.pdf
Workshop Interstella GTC - Tiffany Jernigan.pdfWorkshop Interstella GTC - Tiffany Jernigan.pdf
Workshop Interstella GTC - Tiffany Jernigan.pdf
 
Interstella GTC Workshop
Interstella GTC WorkshopInterstella GTC Workshop
Interstella GTC Workshop
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 
SRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS FargateSRV314 Containerized App Development with AWS Fargate
SRV314 Containerized App Development with AWS Fargate
 
Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK Building Serverless Container Applications using AWS Fargate and CDK
Building Serverless Container Applications using AWS Fargate and CDK
 
From Docker Straight to AWS
From Docker Straight to AWSFrom Docker Straight to AWS
From Docker Straight to AWS
 
Containerizing Legacy .NET Workloads (CON348-R1) - AWS re:Invent 2018
Containerizing Legacy .NET Workloads (CON348-R1) - AWS re:Invent 2018Containerizing Legacy .NET Workloads (CON348-R1) - AWS re:Invent 2018
Containerizing Legacy .NET Workloads (CON348-R1) - AWS re:Invent 2018
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
Interstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSInterstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECS
 
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
Deploying Microservices using AWS Fargate (CON315-R1) - AWS re:Invent 2018
 
Introduction To Containers - Builders Day Israel
Introduction To Containers - Builders Day IsraelIntroduction To Containers - Builders Day Israel
Introduction To Containers - Builders Day Israel
 
Deep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep DiveDeep dive ECS & Fargate Deep Dive
Deep dive ECS & Fargate Deep Dive
 
Csa container-security-in-aws-dw
Csa container-security-in-aws-dwCsa container-security-in-aws-dw
Csa container-security-in-aws-dw
 
Building Secure Services using Containers
Building Secure Services using ContainersBuilding Secure Services using Containers
Building Secure Services using Containers
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
Introducing AWS Fargate
Introducing AWS FargateIntroducing AWS Fargate
Introducing AWS Fargate
 
Introducing AWS Fargate - AWS Online Tech Talks
Introducing AWS Fargate - AWS Online Tech TalksIntroducing AWS Fargate - AWS Online Tech Talks
Introducing AWS Fargate - AWS Online Tech Talks
 

Mais de Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSAmazon Web Services
 

Mais de Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Come costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWSCome costruire un'architettura Serverless nel Cloud AWS
Come costruire un'architettura Serverless nel Cloud AWS
 

Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON214-R1) - AWS re:Invent 2018

  • 1.
  • 2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate Ed Chan Solutions Architect AWS C O N 2 1 4 Andy Mui Solutions Architect AWS
  • 3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Related Breakouts Tuesday, Nov 27* CON321-R1: Mythical Mysfits: DevSecOps with Docker and AWS Fargate 12:15pm – 2:30pm | MGM, Level 3, Premier Ballroom 320 Wednesday, Nov 28** CON322-R: Mythical Mysfits: Management and Ops with AWS Fargate 11:30am – 1:45pm | Mirage, Mirage Event Center C1 * Repeat session if full – CON321-R2 ** Repeat session if full – CON322-R1 See session catalog for times and locations.
  • 4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda Containers and Docker Amazon Elastic Container Service (Amazon ECS) AWS Fargate Monolith to Microservices Hands-on Lab
  • 5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers and Docker A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.1 1 https://www.docker.com/resources/what-container Server Operating System Docker Engine AppA AppB AppC AppD
  • 6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Docker Architecture Docker daemon manages images, containers, networks, and volumes Docker CLI communicates with Docker daemon through a REST API Sample commands: docker build – build image from Dockerfile docker images – list images on Docker host docker run – run an image docker ps – list running containers docker stop – stop a running container Docker daemon / REST API Docker Host Container 1 Container 2 Container n Ubuntu Image Nginx Image Custom Image Docker Client Docker Registry Docker Hub
  • 7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Docker Image Read-only template Used to launch container Start with base image, additional data or dependencies added as layers Union file system merges layers into single image Instructions documented in Dockerfile kernel Base Image Image layer Image layer Image layer References parent image layer
  • 8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Dockerfile FROM dockerfile/ubuntu RUN add-apt-repository -y ppa:nginx/stable && apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/* && echo "ndaemon off;" >> /etc/nginx/nginx.conf && chown -R www-data:www-data /var/lib/nginx VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"] WORKDIR /etc/nginx CMD ["nginx"] EXPOSE 80 Pull base image Install Nginx Define mountable directories Define working directory Define default command Expose ports yourimage:1.0.0 9c9e81692ae9 02071fceb21b b35224abf821 fbc63d321d73 8c2e06607696 E7829950cee3
  • 9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS and AWS Fargate Scheduling and Orchestration Cluster Manager Placement Engine Availability Zone 1 Availability Zone 2 Availability Zone 3 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1 Container 1
  • 10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Constructs Cluster • Resource grouping and isolation • IAM permissions boundary Service • Maintains desired # of running tasks • Replaces unhealthy tasks • ELB integration Task • Running instance of a task definition • One or more containers Task Definition • Template used by Amazon ECS to launch tasks • Parallels to docker run parameters • Defines requirements – e.g. • CPU/Memory • Container image(s) • Logging • IAM role Container 1 Container 1 Container 1 Container 1Container 1 { ; } JSON
  • 11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Task Definition { "containerDefinitions": [ { "memory": 128, "portMappings": [ { "hostPort": 80, "containerPort": 80, "protocol": "tcp" } ], "essential": true, "name": "nginx-container", "image": "nginx", "logConfiguration": { "logDriver": "awslogs", "options": { "awslogs-group": "ecs-log-streaming", "awslogs-region": "us-west-2", "awslogs-stream-prefix": "fargate-task-1" } }, "cpu": 0 } ], …continued… "networkMode": "awsvpc", "executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole", "memory": "2048", "cpu": "1024", "requiresCompatibilities": [ "FARGATE" ], "family": "example_task_1" }
  • 12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Microservices “A software architecture style in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs. These services are small, highly decoupled and focus on doing a small task, facilitating a modular approach to system-building.” –Wikipedia Further reading: https://martinfowler.com/articles/microservices.html
  • 13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monolith to Microservices https://www.martinfowler.com/bliki/StranglerApplication.html
  • 14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Hands-on Lab www.mythicalmysfits.com
  • 15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Our mission: Ethical, mythical creature care. Our priority: Find homes for the abandoned, and often misunderstood, mythical creatures in our community. Help us find their forever homes! Your mission: Modernize and innovate on the Mythical stack. Lab 1: Containerize the monolithic application Lab 2: Deploy containers using AWS Fargate Lab 3: Scale and lay the foundation for microservices with an AWS Application Load Balancer (ALB) Lab 4: Our developers completed Project Cuddle which adds a “like” feature to the application. Since we want to move to a microservices design, help us break this functionality from the monolith and deploy it with AWS Fargate as its own containerized microservice. Welcome to Mythical Mysfits
  • 16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lab 1: Build/Test Monolith Docker Image VPC AWS Cloud Public subnet Private subnet users
  • 17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lab 2: Deploy with Fargate VPC AWS Cloud Public subnet Private subnet users
  • 18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lab 3: Scale with ALB VPC AWS Cloud Private subnet Private subnet users /
  • 19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Lab 4: Deploy ”Like” Microservice VPC AWS Cloud Private subnet Private subnet users / + /fulfill-like /like /fulfill-like /fulfill-like
  • 20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Instructions: http://www.mythicalmysfits.com/fargate Raise your hand if you have any questions. Feel free to work together with folks at your table. Near the end, we’ll hand out AWS credit codes to cover costs for the workshop. High-five your neighbors and have fun! Please fill out feedback forms and follow the clean-up instructions once you are done! Email us with comments/questions/feedback: aws-mythical-mysfits@amazon.com Logistics
  • 21. Thank you! © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.