SlideShare uma empresa Scribd logo
1 de 51
Baixar para ler offline
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Donnie Prakoso, MSc
AWS Technology Evangelist, ASEAN
More Containers, Less Operations
CTO Day - HCMC
@donnieprakoso
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
>hello world_
Donnie Prakoso, MSc
AWS Technology Evangelist, ASEAN
@donnieprakoso
donnieprakoso
• Speak in Go and Python
• Machine Learning and Serverless
• I AWS User Groups
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Let’s Discuss Something
• A retrospective look on why containers
for our development
• What is microservices and why we
should consider to adopt it?
• Introduction to Twelve-Factor app
• Patterns in microservices
http://bit.ly/outline-containers
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application environment components
Runtime Engine Code
Dependencies Configuration
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Local Laptop Staging / QA UAT Production
Different environments
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Local Laptop Staging / QA Production On-Prem
It worked on my machine, why not in
prod?
v6.0.0 v7.0.0 v4.0.0 v7.0.0
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Docker to the rescue
Runtime Engine
Code
Dependencies
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What Are Containers?
OS virtualization
Process isolation
Images
Automation
Server
Guest OS
Bins/Libs Bins/Libs
App2App1 Portable
Flexible
Fast
Efficient
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Docker container image
bootfs
kernel
Base image
Image
Image
W
ritable
Container
add
ngix
add
nodejs
U
buntu
References
parent
image
Read only image that is used as a
template to launch a container.
Start from base images that have
your dependencies, add your
custom code.
Docker file for easy, reproducable
builds.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Local Laptop Staging / QA UAT Production
Four environments, same container
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Virtual machine versus Docker
Server (Host)
Host OS
Hypervisor
App 2
Guest OS Guest OS Guest OS
Bins/Libs Bins/Libs Bins/Libs
App 1
App 2
App 3
VM
Server (Host)
Host OS
Docker
Bins/Libs Bins/Libs Bins/Libs
App 1 App 2 App 3
Container
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Container & Docker Benefits
• Portable application artifact that runs reliably everywhere
• Run different applications or application versions with different
dependencies simultaneously
• Better resource utilization by running multiple lightweight containers
per host
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
WHY DO WE LOVE CONTAINERS?
Packaging Distribution Immutable
infrastructure
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
BUILDING AN ECOSYSTEM
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
PRODUCTION WORKLOADS ON AWS
AWS VPC
networking mode
Advanced task
placement
Deep integration
with AWS platform
ECS CLI…{ }
Global footprint
Powerful scheduling
engines
Auto scaling
CloudWatch metrics
Load balancers
Linux & Windows
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HELPING CUSTOMERS SCALE CONTAINERS
450+%
growth
Hundreds of millions
of containers started each week
millions
of container instances
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS - Cluster
EC2 INSTANCES
LOAD
BALANCER ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
LOAD
BALANCER
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS - Task
EC2 INSTANCES
LOAD
BALANCER ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container
AGENT COMMUNICATION
SERVICE
Amazon ECS
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
LOAD
BALANCER
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS - Service
EC2 INSTANCES
LOAD
BALANCER ECS
AGENT
TASK
Container
TASK
Container
ECS
AGENT
TASK
Container
TASK
Container
AGENT COMMUNICATION
SERVICE
API
CLUSTER MANAGEMENT
ENGINE
KEY/VALUE STORE
ECS
AGENT
TASK
Container
TASK
Container
LOAD
BALANCER
Amazon ECS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Make
containers
tasks a
fundamental
compute
primitive
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ENABLE FOCUS ON APPLICATIONS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
INTRODUCING AWS FARGATE!
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
No instances
to manage
Task
native API
Resource
based pricing
Simple, easy to use,
powerful – and new
consumption model
=
CHANGING COMPUTE CONSUMPTION MODEL
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Scheduling and Orchestration
Cluster Manager Placement Engine
RUNNING CONTAINERS AT SCALE WITH ECS
Availability Zone #1 Availability Zone #2 Availability Zone #3
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Scheduling and Orchestration
Cluster Manager Placement Engine
ECS
AMI
Docker
agent
ECS
agent
EC2 Instance
ECS
AMI
Docker
agent
ECS
agent
EC2 Instance
ECS
AMI
Docker
agent
ECS
agent
EC2 Instance
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
What Is Microservices?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What Is Microservices?
An approach to developing a single application as a suite of
small services, each running in its own process and
communicating with lightweight mechanisms, often an HTTP
resource API
- Martin Fowler & James Lewis
https://martinfowler.com
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Monolithic vs. Microservices
webserver
.package
Order UI
Order service
Inventory
service
Shipping
service
Order
UI
Inventory
service
Order
service
Shipping
service
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Tenets of Microservices Architectures
Do one
thing wellIndependent
Decentralized
Black box
Polyglot
You build it, you run it
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
Benefits of Microservices Architecture
Agility
Flexible
scaling
Easy
deployment
Technology
freedom
Reusable code
Resilience
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
What Are Our Options?
Amazon EC2 Amazon ECS AWS Lambda
INSTANCES CONTAINERS SERVERLESS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Advanced Patterns in
Microservices
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The Twelve-Factor App
1. Codebase
2. Dependencies
3. Config
4. Backing Services
5. Build, Release Run
6. Processes
7. Port Binding
8. Concurrency
9. Disposability
10. Dev/Prod parity
11. Logs
12. Admin Processes
https://12factor.net/
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Secrets Manager
Rotate secrets safely Secure and audit
secrets centrally
Manage access with
fine-grained policies
Easily rotate, manage, and retrieve database credentials, API keys, and
other secrets through their lifecycle
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Continuous Deployment
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Continuous Deployment
AWS
CodeCommit AWS
CodePipeline
AWS
CodeBuild
Amazon
ECR
Amazon
ECS
AWS
CloudFormation
1. Commit
Code
2. Trigger
Pipeline
5.Update
Stack
6. Update Service
4. Push Image
3.Build
Artifact
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Managed Service Discovery
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Decision Criteria
Service Registry
Discovery Mechanism
Registration Mechanism
Self-registration
Server-side Discovery
Third-party Registration
Client-side Discovery
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Can We Make It Simpler?
Predictable
Names
for services
Auto updated
with latest,
healthy IP, port
Managed: No
overhead of
installation or
monitoring
High availability,
high scale
Extensible:
Flexible
boundaries for
auto discovery
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Introducing Service Discovery for
Amazon ECS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
You build apps where
services are invoked by
name & name resolves
to IP/port dynamically
You turn on service
discovery during
deployment —
service creation
DEV OPS
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Service Discovery Components
Service
CNAME: A / SRV record
Namespace
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Route 53 provides Service Registry
Route 53 provides APIs to create
• Namespace
• CNAME per service autoname
• A records per task IP
• SRV records per task IP + portService
CNAME: A / SRV record
Namespace
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS schedules & places service endpoints
ECS Scheduler updates on:
• Service scaling
• Task registrations
• Task de-registrations
• Task health
• Scheduling / Placement changes
• ECS instance changes
ECS maintains latest state of the
dynamic environment in Service
Registry
Cluster: myapp
app
IP
web
IP
app
IP
web
IP
AZ 1 AZ 2
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ECS updates service endpoints in Route 53
Cluster: myapp
AZ 1 AZ 2
app
10.0.6.5:8080
web
10.0.8.6:8080
app
10.0.4.5:8080
web
10.0.3.6:8080
Namespace: myapp.local
Service
web.myapp.local CNAME
10.0.4.5:8080
10.0.3.6:8080
Service
app.myapp.local CNAME
10.0.6.5:8080
10.0.8.6:8080
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Services connect to latest endpoints via DNS
Service
web.myapp.local CNAME
10.0.4.5:8080
10.0.3.6:8080
app
>dig web.myapp.local
> 10.0.4.5:8080
>
app web
web
Cluster: myapp DNS Server:
AZ 1 AZ 2
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Enables these use cases
1
Blue green deployments
• myapp.staging.local
• myapp.prod.local
• Private IP
• abstract cluster details
2
Internal micro services
• web.myapp.local
• Expose Private IP
3
External micro services
• web.myapp.mycompany.com
• Expose public IP or ELB EIP
• network + container health
check
4
Across ECS & EKS
• Service1.myapp.ecs
• Service2.myapp.eks
5
Across ECS &
AWS & onPrem
• Service1.myapp.ecs
• Service2.myapp.ec2
• Service3.myapp.onprem
6
Expose to service mesh
• Service1.myapp.local
• Service2.myapp.local
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Coordinate Microservices with
Visual Workflows
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Step Functions
Easily coordinate multiple Lambda functions using visual
workflows
Visualize in the
console
Define in JSON Monitor
executions
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Build On!
Donnie Prakoso
@donnieprakoso

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECSCON318_Interstella 8888 Monolith to Microservices with Amazon ECS
CON318_Interstella 8888 Monolith to Microservices with Amazon ECS
 
