SlideShare a Scribd company logo
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cobus Bernard
Senior Technical Evangelist
Amazon Web Services
B E R L I N
25.10.19
Automating Building Blocks:
Choices you will face with Container
Services
B A R 6
@cobusbernard
cobusbernard
cobusbernard
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Structureappsascollectionsofmicroservices
Properties of microservices
Microservices
• Independent
• Individually Deployed & Scaled
• Polyglot
• Modular - Easily Replaced
• Decentralized
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Rigid Flexible
Abstractions
Easy Hard
1 System N Systems2 Systems
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monolith
Does everything
Monoliths are OK
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservicedevelopment lifecycle
developers services
monitorreleasetestbuild
delivery pipelines
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
monitorreleasetestbuild
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Usecodetomodelapplicationsandinfrastructure
Infrastructure ascode
Declarative
I tell you
what I need
I tell you
what to do
Imperative
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Usecodetomodelapplicationsandinfrastructure
Infrastructure ascode goals
1. Make infrastructure changes repeatable and predictable
2. Release infrastructure changes using the same tools as code changes
3. Replicate production environment in a staging environment to enable
continuous testing
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Model container environments withAWS
Cloud Development Kit(CDK)
• Open source framework to define cloud infrastructure
• JavaScript, TypeScript, and Python, (Java, and C# in
developer preview)
• Provides library of higher-level resource types
(“construct” classes) that have AWS best practices built
in by default
• Provisions resources with CloudFormation
• Supports all CloudFormation resource types
AWS
CDK
https://awslabs.github.io/aws-cdk
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CDKtemplate
import ec2 = require('@aws-cdk/aws-ec2');
import ecs = require('@aws-cdk/aws-ecs');
import cdk = require('@aws-cdk/cdk');
class BonjourFargate extends cdk.Stack {
constructor(parent: cdk.App, name: string, props?: cdk.StackProps) {
super(parent, name, props);
const vpc = new ec2.VpcNetwork(this, 'MyVpc', { maxAZs: 2 });
const cluster = new ecs.Cluster(this, 'Cluster', { vpc });
new ecs.LoadBalancedFargateService(
this, "FargateService", {
cluster,
image: ecs.DockerHub.image("amazon/amazon-ecs-sample"),
});
}
}
const app = new cdk.App();
new BonjourFargate(app, 'Bonjour');
app.run();
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CDKtemplate
applets:
MyHelloWorldService:
type: @aws-cdk/aws-ecs:LoadBalancedFargateServiceApplet
properties:
image: 'amazon/amazon-ecs-sample’
$ cdk --app ./my-applet.yaml deploy
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Model pipelines withAWSCDK
• Minimize copy-and-paste by using object-oriented language
• Define microservice pipeline “shape” in one class, then re-use it across
many pipelines
• CDK includes many high-level constructs for modeling a CodePipeline
pipeline, including automatically configuring IAM role policies
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CDKpipelines:Construct
export class MyMicroservicePipeline extends cdk.Construct {
constructor(parent: cdk.Construct, name: string, props: MyMicroservicePipelineProps) {
super(parent, name);
const pipeline = new codepipeline.Pipeline(this, 'Pipeline', {
pipelineName: props.serviceName,
});
const githubAccessToken = new cdk.SecretParameter(this, 'GitHubToken',
{ ssmParameter: 'GitHubToken' });
new codepipeline.GitHubSourceAction(this, 'GitHubSource', {
stage: pipeline.addStage('Source'),
owner: 'myorg',
repo: props.serviceName,
oauthToken: githubAccessToken.value
});
…
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CDKpipelines:Stack
import cdk = require('@aws-cdk/cdk');
import { MyMicroservicePipeline } from './pipeline';
class MyMicroservicePipelinesStack extends cdk.Stack {
constructor(parent: cdk.App, name: string, props?: cdk.StackProps) {
super(parent, name, props);
new MyMicroservicePipeline(this, 'Pipeline1', { 'serviceName': 'Microservice1' });
new MyMicroservicePipeline(this, 'Pipeline2', { 'serviceName': 'Microservice2' });
new MyMicroservicePipeline(this, 'Pipeline3', { 'serviceName': 'Microservice3' });
new MyMicroservicePipeline(this, 'Pipeline4', { 'serviceName': 'Microservice4' });
}
}
const app = new cdk.App();
new MyMicroservicePipelinesStack(app, 'MyMicroservicePipelines');
app.run();
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Sundays …
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Availability zone 1
Auto Scaling group
AWS Region
Availability zone 2
Auto-scaling for upgrades
Elastic Load
Balancing (ELB)
X
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWSCodeBuild
• Fully managed build service that compiles source
code, runs tests, and produces software packages
• Scales continuously and processes multiple builds
concurrently
• No build servers to manage
• Pay by the minute, only for the compute resources
you use
• Monitor builds through CloudWatch Events
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Usecodetomodelapplicationsandinfrastructure
Model function environments withAWSServerless
Application Model (SAM)
• Open source framework for building serverless
applications on AWS
• Shorthand syntax to express functions, APIs,
databases, and event source mappings
• Transforms and expands SAM syntax into AWS
CloudFormation syntax on deployment
• Supports all AWS CloudFormation resource types
https://aws.amazon.com/serverless/sam/
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Containers and Docker
A container is a standard unit of software that packages up code and all its
dependencies so the application runs quickly and reliably from one
computing environment to another.1
1 https://www.docker.com/resources/what-container
Server
Operating System
Docker Engine
AppA
AppB
AppC
AppD
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
• Docker tags are resolved when each container starts, not just during
deployments
• Deploying “latest” or “prod” can result in untested code in production after
a scale-out event
• Use unique “immutable” tags for deployments
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
Build pushes new “latest” image
Image: sha256@22222... (“latest”)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
Service scales up, launching new tasks
Image: sha256@22222... (“latest”)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
Deploy using immutable tags
{
"name": "sample-app",
"image": "amazon/amazon-ecs-
sample@sha256:3e39d933b1d948c92309bb583b5a1f3d28f0119e1551ca1fe538ba414a41af48d"
}
{
"name": "sample-app",
"image": "amazon/amazon-ecs-sample:build-b2085490-359f-4eaf-8970-6d1e26c354f0"
}
SHA256 Digest
Build ID
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
Compute immutable tags during build
SHA256 Digest
export IMAGE_URI=`docker inspect --format='{{index .RepoDigests 0}}' my_image:$IMAGE_TAG
Example Result:
amazon/amazon-ecs-sample@sha256:3e39d933b...
Build ID
export IMAGE_TAG=build-`echo $CODEBUILD_BUILD_ID | awk –F":" ‘{print $2}'`
Example Result:
build-b2085490-359f-4eaf-8970-6d1e26c354f0
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
Build pushes new image tagged with new build ID
Image: sha256@22222... (“build-22222”)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
Service scales up, launching new tasks
Image: sha256@22222... (“build-22222”)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Container imagetagging for deployments
Image: “build-22222” tag
Deployment updates service’s task definition, replacing tasks
Image: sha256@22222... (“build-22222”)
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Buildwithserverlesstechnologiesasmuchaspossible
AWS container serviceslandscape
Management
Deployment, Scheduling,
Scaling & Management of
containerized applications
Hosting
Where the containers run
Amazon Elastic
Container Service
Amazon Elastic
Container Service
for Kubernetes
Amazon EC2AWS Fargate
Image Registry
Container Image Repository
Amazon Elastic
Container Registry
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon ECS key components
Development cluster
Container instance Container instance
Container instance
Productioncluster
Container instance Container instance
Container instance
AmazonElastic Container Service
(AmazonECS)
Container
Container
Volume
Taskdefinition
AmazonElastic Container Registry
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kubectl
EKS Architecture
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ShiftinInfrastructure Logic
OSS Hystrix:
code changes required
Service Mesh:
decentral, language agnostic,
dumb endpoints
https://www.infoq.com/articles/microservices-post-kubernetes
ESB: clustered monolith
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Open Source: Istio Service Mesh
Connect, secure, and observe services
• Shift in where functionality is located
• Control plane = Istio
• Data plane = set of all Envoy proxies
• Envoy proxy as sidecar in K8s pod
• Automatic or manual injection of proxy with EKS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data Plane (Proxy)
• Touches every packet / request
• Service discovery
• Health Checking
• Routing
• Load Balancing
• Authentication / Authorization
• Observability
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
IstioServiceMeshwithEnvoyProxy
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Envoy Proxy
• Level 7 proxy
• HTTP, HTTP/2, gRPC, AWS Dynamo DB, MongoDB
• C++11 code base , only 8 MB (statically linked)
• No language or framework dependencies
• Rquires no code changes
• Battle proved OSS, started at Lyft
• Works across compute options – also on EC2
• Envoy is not tightly coupled Istio
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
UpdateStrategies
A bath tub full of cold water ? K8s roling update
25%
1 pod at a time
… or just wetten your feet? Service Mesh
3%
Traffic routing
🛁 🛁 🛁
💦
🛀🏽🛁
🌊❄️🌊❄️🌊❄️
Fancy a Swim in the Arctic Sea ?
Blue / Green
100%
All services at once
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
User Based Routing Traffic Shifting
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
App Mesh works across compute services
Amazon ECS
AWS Fargate
Amazon EKS
Amazon EC2
Kubernetes on EC2
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cobus Bernard
Senior Technical Evangelist
Amazon Web Services
@cobusbernard
cobusbernard
cobusbernard

More Related Content

PPTX
Running kubernetes with amazon eks
PDF
Continuous Integration and Continuous Delivery for your serverless apps - Seb...
PPTX
Serverless on AWS overview - PeachPayments meetup
PDF
COM 203 Enable continuous delivery and resiliency for a static website
PDF
[AWS Container Service] Introducing AWS Fargate
PDF
20190205 AWS Black Belt Online Seminar 公共機関によるAWSの利活用
PDF
[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker
PDF
Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)
Running kubernetes with amazon eks
Continuous Integration and Continuous Delivery for your serverless apps - Seb...
Serverless on AWS overview - PeachPayments meetup
COM 203 Enable continuous delivery and resiliency for a static website
[AWS Container Service] Introducing AWS Fargate
20190205 AWS Black Belt Online Seminar 公共機関によるAWSの利活用
[AWS Container Service] Getting Started with Cloud Map, App Mesh and Firecracker
Container, Container, Container -유재석 (AWS 솔루션즈 아키텍트)

What's hot (6)

PDF
Airbnb가 직접 들려주는 Kubernetes 환경 구축 이야기 - Melanie Cebula 소프트웨어 엔지니어, Airbnb :: A...
PDF
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
PDF
AWS Container services
PDF
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
PDF
Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...
PPTX
Amazon EKS Deep Dive
Airbnb가 직접 들려주는 Kubernetes 환경 구축 이야기 - Melanie Cebula 소프트웨어 엔지니어, Airbnb :: A...
Deep Dive on Amazon Elastic Container Service (ECS) | AWS Summit Tel Aviv 2019
AWS Container services
K8s, Amazon EKS - 유재석, AWS 솔루션즈 아키텍트
Powering Test Environments with Amazon EKS using Serverless Tool | AWS Commun...
Amazon EKS Deep Dive
Ad

Similar to AWS DevDay Berlin - Automating building blocks choices you will face with container services (20)

PPTX
AWS DevDay Vienna - Automating building blocks choices you will face with con...
PPTX
AWS DevDay Cologne - Automating building blocks choices you will face with co...
PDF
DevOps Spain 2019. Pedro Mendoza-AWS
PDF
The AWS DevOps combo (January 2017)
PDF
Building Open Source Platforms on AWS (April 2017)
PDF
More Containers Less Operations
PDF
From Code to a running container | AWS Summit Tel Aviv 2019
PDF
AWS Summit Singapore 2019 | Operating Microservices at Hyperscale
PDF
Running Open Source Platforms on AWS (November 2016)
PPTX
DevConfZA 2020 : Automating your cloud: What are the building blocks
PDF
AWS in Practice
PPTX
AWS SSA Webinar 12 - Getting started on AWS with Containers
PPTX
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
PDF
AWS Summit Singapore 2019 | Microsoft DevOps on AWS
PPTX
Csa container-security-in-aws-dw
PDF
Owain Perry (Just Giving) - Continuous Delivery of Windows Micro-Services in ...
PPTX
Taking Docker to Dance: Continuous Delivery on AWS
PDF
Boost your AWS Infrastructure with CDK
PDF
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
ODP
Continuous delivery of Windows micro services in the cloud
AWS DevDay Vienna - Automating building blocks choices you will face with con...
AWS DevDay Cologne - Automating building blocks choices you will face with co...
DevOps Spain 2019. Pedro Mendoza-AWS
The AWS DevOps combo (January 2017)
Building Open Source Platforms on AWS (April 2017)
More Containers Less Operations
From Code to a running container | AWS Summit Tel Aviv 2019
AWS Summit Singapore 2019 | Operating Microservices at Hyperscale
Running Open Source Platforms on AWS (November 2016)
DevConfZA 2020 : Automating your cloud: What are the building blocks
AWS in Practice
AWS SSA Webinar 12 - Getting started on AWS with Containers
Deep Dive on Amazon Elastic Container Service (ECS) I AWS Dev Day 2018
AWS Summit Singapore 2019 | Microsoft DevOps on AWS
Csa container-security-in-aws-dw
Owain Perry (Just Giving) - Continuous Delivery of Windows Micro-Services in ...
Taking Docker to Dance: Continuous Delivery on AWS
Boost your AWS Infrastructure with CDK
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Continuous delivery of Windows micro services in the cloud
Ad

More from Cobus Bernard (20)

PPTX
London Microservices Meetup: Lessons learnt adopting microservices
PPTX
AWS SSA Webinar 34 - Getting started with databases on AWS - Managing DBs wit...
PPTX
AWS SSA Webinar 33 - Getting started with databases on AWS Amazon DynamoDB
PPTX
AWS SSA Webinar 32 - Getting Started with databases on AWS: Choosing the righ...
PPTX
AWS SSA Webinar 30 - Getting Started with AWS - Infrastructure as Code - Terr...
PPTX
AWS SSA Webinar 28 - Getting Started with AWS - Infrastructure as Code
PPTX
AWS Webinar 24 - Getting Started with AWS - Understanding DR
PPTX
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
PPTX
AWS SSA Webinar 21 - Getting Started with Data lakes on AWS
PDF
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWS
PPTX
AWS SSA Webinar 19 - Getting Started with Multi-Region Architecture: Services
PPTX
AWS SSA Webinar 18 - Getting Started with Multi-Region Architecture: Data
PPTX
AWS EMEA Online Summit - Live coding with containers
PPTX
AWS EMEA Online Summit - Blending Spot and On-Demand instances to optimizing ...
PPTX
AWS SSA Webinar 17 - Getting Started on AWS with Amazon RDS
PPTX
AWS SSA Webinar 16 - Getting Started on AWS with Amazon EC2
PPTX
AWS SSA Webinar 15 - Getting started on AWS with Containers: Amazon EKS
PPTX
AWS SSA Webinar 13 - Getting started on AWS with Containers: Amazon ECS
PPTX
AWS SSA Webinar 11 - Getting started on AWS: Security
PPTX
HashiTalks Africa - Going multi-account on AWS with Terraform
London Microservices Meetup: Lessons learnt adopting microservices
AWS SSA Webinar 34 - Getting started with databases on AWS - Managing DBs wit...
AWS SSA Webinar 33 - Getting started with databases on AWS Amazon DynamoDB
AWS SSA Webinar 32 - Getting Started with databases on AWS: Choosing the righ...
AWS SSA Webinar 30 - Getting Started with AWS - Infrastructure as Code - Terr...
AWS SSA Webinar 28 - Getting Started with AWS - Infrastructure as Code
AWS Webinar 24 - Getting Started with AWS - Understanding DR
AWS Webinar 23 - Getting Started with AWS - Understanding total cost of owner...
AWS SSA Webinar 21 - Getting Started with Data lakes on AWS
AWS SSA Webinar 20 - Getting Started with Data Warehouses on AWS
AWS SSA Webinar 19 - Getting Started with Multi-Region Architecture: Services
AWS SSA Webinar 18 - Getting Started with Multi-Region Architecture: Data
AWS EMEA Online Summit - Live coding with containers
AWS EMEA Online Summit - Blending Spot and On-Demand instances to optimizing ...
AWS SSA Webinar 17 - Getting Started on AWS with Amazon RDS
AWS SSA Webinar 16 - Getting Started on AWS with Amazon EC2
AWS SSA Webinar 15 - Getting started on AWS with Containers: Amazon EKS
AWS SSA Webinar 13 - Getting started on AWS with Containers: Amazon ECS
AWS SSA Webinar 11 - Getting started on AWS: Security
HashiTalks Africa - Going multi-account on AWS with Terraform

Recently uploaded (20)

PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PDF
Paper PDF World Game (s) Great Redesign.pdf
DOCX
Unit-3 cyber security network security of internet system
PPTX
Introduction to Information and Communication Technology
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPT
tcp ip networks nd ip layering assotred slides
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
SAP Ariba Sourcing PPT for learning material
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
Introduction to the IoT system, how the IoT system works
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
innovation process that make everything different.pptx
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
The Internet -By the Numbers, Sri Lanka Edition
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
Module 1 - Cyber Law and Ethics 101.pptx
RPKI Status Update, presented by Makito Lay at IDNOG 10
Paper PDF World Game (s) Great Redesign.pdf
Unit-3 cyber security network security of internet system
Introduction to Information and Communication Technology
PptxGenJS_Demo_Chart_20250317130215833.pptx
tcp ip networks nd ip layering assotred slides
Job_Card_System_Styled_lorem_ipsum_.pptx
SAP Ariba Sourcing PPT for learning material
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Introduction to the IoT system, how the IoT system works
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
Unit-1 introduction to cyber security discuss about how to secure a system
An introduction to the IFRS (ISSB) Stndards.pdf
innovation process that make everything different.pptx
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
Design_with_Watersergyerge45hrbgre4top (1).ppt
The Internet -By the Numbers, Sri Lanka Edition
Power Point - Lesson 3_2.pptx grad school presentation

AWS DevDay Berlin - Automating building blocks choices you will face with container services

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cobus Bernard Senior Technical Evangelist Amazon Web Services B E R L I N 25.10.19 Automating Building Blocks: Choices you will face with Container Services B A R 6 @cobusbernard cobusbernard cobusbernard
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Structureappsascollectionsofmicroservices Properties of microservices Microservices • Independent • Individually Deployed & Scaled • Polyglot • Modular - Easily Replaced • Decentralized
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Rigid Flexible Abstractions Easy Hard 1 System N Systems2 Systems
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Monolith Does everything Monoliths are OK
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Microservicedevelopment lifecycle developers services monitorreleasetestbuild delivery pipelines monitorreleasetestbuild monitorreleasetestbuild monitorreleasetestbuild monitorreleasetestbuild monitorreleasetestbuild
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Usecodetomodelapplicationsandinfrastructure Infrastructure ascode Declarative I tell you what I need I tell you what to do Imperative
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Usecodetomodelapplicationsandinfrastructure Infrastructure ascode goals 1. Make infrastructure changes repeatable and predictable 2. Release infrastructure changes using the same tools as code changes 3. Replicate production environment in a staging environment to enable continuous testing
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Model container environments withAWS Cloud Development Kit(CDK) • Open source framework to define cloud infrastructure • JavaScript, TypeScript, and Python, (Java, and C# in developer preview) • Provides library of higher-level resource types (“construct” classes) that have AWS best practices built in by default • Provisions resources with CloudFormation • Supports all CloudFormation resource types AWS CDK https://awslabs.github.io/aws-cdk
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. CDKtemplate import ec2 = require('@aws-cdk/aws-ec2'); import ecs = require('@aws-cdk/aws-ecs'); import cdk = require('@aws-cdk/cdk'); class BonjourFargate extends cdk.Stack { constructor(parent: cdk.App, name: string, props?: cdk.StackProps) { super(parent, name, props); const vpc = new ec2.VpcNetwork(this, 'MyVpc', { maxAZs: 2 }); const cluster = new ecs.Cluster(this, 'Cluster', { vpc }); new ecs.LoadBalancedFargateService( this, "FargateService", { cluster, image: ecs.DockerHub.image("amazon/amazon-ecs-sample"), }); } } const app = new cdk.App(); new BonjourFargate(app, 'Bonjour'); app.run();
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. CDKtemplate applets: MyHelloWorldService: type: @aws-cdk/aws-ecs:LoadBalancedFargateServiceApplet properties: image: 'amazon/amazon-ecs-sample’ $ cdk --app ./my-applet.yaml deploy
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Model pipelines withAWSCDK • Minimize copy-and-paste by using object-oriented language • Define microservice pipeline “shape” in one class, then re-use it across many pipelines • CDK includes many high-level constructs for modeling a CodePipeline pipeline, including automatically configuring IAM role policies
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. CDKpipelines:Construct export class MyMicroservicePipeline extends cdk.Construct { constructor(parent: cdk.Construct, name: string, props: MyMicroservicePipelineProps) { super(parent, name); const pipeline = new codepipeline.Pipeline(this, 'Pipeline', { pipelineName: props.serviceName, }); const githubAccessToken = new cdk.SecretParameter(this, 'GitHubToken', { ssmParameter: 'GitHubToken' }); new codepipeline.GitHubSourceAction(this, 'GitHubSource', { stage: pipeline.addStage('Source'), owner: 'myorg', repo: props.serviceName, oauthToken: githubAccessToken.value }); …
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. CDKpipelines:Stack import cdk = require('@aws-cdk/cdk'); import { MyMicroservicePipeline } from './pipeline'; class MyMicroservicePipelinesStack extends cdk.Stack { constructor(parent: cdk.App, name: string, props?: cdk.StackProps) { super(parent, name, props); new MyMicroservicePipeline(this, 'Pipeline1', { 'serviceName': 'Microservice1' }); new MyMicroservicePipeline(this, 'Pipeline2', { 'serviceName': 'Microservice2' }); new MyMicroservicePipeline(this, 'Pipeline3', { 'serviceName': 'Microservice3' }); new MyMicroservicePipeline(this, 'Pipeline4', { 'serviceName': 'Microservice4' }); } } const app = new cdk.App(); new MyMicroservicePipelinesStack(app, 'MyMicroservicePipelines'); app.run();
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Sundays …
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Availability zone 1 Auto Scaling group AWS Region Availability zone 2 Auto-scaling for upgrades Elastic Load Balancing (ELB) X
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWSCodeBuild • Fully managed build service that compiles source code, runs tests, and produces software packages • Scales continuously and processes multiple builds concurrently • No build servers to manage • Pay by the minute, only for the compute resources you use • Monitor builds through CloudWatch Events
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Usecodetomodelapplicationsandinfrastructure Model function environments withAWSServerless Application Model (SAM) • Open source framework for building serverless applications on AWS • Shorthand syntax to express functions, APIs, databases, and event source mappings • Transforms and expands SAM syntax into AWS CloudFormation syntax on deployment • Supports all AWS CloudFormation resource types https://aws.amazon.com/serverless/sam/
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Containers and Docker A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.1 1 https://www.docker.com/resources/what-container Server Operating System Docker Engine AppA AppB AppC AppD
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments • Docker tags are resolved when each container starts, not just during deployments • Deploying “latest” or “prod” can result in untested code in production after a scale-out event • Use unique “immutable” tags for deployments
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments Build pushes new “latest” image Image: sha256@22222... (“latest”)
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments Service scales up, launching new tasks Image: sha256@22222... (“latest”)
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments Deploy using immutable tags { "name": "sample-app", "image": "amazon/amazon-ecs- sample@sha256:3e39d933b1d948c92309bb583b5a1f3d28f0119e1551ca1fe538ba414a41af48d" } { "name": "sample-app", "image": "amazon/amazon-ecs-sample:build-b2085490-359f-4eaf-8970-6d1e26c354f0" } SHA256 Digest Build ID
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments Compute immutable tags during build SHA256 Digest export IMAGE_URI=`docker inspect --format='{{index .RepoDigests 0}}' my_image:$IMAGE_TAG Example Result: amazon/amazon-ecs-sample@sha256:3e39d933b... Build ID export IMAGE_TAG=build-`echo $CODEBUILD_BUILD_ID | awk –F":" ‘{print $2}'` Example Result: build-b2085490-359f-4eaf-8970-6d1e26c354f0
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments Build pushes new image tagged with new build ID Image: sha256@22222... (“build-22222”)
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments Service scales up, launching new tasks Image: sha256@22222... (“build-22222”)
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Container imagetagging for deployments Image: “build-22222” tag Deployment updates service’s task definition, replacing tasks Image: sha256@22222... (“build-22222”)
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Buildwithserverlesstechnologiesasmuchaspossible AWS container serviceslandscape Management Deployment, Scheduling, Scaling & Management of containerized applications Hosting Where the containers run Amazon Elastic Container Service Amazon Elastic Container Service for Kubernetes Amazon EC2AWS Fargate Image Registry Container Image Repository Amazon Elastic Container Registry
  • 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS key components Development cluster Container instance Container instance Container instance Productioncluster Container instance Container instance Container instance AmazonElastic Container Service (AmazonECS) Container Container Volume Taskdefinition AmazonElastic Container Registry
  • 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Kubectl EKS Architecture
  • 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 44. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 45. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 46. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 47. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 48. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. ShiftinInfrastructure Logic OSS Hystrix: code changes required Service Mesh: decentral, language agnostic, dumb endpoints https://www.infoq.com/articles/microservices-post-kubernetes ESB: clustered monolith
  • 49. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Open Source: Istio Service Mesh Connect, secure, and observe services • Shift in where functionality is located • Control plane = Istio • Data plane = set of all Envoy proxies • Envoy proxy as sidecar in K8s pod • Automatic or manual injection of proxy with EKS
  • 50. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data Plane (Proxy) • Touches every packet / request • Service discovery • Health Checking • Routing • Load Balancing • Authentication / Authorization • Observability
  • 51. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. IstioServiceMeshwithEnvoyProxy
  • 52. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Envoy Proxy • Level 7 proxy • HTTP, HTTP/2, gRPC, AWS Dynamo DB, MongoDB • C++11 code base , only 8 MB (statically linked) • No language or framework dependencies • Rquires no code changes • Battle proved OSS, started at Lyft • Works across compute options – also on EC2 • Envoy is not tightly coupled Istio
  • 53. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. UpdateStrategies A bath tub full of cold water ? K8s roling update 25% 1 pod at a time … or just wetten your feet? Service Mesh 3% Traffic routing 🛁 🛁 🛁 💦 🛀🏽🛁 🌊❄️🌊❄️🌊❄️ Fancy a Swim in the Arctic Sea ? Blue / Green 100% All services at once
  • 54. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. User Based Routing Traffic Shifting
  • 55. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. App Mesh works across compute services Amazon ECS AWS Fargate Amazon EKS Amazon EC2 Kubernetes on EC2
  • 56. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Cobus Bernard Senior Technical Evangelist Amazon Web Services @cobusbernard cobusbernard cobusbernard

Editor's Notes

  • #3: Each team can move independently and simultaneously In contrast to Monolith (where the Deployment Unit is the entire program), Microservice has a separate deployment pipeline, enabling us to make small changes and speed up our Release Velocity. Each microprocessor can be written in a different language, and each team can choose its own technology stack - the most convenient or appropriate tools. Modularity - Because each unit is small, it can be easily replaced. Distributed work reduces dependence between different parts - but there are, however, common principles that aim to facilitate coordination and organizational standards.
  • #4: When you know you’re going to need to eventually handle more than one type of a thing, consider generalizing. Take for example integrating payments systems, building for one is easy but integrating with any system, even those you are unaware of is really hard. Click Generalize… But just barely-, make your system capable of handling two kinds of things. This will help you avoid too tightly coupling. Click As long as the systems are not too similar you will be abstracting a good amount of flexibility for the effort.
  • #5: Starting with a monolith is often the right choice, it allows for fast development at the early stage. As you don’t need to design the process boundaries ahead of time. A designed monolith can be scaled horizontally and broken apart later if needed. Depending on the type of startup, you may never outgrow the scaling capacity of a well-designed monolith.
  • #6: The solution is self-service tools and automation….enabling each one of the DevOps teams to own and manage their own release process.
  • #8: There are different approaches for IaC, but it is important to use one with declarative syntax, like CloudFormation or Terraform
  • #10: The AWS CDK is an infrastructure modeling framework that allows you to define your cloud resources using an imperative programming interface. The CDK is currently in developer preview. We look forward to community feedback and collaboration.
  • #11: OPTIONAL: a live demo with the CDK with this sample code
  • #12: Applets are YAML files that directly instantiate constructs, without writing any code.
  • #13: To configure AWS CodePipeline pipelines with the CDK. When you add a microservice, you need to create a new pipeline, similar to your other ones. With CDK you can use an higher level class instead of copying and pasting lots of YAML code.
  • #14: Constructs are the building blocks of AWS CDK applications. Constructs can have child constructs, which in turn can have child constructs, forming a hierarchical tree structure. The AWS CDK includes two different levels of constructs: CloudFormation Resource These constructs are low-level constructs that provide a direct, one-to-one, mapping to an AWS CloudFormation resource, as listed in the AWS CloudFormation topic AWS Resource Types Reference. All CloudFormation Resource members are found in the @aws-cdk/resources package. AWS Construct Library These constructs have been handwritten by AWS and come with convenient defaults and additional knowledge about the inner workings of the AWS resources they represent. In general, you will be able to express your intent without worrying about the details too much, and the correct resources will automatically be defined for you. AWS Construct Library members are found in the @aws-cdk/NAMESPACE packages, where NAMESPACE is the short name for the associated service, such as SQS for the AWS Construct Library for the Amazon SQS service. See the Reference section for descriptions of the AWS CDK packages and constructs.
  • #15: In the stack you can use the constructs you defines before, like the pipeline we created in the previous slide.
  • #18: The most common purpose for an auto scaling groups is resiliency; instances are put into a fixed-size auto scaling group so that if an instance fails, it is automatically replaced. The simplest use case is an auto scaling group has a min size bigger than 1.
  • #34: The current AWS container services landscape covers a broad set of products. Not all are serverless (Fargate) So you have other options. At the orchestration layer we’ve Amazon ECS and Amazon EKS. EKS makes it easy to deploy, manage, and scale containerized applications using Kubernetes on AWS. You can currently run your containers on ECS using either the EC2 launch type – where get to manage the the underlying instances on which your containers are running - or you can choose to run your containers in a serverless manner with the AWS Fargate launch type. Finally, we provide a registry services, Amazon ECR, where you can store your container images.
  • #36: Fully managed control plane: Multi az, right sized master setup etcd scaled automatically, Provisioned IOPS, snapshotted at intervals Worker nodes: Spot instances / GPU / autoscaling group You can think about EKS as a managed Kubernetes API endpoint. It’s upstream Kubernetes, no forking: So you can take your kubectl and communicate with the endpoint. Use all your tools
  • #41: Creation + storing Rotation Dynamic - storming
  • #49: ESB: Dumb endpoints smart pipes uS: Smart endpoints, dump pipes Retries, circuit breaker pattern, routing etc. Netflix Open Source Software Center
  • #50: Creating services is easier, Manage parts go harder. New pattern: offload to proxy Istio is the control plane and Envoy is the data plan Istio, at its core, handles the routing, load balancing, flow control and security needs of microservices. It sits on top of existing distributed applications and basically helps them talk to each other securely, while also providing logging, telemetry and the necessary policies that keep things under control (and secure). It also features support for canary releases, which allow developers to test updates with a few users before launching them to a wider audience, something that Google and other webscale companies have long done internally. The data plane is composed of a set of intelligent proxies (Envoy) deployed as sidecars. These proxies mediate and control all network communication between microservices Touches every packet/request in the system. Responsible for service discovery, health checking, routing, load balancing, authentication/authorization, and observability. Service mesh control plane: Provides policy and configuration for all of the running data planes in the mesh. Does not touch any packets/requests in the system. The control plane turns all proxies into a distributed system. https://blog.envoyproxy.io/service-mesh-data-plane-vs-control-plane-2774e720f7fc
  • #51: Originally from Lyft Envoy is a nice peace of engineering with a lot of good background articles to read: Now used by various cloud providers and in OSS projects to build everything from API GW to LBs Linkerd and Nginx have shown Istio integration. Data plane can be swapped. Not so tightly coupled Since it is level 7, it can route for URL, user agent = Safari / Chrome ,
  • #52: Explain sidecar pattern, same network namespace IP/ports. Sidecar injection: default namespace gets a tag. Istio injects pod when tag is set. Chaos engineering. Try to break things before they break in prod. Add delay of 5 seconds. Kubectl apply -f CRD: kubectl get virtualservices ### The service mesh a lot of attention right now (rightly so!) The Istio model of a service is independent of how it is represented in the underlying platform (Kubernetes, Mesos, Cloud Foundry, etc.).  clients of a service have no knowledge of different versions of the service, continue to use host / IP VirtualService:  rules that control how requests for a service are routed within an Istio service mesh. Kubetctl get virtualservices / destinationrules – uses CUSTOM RESOURCE DEF https://istio.io/docs/concepts/traffic-management/#rule-configuration
  • #53: Originally from Lyft Envoy is a nice peace of engineering with a lot of good background articles to read: Now used by various cloud providers and in OSS projects to build everything from API GW to LBs Linkerd and Nginx have shown Istio integration. Data plane can be swapped. Not so tightly coupled Since it is level 7, it can route for URL, user agent = Safari / Chrome ,
  • #54: Replica deployment / traffic flow Free symbol https://iccpic.com/free-icon/bathtub-house_64734.html https://iccpic.com/free-icon/foot_479564.html
  • #56: It is all the same mesh. Use mesh to migrate from monolith to containers Mesh Does not have to be container, helps to containerize. Remember the options for modernization of legacy apps: different solutions App mesh embraces them all Based on Istio data plane, but we implemented a control plane and that HA, for you. ECS, Fargate: You add the Envoy proxy image to the task definition OBSERV, Tracing: Iintegrated with Cwatch log & metric, X Ray Traffic Management: LB, Path based routing