SlideShare a Scribd company logo
© 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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. orits affiliates. All rights reserved.S UM M I T
Agenda
Containers and Docker
Amazon Elastic Container Service (Amazon ECS)
AWS Fargate
Monolith to microservices
Hands-onlab
© 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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. orits affiliates. All rights reserved.S UM M I T
Docker architecture
Docker daemon manages images, containers,
networks,and volumes
Docker CLI communicateswith 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. orits affiliates. All rights reserved.S UM M I T
Docker image
Read-only template
Used to launch container
Start with base image, additionaldata, or
dependencies added as layers
Union file system merges layers into a single
image
Instructions documented in Dockerfile
Kernel
Base image
Imagelayer
Imagelayer
Imagelayer
References
parent image
layer
© 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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. orits affiliates. All rights reserved.S UM M I T
Amazon ECS and AWS Fargate
Scheduling and orchestration
Cluster manager Placement engine
Availability Zone 1 Availability Zone 2 Availability Zone 3
Container1 Container1
Container1 Container1
Container1 Container1
Container1 Container1
Container1 Container1
Container1 Container1
Container1 Container1
Container1 Container1
Container1 Container1
© 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM M I T
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 AmazonECS to
launch tasks
• Parallels to docker run parameters
• Defines requirements:
• CPU/Memory
• Container image(s)
• Logging
• IAM role
• Etc.
Container1
Container1
Container1
Container1 Container1
{ ; }
JSON
© 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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. orits affiliates. All rights reserved.S UM M I T
Microservices
“A software architecture style in which complex applicationsare 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. orits affiliates. All rights reserved.S UM M I T
Monolith to microservices
https://www.martinfowler.com/bliki/StranglerApplication.html
© 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM M I T
Hands-on lab
© 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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 AWS 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 AWS Fargate as its own
containerized microservice.
Welcome to Mythical Mysfits
© 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM M I T
Private subnetPublic subnet
VPC
AWS Cloud
Lab 1: Build and test monolith Docker image
AWS Cloud9
Amazon
DynamoDB
Users
Amazon CloudWatch
Amazon ECR
Amazon S3
Monolith
© 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM M I T
Public subnet
Monolith
Private subnet
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. orits affiliates. All rights reserved.S UM M I T
Private subnet Private subnet
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. orits affiliates. All rights reserved.S UM M I T
Private subnet Private subnet
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. orits affiliates. All rights reserved.S UM 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 UM M I T © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.
S UM M I T © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.

More Related Content

What's hot

How Millennium Management achieves provable security with AWS Zelkova - FSV30...
How Millennium Management achieves provable security with AWS Zelkova - FSV30...How Millennium Management achieves provable security with AWS Zelkova - FSV30...
How Millennium Management achieves provable security with AWS Zelkova - FSV30...
Amazon Web Services
 
Deep dive on AWS Cloud storage offerings - What to use, where, and why - STG3...
Deep dive on AWS Cloud storage offerings - What to use, where, and why - STG3...Deep dive on AWS Cloud storage offerings - What to use, where, and why - STG3...
Deep dive on AWS Cloud storage offerings - What to use, where, and why - STG3...
Amazon Web Services
 
Machine learning at the IoT Edge with AWS IoT Greengrass - SVC203 - Atlanta A...
Machine learning at the IoT Edge with AWS IoT Greengrass - SVC203 - Atlanta A...Machine learning at the IoT Edge with AWS IoT Greengrass - SVC203 - Atlanta A...
Machine learning at the IoT Edge with AWS IoT Greengrass - SVC203 - Atlanta A...
Amazon Web Services
 
Find all the threats: AWS threat detection and mitigation - SEC302 - Santa Cl...
Find all the threats: AWS threat detection and mitigation - SEC302 - Santa Cl...Find all the threats: AWS threat detection and mitigation - SEC302 - Santa Cl...
Find all the threats: AWS threat detection and mitigation - SEC302 - Santa Cl...
Amazon Web Services
 
Gain visibility & real-time actionable security alerts with VPC Flow Logs & A...
Gain visibility & real-time actionable security alerts with VPC Flow Logs & A...Gain visibility & real-time actionable security alerts with VPC Flow Logs & A...
Gain visibility & real-time actionable security alerts with VPC Flow Logs & A...
Amazon Web Services
 
Find All the Threats: AWS Threat Detection and Remediation - SEC303 - Anaheim...
Find All the Threats: AWS Threat Detection and Remediation - SEC303 - Anaheim...Find All the Threats: AWS Threat Detection and Remediation - SEC303 - Anaheim...
Find All the Threats: AWS Threat Detection and Remediation - SEC303 - Anaheim...
Amazon Web Services
 
