Slide 1

Slide 1 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Dr. Frank Munz Technical Evangelist, AWS @frankmunz Getting Started with Containers in the Cloud

Slide 2

Slide 2 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. About me • Software Architect / DevOps Engineer • Technical Evangelist @ AWS • Published an AWS book (some years ago) • Containers, and a sprinkle of ML & big / fast data @frankmunz

Slide 3

Slide 3 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda 1. Containers (demo) 2. Microservices 3. AWS ECS 4. AWS EKS 5. Service Mesh and CNCF Projects

Slide 4

Slide 4 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo Time!

Slide 5

Slide 5 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What are containers? 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. A popular, widely-used container platform is Docker. More on that here: https://www.docker.com

Slide 6

Slide 6 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Microservices

Slide 7

Slide 7 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What are Microservices? Developing a single application as • Suite of small services • Each running in its own process / owns it‘s data • Communicating with lightweight mechanisms (Definition: M. Fowler / J. Lewis) https://martinfowler.com/articles/microservices.html

Slide 8

Slide 8 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Splitting the Monolith – A. Cockroft @ AWS https://youtu.be/aBcG57Gw9k0

Slide 9

Slide 9 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Technical Challenges SW-Architecture HW / Network Tools How to split a monolith? Database CQRS / Event Sourcing Containers + Serverless + Cloud Services CI / CD Code Repositories IDEs gRPC / REST / SOAP Network Latency CPU Speed

Slide 10

Slide 10 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Organisational Challenge

Slide 11

Slide 11 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Containers at Scale

Slide 12

Slide 12 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. We’ve had customers running Docker on EC2 from the very beginning… EC2

Slide 13

Slide 13 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. But there were pain points. Things like scheduling, placing, managing and deploying containers were difficult. They wanted something to make those pain points better.

Slide 14

Slide 14 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. + Managing many containers is hard

Slide 15

Slide 15 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. So we built ECS

Slide 16

Slide 16 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ECS Easiest way to deploy and manage containers at scale Integration with entire AWS platform ALB, Auto Scaling, Batch, Elastic Beanstalk, CloudFormation, CloudTrail, CloudWatch Events, CloudWatch Logs, CloudWatch Metrics, ECR, EC2 Spot, IAM, NLB, Parameter Store, and VPC Scales to support clusters of any size Service integrations (like ALB and NLB) are at container level 1 2 3

Slide 17

Slide 17 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon ECS EC2 INSTANCES ECS AGENT TASK Containers TASK ECS AGENT TASK TASK AGENT COMMUNICATION SERVICE Amazon ECS API CLUSTER MANAGEMENT ENGINE KEY/VALUE STORE ECS AGENT TASK TASK Internet LOAD BALANCER LOAD BALANCER Containers Containers

Slide 18

Slide 18 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. … therefore we built Fargate

Slide 19

Slide 19 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What does Fargate mean? No worrying about scaling, underlying infrastructure, cluster resources, capacity, setup. Just give it a task definition, set some resource limits, and away you go.

Slide 20

Slide 20 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. So you want to run a (managed) container on AWS Choose your orchestration tool 1 Choose your launch type 2 ECS EKS EC2 Fargate EC2 Fargate (announced)

Slide 21

Slide 21 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. 160 billion analytics events per month Up to 270,000 events per second Autoscaling allows them to burst to thousands of containers to seamlessly handle demand ECS

Slide 22

Slide 22 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Kubernetes enters the stage

Slide 23

Slide 23 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. … and devops love Kubernetes

Slide 24

Slide 24 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. What is Kubernetes (K8s)? Open source container management platform Helps you run containers at scale Gives you primitives for building modern applications

Slide 25

Slide 25 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. “Run Kubernetes for me.”

Slide 26

Slide 26 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. So we built EKS!

Slide 27

Slide 27 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Availability Zone 1 Availability Zone 2 Availability Zone 3 Kubectl EKS Architecture

Slide 28

Slide 28 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. EKS is Kubernetes Certified + Heptio IAM Authenticator (open sourced) VPC Networking (open sourced)

Slide 29

Slide 29 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. EKS: Standard console and kubectl CLI

Slide 30

Slide 30 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. https://eksctl.io/ Tip: Easy way to create an EKS cluster: $ eksctl create cluster --name eks-test --nodes 3

Slide 31

Slide 31 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS ECS or EKS? On-prem and cloud workloads, open-source affinity, CNCF projects, already bought into K8s: AWS EKS Tight integration with AWS cloud, very large clusters: AWS ECS. Use Fargate mode if you don‘t want to manage your hosts yourself

Slide 32

Slide 32 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. There comes more with K8s (and it runs on EKS!)

Slide 33

Slide 33 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Slide 34

Slide 34 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Service Meshes

Slide 35

Slide 35 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Open Source Istio Service Mesh with Envoy Proxy Add a 5s delay to 10% of all requests

Slide 36

Slide 36 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Istio Service Mesh with Envoy Proxy • Connect, secure, and observe services • Istio control plane + Envoy data plane • Envoy proxy as sidecar in pods • Automatic injection with AWS EKS • Level 7 proxy • HTTP, HTTP/2, gRPC, AWS Dynamo DB, MongoDB • C++11 , 8 MB

Slide 37

Slide 37 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CNCF Jaeger

Slide 38

Slide 38 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CNCF Grafana

Slide 39

Slide 39 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. CNCF Servicegraph

Slide 40

Slide 40 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customers

Slide 41

Slide 41 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Snap @AWS Summit in New York 2018 https://youtu.be/mCVdcz01Z-g?t=2052

Slide 42

Slide 42 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Conclusion • Architect wisely. Consider AWS ECS or Kubernetes and cloud services • Running Kubernetes is hard, use a managed K8s service like AWS EKS • AWS EKS is unforked, upstream K8s • CNCF projects complement K8s • They work with AWS EKS. You can install open-source Istio with Envoy as a helm chart. It ties into Jaeger, Grafana etc. • Run your containers in the cloud

Slide 43

Slide 43 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. References Ø Getting Started with Istio on Amazon EKS https://aws.amazon.com/blogs/opensource/getting-started-istio-eks/ Ø EKS Workshop (K8s, Helm, CI/CD, Grafana, Kabana) https://eksworkshop.com/introduction/ Ø AWS EKS Documentation https://docs.aws.amazon.com/eks/latest/userguide/what-is-eks.html Ø Introduction to modern network load balancing and proxying https://blog.envoyproxy.io/introduction-to-modern-network-load-balancing-and-proxying-a57f6ff80236 Ø Istio Book https://www.manning.com/books/istio-in-action Ø InfoQ: Microservices in a Post-Kubernetes Era https://www.infoq.com/articles/microservices-post-kubernetes Ø Istio: Will a Service Mesh become the new Service Bus? (AWS EKS) https://www.youtube.com/watch?v=fDmJf9kWFws Some of these slides are based on a slide deck from @abbyfuller

Slide 44

Slide 44 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Getting Started: EKS Workshop https://eksworkshop.com/

Slide 45

Slide 45 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Open-source Istio and Enovy on AWS EKS https://www.youtube.com/watch?v=fDmJf9kWFws

Slide 46

Slide 46 text

© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Dr. Frank Munz Technical Evangelist, AWS Thank you! @frankmunz