AI: State of the Union
AI: State of the UnionAI: State of the Union
AI: State of the Union
 
GAM309-Breathe Life into a Mobile Game_NoNotes.pdf
GAM309-Breathe Life into a Mobile Game_NoNotes.pdfGAM309-Breathe Life into a Mobile Game_NoNotes.pdf
GAM309-Breathe Life into a Mobile Game_NoNotes.pdf
 
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
Building Serverless Websites with Lambda@Edge - CTD309 - re:Invent 2017
 
Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018Comparing Compute Options for Microservices - AWS Summti Sydney 2018
Comparing Compute Options for Microservices - AWS Summti Sydney 2018
 
Building Best Practices and the Right Foundation for your 1st Production Work...
Building Best Practices and the Right Foundation for your 1st Production Work...Building Best Practices and the Right Foundation for your 1st Production Work...
Building Best Practices and the Right Foundation for your 1st Production Work...
 
AI State of the Union
AI State of the UnionAI State of the Union
AI State of the Union
 
LFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdfLFS309-High-Throughput Genomics on AWS.pdf
LFS309-High-Throughput Genomics on AWS.pdf
 
MBL306_Mobile State of the Union
MBL306_Mobile State of the UnionMBL306_Mobile State of the Union
MBL306_Mobile State of the Union
 