Using AWS IoT & Amazon SageMaker to Improve Manufacturing Operations - SVC204...
Using AWS IoT & Amazon SageMaker to Improve Manufacturing Operations - SVC204...Using AWS IoT & Amazon SageMaker to Improve Manufacturing Operations - SVC204...
Using AWS IoT & Amazon SageMaker to Improve Manufacturing Operations - SVC204...
Amazon Web Services
 
Twelve-factor serverless applications - MAD302 - Santa Clara AWS Summit
Twelve-factor serverless applications - MAD302 - Santa Clara AWS SummitTwelve-factor serverless applications - MAD302 - Santa Clara AWS Summit
Twelve-factor serverless applications - MAD302 - Santa Clara AWS Summit
Amazon Web Services
 
Overcoming tomorrow's operational challenges with AIOps - DEM05-R1 - Santa Cl...
Overcoming tomorrow's operational challenges with AIOps - DEM05-R1 - Santa Cl...Overcoming tomorrow's operational challenges with AIOps - DEM05-R1 - Santa Cl...
Overcoming tomorrow's operational challenges with AIOps - DEM05-R1 - Santa Cl...
Amazon Web Services
 
Build a Next-Gen Meeting Room Experience Using Alexa for Business - SVC203 - ...
Build a Next-Gen Meeting Room Experience Using Alexa for Business - SVC203 - ...Build a Next-Gen Meeting Room Experience Using Alexa for Business - SVC203 - ...
Build a Next-Gen Meeting Room Experience Using Alexa for Business - SVC203 - ...
Amazon Web Services
 
Breaking down monoliths - DEM04 - Santa Clara AWS Summit.pdf
Breaking down monoliths - DEM04 - Santa Clara AWS Summit.pdfBreaking down monoliths - DEM04 - Santa Clara AWS Summit.pdf
Breaking down monoliths - DEM04 - Santa Clara AWS Summit.pdf
Amazon Web Services
 
Migrating Business Critical Applications to AWS
Migrating Business Critical Applications to AWSMigrating Business Critical Applications to AWS
Migrating Business Critical Applications to AWS
Amazon Web Services
 
Developing Intelligent Robots with AWS RoboMaker - SVC205 - Anaheim AWS Summit
Developing Intelligent Robots with AWS RoboMaker - SVC205 - Anaheim AWS SummitDeveloping Intelligent Robots with AWS RoboMaker - SVC205 - Anaheim AWS Summit
Developing Intelligent Robots with AWS RoboMaker - SVC205 - Anaheim AWS Summit
Amazon Web Services
 
Monitoring with container insights & anomaly detection - SVC308 - New York AW...
Monitoring with container insights & anomaly detection - SVC308 - New York AW...Monitoring with container insights & anomaly detection - SVC308 - New York AW...
Monitoring with container insights & anomaly detection - SVC308 - New York AW...
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
 
Accelerating product development with high performance computing - CMP301 - S...
Accelerating product development with high performance computing - CMP301 - S...Accelerating product development with high performance computing - CMP301 - S...
Accelerating product development with high performance computing - CMP301 - S...
Amazon Web Services
 
What's new in Amazon Aurora - ADB204 - Santa Clara AWS Summit.pdf
What's new in Amazon Aurora - ADB204 - Santa Clara AWS Summit.pdfWhat's new in Amazon Aurora - ADB204 - Santa Clara AWS Summit.pdf
What's new in Amazon Aurora - ADB204 - Santa Clara AWS Summit.pdf
Amazon Web Services
 
Discuss data migration with AWS experts - STG304 - Santa Clara AWS Summit
Discuss data migration with AWS experts - STG304 - Santa Clara AWS SummitDiscuss data migration with AWS experts - STG304 - Santa Clara AWS Summit
Discuss data migration with AWS experts - STG304 - Santa Clara AWS Summit
Amazon Web Services
 
Add Intelligence to Applications - AIM203 - Anaheim AWS Summit
Add Intelligence to Applications - AIM203 - Anaheim AWS SummitAdd Intelligence to Applications - AIM203 - Anaheim AWS Summit
Add Intelligence to Applications - AIM203 - Anaheim AWS Summit
Amazon Web Services
 
Using ML to detect and prevent fraud without compromising user experience - F...
Using ML to detect and prevent fraud without compromising user experience - F...Using ML to detect and prevent fraud without compromising user experience - F...
Using ML to detect and prevent fraud without compromising user experience - F...
Amazon Web Services
 

