SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Mythical Mysfits: Monolith to microservices
with Docker and AWS Fargate
Andy Mui
Solutions architect
AWS
M A D 3 0 5
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Agenda
Containers and Docker
Amazon Elastic Container Service (Amazon ECS)
Fargate
Monolith to microservices
Hands-on lab
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
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
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
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
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
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 a single
image
Instructions documented in Dockerfile
Kernel
Base image
Image layer
Image layer
Image layer
References
parent-image
layer
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
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
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon ECS and 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
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Amazon ECS constructs
Cluster
• Resource grouping and isolation
• AWS Identity and Access Management (IAM) permissions boundary
Service
• Maintains desired number of
running tasks
• Replaces unhealthy tasks
• Elastic Load Balancing 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:
• CPU/memory
• Container image(s)
• Logging
• IAM role
• Etc.
Container 1
Container 1
Container 1
Container 1 Container 1
{ ; }
JSON
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
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"
}
},
continued…
"cpu": 0
}
],
"networkMode": "awsvpc",
"executionRoleArn":
"arn:aws:iam::123456789012:role/ecsTask
ExecutionRole",
"memory": "2048",
"cpu": "1024",
"requiresCompatibilities": [
"FARGATE"
],
"family": "example_task_1"
}
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
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
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Monolith to microservices
https://www.martinfowler.com/bliki/StranglerApplication.html
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Hands-on lab
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
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 Fargate.
Lab 3: Scale and lay the foundation for microservices with an AWS Application Load Balancer.
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 Fargate as its own
containerized microservice.
Welcome to Mythical Mysfits
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Private subnetPublic subnet
Amazon Virtual Private Cloud (Amazon VPC)
AWS Cloud
Lab 1: Build and test monolith Docker image
AWS Cloud9
Amazon
DynamoDB
Users
Amazon CloudWatch
Amazon Elastic
Container Registry
(Amazon ECR)
Amazon Simple
Storage Service
(Amazon S3)
Monolith
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Public subnet
Monolith
Private subnet
Amazon VPC
AWS Cloud
Lab 2: Deploy monolith with Fargate
Amazon
DynamoDB
Users
Amazon CloudWatch
Amazon ECR
Amazon S3
Fargate
Logs
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Private subnet Private subnet
Amazon VPC
AWS Cloud
Lab 3: Scale with an Application Load Balancer
Amazon
DynamoDB
Users
Amazon CloudWatch
Amazon ECR
Amazon S3
Fargate
Logs
Application Load
Balancer
Monolith
/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Private subnet Private subnet
Amazon VPC
AWS Cloud
Lab 4: Deploy “like” microservice
Amazon
DynamoDB
Users
Amazon CloudWatch
Amazon ECR
Amazon S3
Fargate
Logs
Monolith
Fargate
Like microservice
/like
/fulfill-like
/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Instructions:
https://mythicalmysfits.com/fargate-ws1
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!
S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Andy Mui

Más contenido relacionado

La actualidad más candente

Running Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
Running Amazon EC2 workloads at scale - CMP301 - New York AWS SummitRunning Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
Running Amazon EC2 workloads at scale - CMP301 - New York AWS SummitAmazon Web Services
 
Introducing Open Distro for Elasticsearch - ADB201 - New York AWS Summit
Introducing Open Distro for Elasticsearch - ADB201 - New York AWS SummitIntroducing Open Distro for Elasticsearch - ADB201 - New York AWS Summit
Introducing Open Distro for Elasticsearch - ADB201 - New York AWS SummitAmazon Web Services
 
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS SummitGetting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS SummitAmazon Web Services
 
What’s new in Amazon Elastic Compute Cloud (Amazon EC2) - CMP201 - Chicago AW...
What’s new in Amazon Elastic Compute Cloud (Amazon EC2) - CMP201 - Chicago AW...What’s new in Amazon Elastic Compute Cloud (Amazon EC2) - CMP201 - Chicago AW...
What’s new in Amazon Elastic Compute Cloud (Amazon EC2) - CMP201 - Chicago AW...Amazon Web Services
 
Modernizing Your Microsoft Business Applications - CMP201 - Anaheim AWS Summit
Modernizing Your Microsoft Business Applications - CMP201 - Anaheim AWS SummitModernizing Your Microsoft Business Applications - CMP201 - Anaheim AWS Summit
Modernizing Your Microsoft Business Applications - CMP201 - Anaheim AWS SummitAmazon Web Services
 
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS SummitPerforming serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS SummitAmazon Web Services
 