SecOps 2021 Today: Using AWS Services to Deliver SecOps - SID304 - re:Invent ...
SecOps 2021 Today: Using AWS Services to Deliver SecOps - SID304 - re:Invent ...SecOps 2021 Today: Using AWS Services to Deliver SecOps - SID304 - re:Invent ...
SecOps 2021 Today: Using AWS Services to Deliver SecOps - SID304 - re:Invent ...
 
CMP314_Bringing Deep Learning to the Cloud with Amazon EC2
CMP314_Bringing Deep Learning to the Cloud with Amazon EC2CMP314_Bringing Deep Learning to the Cloud with Amazon EC2
CMP314_Bringing Deep Learning to the Cloud with Amazon EC2
 
ALX328_Smart Devices Everywhere
ALX328_Smart Devices EverywhereALX328_Smart Devices Everywhere
ALX328_Smart Devices Everywhere
 
MCL205_Introduction to Deep Learning
MCL205_Introduction to Deep LearningMCL205_Introduction to Deep Learning
MCL205_Introduction to Deep Learning
 
Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...
Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...
Dow Jones & Wall Street Journal's journey to manage traffic spikes while miti...
 
HLC302_Adopting Microservices in Healthcare Building a Compliant DevOps Pipel...
HLC302_Adopting Microservices in Healthcare Building a Compliant DevOps Pipel...HLC302_Adopting Microservices in Healthcare Building a Compliant DevOps Pipel...
HLC302_Adopting Microservices in Healthcare Building a Compliant DevOps Pipel...
 
AI Services on AWS - CTO Club JLM
AI Services on AWS - CTO Club JLMAI Services on AWS - CTO Club JLM
AI Services on AWS - CTO Club JLM
 