What's hot (20)

How Millennium Management achieves provable security with AWS Zelkova - FSV30...
How Millennium Management achieves provable security with AWS Zelkova - FSV30...How Millennium Management achieves provable security with AWS Zelkova - FSV30...
How Millennium Management achieves provable security with AWS Zelkova - FSV30...
 
Deep dive on AWS Cloud storage offerings - What to use, where, and why - STG3...
Deep dive on AWS Cloud storage offerings - What to use, where, and why - STG3...Deep dive on AWS Cloud storage offerings - What to use, where, and why - STG3...
Deep dive on AWS Cloud storage offerings - What to use, where, and why - STG3...
 
Machine learning at the IoT Edge with AWS IoT Greengrass - SVC203 - Atlanta A...
Machine learning at the IoT Edge with AWS IoT Greengrass - SVC203 - Atlanta A...Machine learning at the IoT Edge with AWS IoT Greengrass - SVC203 - Atlanta A...
Machine learning at the IoT Edge with AWS IoT Greengrass - SVC203 - Atlanta A...
 
Find all the threats: AWS threat detection and mitigation - SEC302 - Santa Cl...
Find all the threats: AWS threat detection and mitigation - SEC302 - Santa Cl...Find all the threats: AWS threat detection and mitigation - SEC302 - Santa Cl...
Find all the threats: AWS threat detection and mitigation - SEC302 - Santa Cl...
 
Gain visibility & real-time actionable security alerts with VPC Flow Logs & A...
Gain visibility & real-time actionable security alerts with VPC Flow Logs & A...Gain visibility & real-time actionable security alerts with VPC Flow Logs & A...
Gain visibility & real-time actionable security alerts with VPC Flow Logs & A...
 
Find All the Threats: AWS Threat Detection and Remediation - SEC303 - Anaheim...
Find All the Threats: AWS Threat Detection and Remediation - SEC303 - Anaheim...Find All the Threats: AWS Threat Detection and Remediation - SEC303 - Anaheim...
Find All the Threats: AWS Threat Detection and Remediation - SEC303 - Anaheim...
 
Using AWS IoT & Amazon SageMaker to Improve Manufacturing Operations - SVC204...
Using AWS IoT & Amazon SageMaker to Improve Manufacturing Operations - SVC204...Using AWS IoT & Amazon SageMaker to Improve Manufacturing Operations - SVC204...
Using AWS IoT & Amazon SageMaker to Improve Manufacturing Operations - SVC204...
 
Twelve-factor serverless applications - MAD302 - Santa Clara AWS Summit
Twelve-factor serverless applications - MAD302 - Santa Clara AWS SummitTwelve-factor serverless applications - MAD302 - Santa Clara AWS Summit
Twelve-factor serverless applications - MAD302 - Santa Clara AWS Summit
 
Overcoming tomorrow's operational challenges with AIOps - DEM05-R1 - Santa Cl...
Overcoming tomorrow's operational challenges with AIOps - DEM05-R1 - Santa Cl...Overcoming tomorrow's operational challenges with AIOps - DEM05-R1 - Santa Cl...
Overcoming tomorrow's operational challenges with AIOps - DEM05-R1 - Santa Cl...
 
Build a Next-Gen Meeting Room Experience Using Alexa for Business - SVC203 - ...
Build a Next-Gen Meeting Room Experience Using Alexa for Business - SVC203 - ...Build a Next-Gen Meeting Room Experience Using Alexa for Business - SVC203 - ...
Build a Next-Gen Meeting Room Experience Using Alexa for Business - SVC203 - ...
 
Breaking down monoliths - DEM04 - Santa Clara AWS Summit.pdf
Breaking down monoliths - DEM04 - Santa Clara AWS Summit.pdfBreaking down monoliths - DEM04 - Santa Clara AWS Summit.pdf
Breaking down monoliths - DEM04 - Santa Clara AWS Summit.pdf
 
Migrating Business Critical Applications to AWS
Migrating Business Critical Applications to AWSMigrating Business Critical Applications to AWS
Migrating Business Critical Applications to AWS
 
Developing Intelligent Robots with AWS RoboMaker - SVC205 - Anaheim AWS Summit
Developing Intelligent Robots with AWS RoboMaker - SVC205 - Anaheim AWS SummitDeveloping Intelligent Robots with AWS RoboMaker - SVC205 - Anaheim AWS Summit
Developing Intelligent Robots with AWS RoboMaker - SVC205 - Anaheim AWS Summit
 