Safeguard the Integrity of Your Code for Fast and Secure Deployments - SVC206...
Safeguard the Integrity of Your Code for Fast and Secure Deployments - SVC206...Safeguard the Integrity of Your Code for Fast and Secure Deployments - SVC206...
Safeguard the Integrity of Your Code for Fast and Secure Deployments - SVC206...Amazon Web Services
 
What's New with Amazon Redshift - ADB202 - Anaheim AWS Summit
What's New with Amazon Redshift - ADB202 - Anaheim AWS SummitWhat's New with Amazon Redshift - ADB202 - Anaheim AWS Summit
What's New with Amazon Redshift - ADB202 - Anaheim AWS SummitAmazon Web Services
 
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...Amazon Web Services
 
Amazon EC2 instances: Customizable cloud computing across workloads - DEM20-S...
Amazon EC2 instances: Customizable cloud computing across workloads - DEM20-S...Amazon EC2 instances: Customizable cloud computing across workloads - DEM20-S...
Amazon EC2 instances: Customizable cloud computing across workloads - DEM20-S...Amazon Web Services
 
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...Amazon Web Services
 
Deep dive on Amazon S3 Glacier Deep Archive - STG301 - Santa Clara AWS Summit
Deep dive on Amazon S3 Glacier Deep Archive - STG301 - Santa Clara AWS SummitDeep dive on Amazon S3 Glacier Deep Archive - STG301 - Santa Clara AWS Summit
Deep dive on Amazon S3 Glacier Deep Archive - STG301 - Santa Clara AWS SummitAmazon Web Services
 
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019AWS Summits
 
Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...
Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...
Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...Amazon Web Services
 
Resiliency-and-Availability-Design-Patterns-for-the-Cloud
Resiliency-and-Availability-Design-Patterns-for-the-CloudResiliency-and-Availability-Design-Patterns-for-the-Cloud
Resiliency-and-Availability-Design-Patterns-for-the-CloudAmazon Web Services
 
How-to-Choose-the-Right-Database-to-Build-High-Performance-Internet-Scale-App...
How-to-Choose-the-Right-Database-to-Build-High-Performance-Internet-Scale-App...How-to-Choose-the-Right-Database-to-Build-High-Performance-Internet-Scale-App...
How-to-Choose-the-Right-Database-to-Build-High-Performance-Internet-Scale-App...Amazon Web Services
 
Modernize your data warehouse with Amazon Redshift - ADB305 - Atlanta AWS Summit
Modernize your data warehouse with Amazon Redshift - ADB305 - Atlanta AWS SummitModernize your data warehouse with Amazon Redshift - ADB305 - Atlanta AWS Summit
Modernize your data warehouse with Amazon Redshift - ADB305 - Atlanta AWS SummitAmazon Web Services
 

La actualidad más candente (20)

Running Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
Running Amazon EC2 workloads at scale - CMP301 - New York AWS SummitRunning Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
Running Amazon EC2 workloads at scale - CMP301 - New York AWS Summit
 
Introducing Open Distro for Elasticsearch - ADB201 - New York AWS Summit
Introducing Open Distro for Elasticsearch - ADB201 - New York AWS SummitIntroducing Open Distro for Elasticsearch - ADB201 - New York AWS Summit
Introducing Open Distro for Elasticsearch - ADB201 - New York AWS Summit
 
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS SummitGetting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
 
What’s new in Amazon Elastic Compute Cloud (Amazon EC2) - CMP201 - Chicago AW...
What’s new in Amazon Elastic Compute Cloud (Amazon EC2) - CMP201 - Chicago AW...What’s new in Amazon Elastic Compute Cloud (Amazon EC2) - CMP201 - Chicago AW...
What’s new in Amazon Elastic Compute Cloud (Amazon EC2) - CMP201 - Chicago AW...
 
Modernizing Your Microsoft Business Applications - CMP201 - Anaheim AWS Summit
Modernizing Your Microsoft Business Applications - CMP201 - Anaheim AWS SummitModernizing Your Microsoft Business Applications - CMP201 - Anaheim AWS Summit
Modernizing Your Microsoft Business Applications - CMP201 - Anaheim AWS Summit
 
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS SummitPerforming serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
 