Serverless Architectural Patterns
Serverless Architectural PatternsServerless Architectural Patterns
Serverless Architectural Patterns
 
Serverless DevOps to the Rescue
Serverless DevOps to the RescueServerless DevOps to the Rescue
Serverless DevOps to the Rescue
 
IOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoTIOT203_Getting Started with AWS IoT
IOT203_Getting Started with AWS IoT
 
DVC202_The Open Guide to AWS
DVC202_The Open Guide to AWSDVC202_The Open Guide to AWS
DVC202_The Open Guide to AWS
 

Semelhante a More Containers Less Operations

Semelhante a More Containers Less Operations (20)

Building with Containers on AWS by Tony Pujals .pdf
Building with Containers on AWS by Tony Pujals .pdfBuilding with Containers on AWS by Tony Pujals .pdf
Building with Containers on AWS by Tony Pujals .pdf
 
Orchestrating containers on AWS | AWS Floor28
Orchestrating containers on AWS | AWS Floor28Orchestrating containers on AWS | AWS Floor28
Orchestrating containers on AWS | AWS Floor28
 
Getting Started with Containers on AWS
Getting Started with Containers on AWSGetting Started with Containers on AWS
Getting Started with Containers on AWS
 
Using Containers on AWS
Using Containers on AWSUsing Containers on AWS
Using Containers on AWS
 
Microservices for Startups
Microservices for StartupsMicroservices for Startups
Microservices for Startups
 
Containers - State of the Union
Containers - State of the UnionContainers - State of the Union
Containers - State of the Union
 
Set Up a CI/CD Pipeline for Deploying Containers Using the AWS Developer Tool...
Set Up a CI/CD Pipeline for Deploying Containers Using the AWS Developer Tool...Set Up a CI/CD Pipeline for Deploying Containers Using the AWS Developer Tool...
Set Up a CI/CD Pipeline for Deploying Containers Using the AWS Developer Tool...
 
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
Getting Started with Containers in the Cloud: AWS Developer Workshop at Web S...
 
Microservices for Startups - Donnie Prakoso - AWS - CC18
Microservices for Startups - Donnie Prakoso - AWS - CC18Microservices for Startups - Donnie Prakoso - AWS - CC18
Microservices for Startups - Donnie Prakoso - AWS - CC18
 
The Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 KeynoteThe Serverless Tidal Wave - SwampUP 2018 Keynote
The Serverless Tidal Wave - SwampUP 2018 Keynote
 
Containers - State of the Union
Containers - State of the UnionContainers - State of the Union
Containers - State of the Union
 
Amazon Container Services
Amazon Container ServicesAmazon Container Services
Amazon Container 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
 
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 Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
Amazon Elastic Container Service for Kubernetes (Amazon EKS) I AWS Dev Day 2018
 
Getting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWSGetting Started with Kubernetes on AWS
Getting Started with Kubernetes on AWS
 
AWS ECS Workshop A Journey to Modern Applications
AWS ECS Workshop A Journey to Modern ApplicationsAWS ECS Workshop A Journey to Modern Applications
AWS ECS Workshop A Journey to Modern Applications
 
Getting-started-with-containers on AWS
Getting-started-with-containers on AWSGetting-started-with-containers on AWS
Getting-started-with-containers on AWS
 
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:...
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 

Mais de Donnie Prakoso

Mais de Donnie Prakoso (6)

Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDK
 
Modern Application Development for Startups
Modern Application Development for StartupsModern Application Development for Startups
Modern Application Development for Startups
 
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Operating Microservices at Hyperscale — Tech in Asia PDC 2019Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
 
How to Use AWS Lambda Layers and Lambda Runtime
How to Use AWS Lambda Layers and Lambda RuntimeHow to Use AWS Lambda Layers and Lambda Runtime
How to Use AWS Lambda Layers and Lambda Runtime
 
Serverless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon ComprehendServerless Text Analytics with Amazon Comprehend
Serverless Text Analytics with Amazon Comprehend
 
Building Serverless Microservices with AWS
Building Serverless Microservices with AWSBuilding Serverless Microservices with AWS
Building Serverless Microservices with AWS
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