Monitoring with container insights & anomaly detection - SVC308 - New York AW...
Monitoring with container insights & anomaly detection - SVC308 - New York AW...Monitoring with container insights & anomaly detection - SVC308 - New York AW...
Monitoring with container insights & anomaly detection - SVC308 - New York AW...
 
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...
 
Accelerating product development with high performance computing - CMP301 - S...
Accelerating product development with high performance computing - CMP301 - S...Accelerating product development with high performance computing - CMP301 - S...
Accelerating product development with high performance computing - CMP301 - S...
 
What's new in Amazon Aurora - ADB204 - Santa Clara AWS Summit.pdf
What's new in Amazon Aurora - ADB204 - Santa Clara AWS Summit.pdfWhat's new in Amazon Aurora - ADB204 - Santa Clara AWS Summit.pdf
What's new in Amazon Aurora - ADB204 - Santa Clara AWS Summit.pdf
 
Discuss data migration with AWS experts - STG304 - Santa Clara AWS Summit
Discuss data migration with AWS experts - STG304 - Santa Clara AWS SummitDiscuss data migration with AWS experts - STG304 - Santa Clara AWS Summit
Discuss data migration with AWS experts - STG304 - Santa Clara AWS Summit
 
Add Intelligence to Applications - AIM203 - Anaheim AWS Summit
Add Intelligence to Applications - AIM203 - Anaheim AWS SummitAdd Intelligence to Applications - AIM203 - Anaheim AWS Summit
Add Intelligence to Applications - AIM203 - Anaheim AWS Summit
 
Using ML to detect and prevent fraud without compromising user experience - F...
Using ML to detect and prevent fraud without compromising user experience - F...Using ML to detect and prevent fraud without compromising user experience - F...
Using ML to detect and prevent fraud without compromising user experience - F...
 

Similar to Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305 - Santa Clara AWS Summit

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
 
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
Amazon Web Services
 
AWS Accra Meetup - Developing Modern Applications in the Cloud
AWS Accra Meetup - Developing Modern Applications in the CloudAWS Accra Meetup - Developing Modern Applications in the Cloud
AWS Accra Meetup - Developing Modern Applications in the Cloud
Cobus Bernard
 
[CPT DevOps Meetup] Developing Modern Applications in the Cloud
[CPT DevOps Meetup] Developing Modern Applications in the Cloud[CPT DevOps Meetup] Developing Modern Applications in the Cloud
[CPT DevOps Meetup] Developing Modern Applications in the Cloud
Cobus Bernard
 
AWS Jozi Meetup Developing Modern Applications in the Cloud
AWS Jozi Meetup Developing Modern Applications in the CloudAWS Jozi Meetup Developing Modern Applications in the Cloud
AWS Jozi Meetup Developing Modern Applications in the Cloud
Cobus Bernard
 
Amazon EKS: Getting Started
Amazon EKS: Getting StartedAmazon EKS: Getting Started
Amazon EKS: Getting Started
Tanya Seno
 
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
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.pdf
Amazon 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
 
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
Amazon Web Services
 
Mythical Mysfits - Build & collaborate on a modern web application on AWS - M...
Mythical Mysfits - Build & collaborate on a modern web application on AWS - M...Mythical Mysfits - Build & collaborate on a modern web application on AWS - M...
Mythical Mysfits - Build & collaborate on a modern web application on AWS - M...
Amazon Web Services
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
AWS Summits
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Amazon 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 AWS
Massimo Ferre'
 
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Amazon Web Services
 
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
 
Enable Agile Development with Amazon Linux WorkSpaces and WorkLink - SVC203 -...
Enable Agile Development with Amazon Linux WorkSpaces and WorkLink - SVC203 -...Enable Agile Development with Amazon Linux WorkSpaces and WorkLink - SVC203 -...
Enable Agile Development with Amazon Linux WorkSpaces and WorkLink - SVC203 -...
Amazon 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 Services
Amazon Web Services
 
More Containers Less Operations
More Containers Less OperationsMore Containers Less Operations
More Containers Less Operations
Donnie Prakoso
 
Java on AWS
Java on AWSJava on AWS
Java on AWS
Amazon Web Services
 