Safeguard the Integrity of Your Code for Fast and Secure Deployments - SVC206...
Safeguard the Integrity of Your Code for Fast and Secure Deployments - SVC206...Safeguard the Integrity of Your Code for Fast and Secure Deployments - SVC206...
Safeguard the Integrity of Your Code for Fast and Secure Deployments - SVC206...
 
What's New with Amazon Redshift - ADB202 - Anaheim AWS Summit
What's New with Amazon Redshift - ADB202 - Anaheim AWS SummitWhat's New with Amazon Redshift - ADB202 - Anaheim AWS Summit
What's New with Amazon Redshift - ADB202 - Anaheim AWS Summit
 
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
Create Intelligent Industrial Equipment with AWS IoT Services & AR/VR - SVC30...
 
Pro-Tips-for-Builders-on-AWS
Pro-Tips-for-Builders-on-AWSPro-Tips-for-Builders-on-AWS
Pro-Tips-for-Builders-on-AWS
 
Amazon EC2 instances: Customizable cloud computing across workloads - DEM20-S...
Amazon EC2 instances: Customizable cloud computing across workloads - DEM20-S...Amazon EC2 instances: Customizable cloud computing across workloads - DEM20-S...
Amazon EC2 instances: Customizable cloud computing across workloads - DEM20-S...
 
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
Architecting Digital Media Archive Migrations with AWS - STG301 - Anaheim AWS...
 
Serverless_with_MongoDB
Serverless_with_MongoDBServerless_with_MongoDB
Serverless_with_MongoDB
 
Build_a_Unified_Cloud
Build_a_Unified_CloudBuild_a_Unified_Cloud
Build_a_Unified_Cloud
 
Deep dive on Amazon S3 Glacier Deep Archive - STG301 - Santa Clara AWS Summit
Deep dive on Amazon S3 Glacier Deep Archive - STG301 - Santa Clara AWS SummitDeep dive on Amazon S3 Glacier Deep Archive - STG301 - Santa Clara AWS Summit
Deep dive on Amazon S3 Glacier Deep Archive - STG301 - Santa Clara AWS Summit
 
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019Optimize your Machine Learning workloads  | AWS Summit Tel Aviv 2019
Optimize your Machine Learning workloads | AWS Summit Tel Aviv 2019
 
Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...
Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...
Journey into the Cloud with VMware Cloud on AWS: Deep Dive - CMP303 - Anaheim...
 
Resiliency-and-Availability-Design-Patterns-for-the-Cloud
Resiliency-and-Availability-Design-Patterns-for-the-CloudResiliency-and-Availability-Design-Patterns-for-the-Cloud
Resiliency-and-Availability-Design-Patterns-for-the-Cloud
 
How-to-Choose-the-Right-Database-to-Build-High-Performance-Internet-Scale-App...
How-to-Choose-the-Right-Database-to-Build-High-Performance-Internet-Scale-App...How-to-Choose-the-Right-Database-to-Build-High-Performance-Internet-Scale-App...
How-to-Choose-the-Right-Database-to-Build-High-Performance-Internet-Scale-App...
 
Modernize your data warehouse with Amazon Redshift - ADB305 - Atlanta AWS Summit
Modernize your data warehouse with Amazon Redshift - ADB305 - Atlanta AWS SummitModernize your data warehouse with Amazon Redshift - ADB305 - Atlanta AWS Summit
Modernize your data warehouse with Amazon Redshift - ADB305 - Atlanta AWS Summit
 

Similar a Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 - Anaheim AWS Summit

Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...Amazon Web Services
 
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
 
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
 
Breaking the Monolith Using AWS Container Services
Breaking the Monolith Using AWS Container ServicesBreaking the Monolith Using AWS Container Services
Breaking the Monolith Using AWS Container ServicesAmazon 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
 
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
 
AWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWSAWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWSMassimo Ferre'
 
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
 
Securing serverless and container services - SDD306 - AWS re:Inforce 2019
Securing serverless and container services - SDD306 - AWS re:Inforce 2019 Securing serverless and container services - SDD306 - AWS re:Inforce 2019
Securing serverless and container services - SDD306 - AWS re:Inforce 2019 Amazon Web Services
 
AWS DevDay Cologne - Automating building blocks choices you will face with co...
AWS DevDay Cologne - Automating building blocks choices you will face with co...AWS DevDay Cologne - Automating building blocks choices you will face with co...
AWS DevDay Cologne - Automating building blocks choices you will face with co...Cobus Bernard
 
Serverless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up LoftServerless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up LoftAmazon 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
 
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...Amazon Web Services
 