More Containers Less Operations

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Donnie Prakoso, MSc AWS Technology Evangelist, ASEAN More Containers, Less Operations CTO Day - HCMC @donnieprakoso
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. >hello world_ Donnie Prakoso, MSc AWS Technology Evangelist, ASEAN @donnieprakoso donnieprakoso • Speak in Go and Python • Machine Learning and Serverless • I AWS User Groups
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Let’s Discuss Something • A retrospective look on why containers for our development • What is microservices and why we should consider to adopt it? • Introduction to Twelve-Factor app • Patterns in microservices http://bit.ly/outline-containers
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Application environment components Runtime Engine Code Dependencies Configuration
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Local Laptop Staging / QA UAT Production Different environments
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Local Laptop Staging / QA Production On-Prem It worked on my machine, why not in prod? v6.0.0 v7.0.0 v4.0.0 v7.0.0
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Docker to the rescue Runtime Engine Code Dependencies
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What Are Containers? OS virtualization Process isolation Images Automation Server Guest OS Bins/Libs Bins/Libs App2App1 Portable Flexible Fast Efficient
  • 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Docker container image bootfs kernel Base image Image Image W ritable Container add ngix add nodejs U buntu References parent image Read only image that is used as a template to launch a container. Start from base images that have your dependencies, add your custom code. Docker file for easy, reproducable builds.
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Local Laptop Staging / QA UAT Production Four environments, same container
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Virtual machine versus Docker Server (Host) Host OS Hypervisor App 2 Guest OS Guest OS Guest OS Bins/Libs Bins/Libs Bins/Libs App 1 App 2 App 3 VM Server (Host) Host OS Docker Bins/Libs Bins/Libs Bins/Libs App 1 App 2 App 3 Container
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Container & Docker Benefits • Portable application artifact that runs reliably everywhere • Run different applications or application versions with different dependencies simultaneously • Better resource utilization by running multiple lightweight containers per host
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. WHY DO WE LOVE CONTAINERS? Packaging Distribution Immutable infrastructure
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. BUILDING AN ECOSYSTEM
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. PRODUCTION WORKLOADS ON AWS AWS VPC networking mode Advanced task placement Deep integration with AWS platform ECS CLI…{ } Global footprint Powerful scheduling engines Auto scaling CloudWatch metrics Load balancers Linux & Windows
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HELPING CUSTOMERS SCALE CONTAINERS 450+% growth Hundreds of millions of containers started each week millions of container instances
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS - Cluster EC2 INSTANCES LOAD BALANCER ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK Container TASK Container LOAD BALANCER
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS - Task EC2 INSTANCES LOAD BALANCER ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK Container TASK Container LOAD BALANCER
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS - Service EC2 INSTANCES LOAD BALANCER ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container AGENT COMMUNICATION SERVICE API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK Container TASK Container LOAD BALANCER Amazon ECS
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Make containers tasks a fundamental compute primitive
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ENABLE FOCUS ON APPLICATIONS
  • 23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. INTRODUCING AWS FARGATE!
  • 24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. No instances to manage Task native API Resource based pricing Simple, easy to use, powerful – and new consumption model = CHANGING COMPUTE CONSUMPTION MODEL
  • 25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Scheduling and Orchestration Cluster Manager Placement Engine RUNNING CONTAINERS AT SCALE WITH ECS Availability Zone #1 Availability Zone #2 Availability Zone #3
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Scheduling and Orchestration Cluster Manager Placement Engine ECS AMI Docker agent ECS agent EC2 Instance ECS AMI Docker agent ECS agent EC2 Instance ECS AMI Docker agent ECS agent EC2 Instance
  • 27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What Is Microservices?
  • 28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What Is Microservices? An approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API - Martin Fowler & James Lewis https://martinfowler.com
  • 29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Monolithic vs. Microservices webserver .package Order UI Order service Inventory service Shipping service Order UI Inventory service Order service Shipping service
  • 30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Tenets of Microservices Architectures Do one thing wellIndependent Decentralized Black box Polyglot You build it, you run it
  • 31. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Benefits of Microservices Architecture Agility Flexible scaling Easy deployment Technology freedom Reusable code Resilience
  • 32. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What Are Our Options? Amazon EC2 Amazon ECS AWS Lambda INSTANCES CONTAINERS SERVERLESS
  • 33. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Advanced Patterns in Microservices
  • 34. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The Twelve-Factor App 1. Codebase 2. Dependencies 3. Config 4. Backing Services 5. Build, Release Run 6. Processes 7. Port Binding 8. Concurrency 9. Disposability 10. Dev/Prod parity 11. Logs 12. Admin Processes https://12factor.net/
  • 35. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Secrets Manager Rotate secrets safely Secure and audit secrets centrally Manage access with fine-grained policies Easily rotate, manage, and retrieve database credentials, API keys, and other secrets through their lifecycle
  • 36. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Continuous Deployment
  • 37. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Continuous Deployment AWS CodeCommit AWS CodePipeline AWS CodeBuild Amazon ECR Amazon ECS AWS CloudFormation 1. Commit Code 2. Trigger Pipeline 5.Update Stack 6. Update Service 4. Push Image 3.Build Artifact
  • 38. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Managed Service Discovery
  • 39. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Decision Criteria Service Registry Discovery Mechanism Registration Mechanism Self-registration Server-side Discovery Third-party Registration Client-side Discovery
  • 40. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Can We Make It Simpler? Predictable Names for services Auto updated with latest, healthy IP, port Managed: No overhead of installation or monitoring High availability, high scale Extensible: Flexible boundaries for auto discovery
  • 41. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Introducing Service Discovery for Amazon ECS
  • 42. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. You build apps where services are invoked by name & name resolves to IP/port dynamically You turn on service discovery during deployment — service creation DEV OPS
  • 43. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Service Discovery Components Service CNAME: A / SRV record Namespace
  • 44. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Route 53 provides Service Registry Route 53 provides APIs to create • Namespace • CNAME per service autoname • A records per task IP • SRV records per task IP + portService CNAME: A / SRV record Namespace
  • 45. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS schedules & places service endpoints ECS Scheduler updates on: • Service scaling • Task registrations • Task de-registrations • Task health • Scheduling / Placement changes • ECS instance changes ECS maintains latest state of the dynamic environment in Service Registry Cluster: myapp app IP web IP app IP web IP AZ 1 AZ 2
  • 46. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS updates service endpoints in Route 53 Cluster: myapp AZ 1 AZ 2 app 10.0.6.5:8080 web 10.0.8.6:8080 app 10.0.4.5:8080 web 10.0.3.6:8080 Namespace: myapp.local Service web.myapp.local CNAME 10.0.4.5:8080 10.0.3.6:8080 Service app.myapp.local CNAME 10.0.6.5:8080 10.0.8.6:8080
  • 47. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Services connect to latest endpoints via DNS Service web.myapp.local CNAME 10.0.4.5:8080 10.0.3.6:8080 app >dig web.myapp.local > 10.0.4.5:8080 > app web web Cluster: myapp DNS Server: AZ 1 AZ 2
  • 48. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Enables these use cases 1 Blue green deployments • myapp.staging.local • myapp.prod.local • Private IP • abstract cluster details 2 Internal micro services • web.myapp.local • Expose Private IP 3 External micro services • web.myapp.mycompany.com • Expose public IP or ELB EIP • network + container health check 4 Across ECS & EKS • Service1.myapp.ecs • Service2.myapp.eks 5 Across ECS & AWS & onPrem • Service1.myapp.ecs • Service2.myapp.ec2 • Service3.myapp.onprem 6 Expose to service mesh • Service1.myapp.local • Service2.myapp.local
  • 49. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Coordinate Microservices with Visual Workflows
  • 50. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS Step Functions Easily coordinate multiple Lambda functions using visual workflows Visualize in the console Define in JSON Monitor executions
  • 51. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Build On! Donnie Prakoso @donnieprakoso