Similar to Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305 - Santa Clara AWS Summit (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 ...
 
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
 
AWS Accra Meetup - Developing Modern Applications in the Cloud
AWS Accra Meetup - Developing Modern Applications in the CloudAWS Accra Meetup - Developing Modern Applications in the Cloud
AWS Accra Meetup - Developing Modern Applications in the Cloud
 
[CPT DevOps Meetup] Developing Modern Applications in the Cloud
[CPT DevOps Meetup] Developing Modern Applications in the Cloud[CPT DevOps Meetup] Developing Modern Applications in the Cloud
[CPT DevOps Meetup] Developing Modern Applications in the Cloud
 
AWS Jozi Meetup Developing Modern Applications in the Cloud
AWS Jozi Meetup Developing Modern Applications in the CloudAWS Jozi Meetup Developing Modern Applications in the Cloud
AWS Jozi Meetup Developing Modern Applications in the Cloud
 
Amazon EKS: Getting Started
Amazon EKS: Getting StartedAmazon EKS: Getting Started
Amazon EKS: Getting Started
 
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
 
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...
 
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
 
Mythical Mysfits - Build & collaborate on a modern web application on AWS - M...
Mythical Mysfits - Build & collaborate on a modern web application on AWS - M...Mythical Mysfits - Build & collaborate on a modern web application on AWS - M...
Mythical Mysfits - Build & collaborate on a modern web application on AWS - M...
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
 
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019Orchestrating containers on AWS  | AWS Summit Tel Aviv 2019
Orchestrating containers on AWS | AWS Summit Tel Aviv 2019
 
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
 
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
Favorire l'innovazione passando da applicazioni monolitiche ad architetture m...
 
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...
 
Enable Agile Development with Amazon Linux WorkSpaces and WorkLink - SVC203 -...
Enable Agile Development with Amazon Linux WorkSpaces and WorkLink - SVC203 -...Enable Agile Development with Amazon Linux WorkSpaces and WorkLink - SVC203 -...
Enable Agile Development with Amazon Linux WorkSpaces and WorkLink - SVC203 -...
 
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
 
More Containers Less Operations
More Containers Less OperationsMore Containers Less Operations
More Containers Less Operations
 
Java on AWS
Java on AWSJava on AWS
Java on AWS
 

More from 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 Fargate
Amazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
Amazon 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
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
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 Workloads
Amazon Web Services
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
Amazon 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 sfatare
Amazon 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 NodeJS
Amazon 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 web
Amazon 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 sfatare
Amazon 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
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
Amazon Web Services
 

More from 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...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Mythical Mysfits - Monolith to microservices with Docker and Fargate - MAD305 - Santa Clara AWS Summit

  • 1. © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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. orits affiliates. All rights reserved.S UM M I T Agenda Containers and Docker Amazon Elastic Container Service (Amazon ECS) AWS Fargate Monolith to microservices Hands-onlab
  • 3. © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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. orits affiliates. All rights reserved.S UM M I T Docker architecture Docker daemon manages images, containers, networks,and volumes Docker CLI communicateswith 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. orits affiliates. All rights reserved.S UM M I T Docker image Read-only template Used to launch container Start with base image, additionaldata, or dependencies added as layers Union file system merges layers into a single image Instructions documented in Dockerfile Kernel Base image Imagelayer Imagelayer Imagelayer References parent image layer
  • 6. © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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. orits affiliates. All rights reserved.S UM M I T Amazon ECS and AWS Fargate Scheduling and orchestration Cluster manager Placement engine Availability Zone 1 Availability Zone 2 Availability Zone 3 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1 Container1
  • 8. © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM M I T 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 AmazonECS to launch tasks • Parallels to docker run parameters • Defines requirements: • CPU/Memory • Container image(s) • Logging • IAM role • Etc. Container1 Container1 Container1 Container1 Container1 { ; } JSON
  • 9. © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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. orits affiliates. All rights reserved.S UM M I T Microservices “A software architecture style in which complex applicationsare 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. orits affiliates. All rights reserved.S UM M I T Monolith to microservices https://www.martinfowler.com/bliki/StranglerApplication.html
  • 12. © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM M I T Hands-on lab
  • 13. © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM 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 AWS 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 AWS Fargate as its own containerized microservice. Welcome to Mythical Mysfits
  • 14. © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM M I T Private subnetPublic subnet VPC AWS Cloud Lab 1: Build and test monolith Docker image AWS Cloud9 Amazon DynamoDB Users Amazon CloudWatch Amazon ECR Amazon S3 Monolith
  • 15. © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.S UM M I T Public subnet Monolith Private subnet 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. orits affiliates. All rights reserved.S UM M I T Private subnet Private subnet 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. orits affiliates. All rights reserved.S UM M I T Private subnet Private subnet 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. orits affiliates. All rights reserved.S UM 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 UM M I T © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.
  • 20. S UM M I T © 2019, Amazon Web Services, Inc. orits affiliates. All rights reserved.