Modern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECSModern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECSAmazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019Amazon Web Services
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019AWS Summits
 

Similar a Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 - Anaheim AWS Summit (20)

Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
Mythical Mysfits: Monolith to Microservice with Docker and AWS Fargate (CON21...
 
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...
 
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
 
Breaking the Monolith Using AWS Container Services
Breaking the Monolith Using AWS Container ServicesBreaking the Monolith Using AWS Container Services
Breaking the Monolith Using AWS Container Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 
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
 
AWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWSAWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWS
 
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
 
Securing serverless and container services - SDD306 - AWS re:Inforce 2019
Securing serverless and container services - SDD306 - AWS re:Inforce 2019 Securing serverless and container services - SDD306 - AWS re:Inforce 2019
Securing serverless and container services - SDD306 - AWS re:Inforce 2019
 
AWS DevDay Cologne - Automating building blocks choices you will face with co...
AWS DevDay Cologne - Automating building blocks choices you will face with co...AWS DevDay Cologne - Automating building blocks choices you will face with co...
AWS DevDay Cologne - Automating building blocks choices you will face with co...
 
Serverless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up LoftServerless and Containers, AWS Federal Pop-Up Loft
Serverless and Containers, AWS Federal Pop-Up Loft
 
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
 
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
 
Modern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECSModern-Application-Design-with-Amazon-ECS
Modern-Application-Design-with-Amazon-ECS
 
Java on AWS
Java on AWSJava on AWS
Java on AWS
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
 
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019Deep Dive on Amazon Elastic Container Service (ECS)  | AWS Summit Tel Aviv 2019
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
 

Más 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
 

Más 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 Microservices with Docker and Fargate - MAD305 - Anaheim AWS Summit

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Mythical Mysfits: Monolith to microservices with Docker and AWS Fargate Andy Mui Solutions architect AWS M A D 3 0 5
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Agenda Containers and Docker Amazon Elastic Container Service (Amazon ECS) Fargate Monolith to microservices Hands-on lab
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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 a single image Instructions documented in Dockerfile Kernel Base image Image layer Image layer Image layer References parent-image layer
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon ECS and 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
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Amazon ECS constructs Cluster • Resource grouping and isolation • AWS Identity and Access Management (IAM) permissions boundary Service • Maintains desired number of running tasks • Replaces unhealthy tasks • Elastic Load Balancing 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: • CPU/memory • Container image(s) • Logging • IAM role • Etc. Container 1 Container 1 Container 1 Container 1 Container 1 { ; } JSON
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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" } }, continued… "cpu": 0 } ], "networkMode": "awsvpc", "executionRoleArn": "arn:aws:iam::123456789012:role/ecsTask ExecutionRole", "memory": "2048", "cpu": "1024", "requiresCompatibilities": [ "FARGATE" ], "family": "example_task_1" }
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Monolith to microservices https://www.martinfowler.com/bliki/StranglerApplication.html
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Hands-on lab
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T 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 Fargate. Lab 3: Scale and lay the foundation for microservices with an AWS Application Load Balancer. 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 Fargate as its own containerized microservice. Welcome to Mythical Mysfits
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Private subnetPublic subnet Amazon Virtual Private Cloud (Amazon VPC) AWS Cloud Lab 1: Build and test monolith Docker image AWS Cloud9 Amazon DynamoDB Users Amazon CloudWatch Amazon Elastic Container Registry (Amazon ECR) Amazon Simple Storage Service (Amazon S3) Monolith
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Public subnet Monolith Private subnet Amazon VPC AWS Cloud Lab 2: Deploy monolith with Fargate Amazon DynamoDB Users Amazon CloudWatch Amazon ECR Amazon S3 Fargate Logs
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Private subnet Private subnet Amazon VPC AWS Cloud Lab 3: Scale with an Application Load Balancer Amazon DynamoDB Users Amazon CloudWatch Amazon ECR Amazon S3 Fargate Logs Application Load Balancer Monolith /
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Private subnet Private subnet Amazon VPC AWS Cloud Lab 4: Deploy “like” microservice Amazon DynamoDB Users Amazon CloudWatch Amazon ECR Amazon S3 Fargate Logs Monolith Fargate Like microservice /like /fulfill-like /
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T Instructions: https://mythicalmysfits.com/fargate-ws1 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
  • 19. Thank you! S U M M I T © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Andy Mui