Upgrade to Pro — share decks privately, control downloads, hide ads and more …

containers sotu (london summit)

E5b21a91ebcda83d51e9d59fdc0883cc?s=47 Abby Fuller
May 10, 2018
140

containers sotu (london summit)

E5b21a91ebcda83d51e9d59fdc0883cc?s=128

Abby Fuller

May 10, 2018
Tweet

Transcript

  1. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. Abby Fuller @abbyfuller, Developer Relations Containers on AWS L O N D O N
  2. First things first… What are containers and why are customers

    using them?
  3. What are containers? A container is an atomic, self-contained package

    of software that includes everything it needs to run (code, runtime, libraries, packages, etc.). A popular, widely-used container platform is Docker. More on that here: https://www.docker.com
  4. None
  5. Why are containers so popular? Portable Lightweight Standardized Easy to

    deploy Along with containers, comes the “monolith to microservices” story: containers and microservices go hand in hand (more on that in a second)
  6. OK, so what are microservices? ”Service oriented architecture composed of

    loosely coupled elements that have bounded contexts.” - Adrian Cockroft
  7. webserver .package Order UI Order Service Inventory Service Shipping Service

    OrderUI Shipping Service Order Service Inventory Service
  8. What are people building with containers on AWS?

  9. Short answer: everything!

  10. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. Running one container is easy
  11. But there are still moving pieces Server Guest OS Bins/Libs

    Bins/Libs App2 App1
  12. Managing many containers is hard Server Guest OS Server Guest

    OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS
  13. Enter container orchestration tools

  14. What are container orchestration tools? Framework for managing, scaling, deploying

    containers.
  15. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. So what’s the container landscape look like on AWS? L O N D O N
  16. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. What does the landscape look like all together? Amazon ECS (available now) Amazon EKS (preview) Fargate mode for ECS (available now) Fargate mode for EKS (available 2018)
  17. ECS Easiest way to deploy and manage containers 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
  18. What we did with ECS in 2017 Container access to

    environmental metadata Network Load Balancer support Console support for SpotFleet Override parameters for RunTask and StartTask APIs Task Elastic Network Interface Application Load Balancer Support HIPAA eligibility Console UX improvements CLI V1.0 Container instance draining Windows containers Cron and Cloudwatch Event Task scheduling Support for Docker Privileged Mode Lifecycle Policies for container images Beijing Region Support for Device and Init flags Add attributes during boot Seoul Region Linux capabilities
  19. EKS Managed Kubernetes on AWS Highly available Automated version upgrades

    Integration with other AWS services Etcd Master Managed Kubernetes control plane CloudTrail, CloudWatch, ELB, IAM, VPC, PrivateLink
  20. Fargate Launch quickly Scale easily No infrastructure Resource based pricing

    Containers on demand Manage everything at container level
  21. What does Fargate mean? No worrying about scaling, service mesh,

    underlying infrastructure, cluster resources, capacity, setup. Just give it a task definition or pod (in 2018), set some resource limits, and away you go.
  22. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. “When someone asks you for a sandwich, they aren’t asking you to put them in charge of a global sandwich logistic chain. They just want a sandwich”
  23. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. AMAZON CONTAINER SERVICES 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
  24. How do I know when to use Fargate vs EC2

    mode? Depends on your workload. For Fargate: if you have a Task Definition, and you’re ok with awsvpc networking mode, try Fargate. Some caveats: can’t exec into the container, or access the underlying host (this is also a good thing) For EC2 mode: good if you need to customize!
  25. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. What are the differences between ec2 mode and Fargate? • Change in networking mode: "networkMode": "awsvpc” • Only specify container port, no host port: • "portMappings": [{"containerPort": ”8081"}] • No links (only local loopback) • No ELB Classic, only ALB or NLB. ALB needs to use target type IP, not instance. • Launch Type: Fargate
  26. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. New and important! requiresCompatibilities parameter. "requiresCompatibilities": ["FARGATE"] You can have tasks that have multiple compatibilities: "requiresCompatibilities": ["FARGATE”, “EC2”]
  27. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. Hang on, what’s awsvpc? New task level networking type. Each Task is assigned an ENI (Elastic Network Interface), and a private IP (and optionally a public IP, if you’re using Fargate) from your subnet. This allows for simplified container networking: containers that are part of the same task (and thus on the same host) can use the local loopback interface. Containers not on the same host use the ENI/hostname/IP
  28. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. Need some more info on working with awsvpc? https://aws.amazon.com/blogs/compute/task- networking-in-aws-fargate/ https://aws.amazon.com/blogs/compute/introd ucing-cloud-native-networking-for-ecs- containers/
  29. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. Need help migrating between Fargate and EC2? https://aws.amazon.com/blogs/compute/migr ating-your-amazon-ecs-containers-to-aws- fargate/
  30. ECS: can be totally managed, or can customize resource usage,

    networking, task placement etc. to fit your application needs. Shared responsibility with AWS (because managed service). ecs-agent is open source. Easy integration with other AWS services. EKS: managed, upstream Kubernetes. Can connect to clusters through kubectl and use existing tooling. Can opt in to managed version upgrades. Add resources to your cluster through EC2 (now), or with Fargate mode (2018). Fargate: underlying technology for containers on demand. Pass a Task Definition or Kubernetes Pod, set resource limits, and Fargate manages everything else. NO access to underlying host, no managing of resources. Great if you don’t want to handle scaling, orchestration, deployments, upgrades yourself. Not for those of you that are making changes to your infrastructure (i.e., bringing custom AMIs, or installing things through EC2 user-data) tl;dr
  31. https://medium.com/containers-on- aws/choosing-your-container-environment- on-aws-with-ecs-eks-and-fargate- cfbe416ab1a Need more info on how to

    choose?
  32. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. I get by with a little help from my friends
  33. CLIs (that I know of) for Fargate/ECS: aws-cli: the official

    OG. Open source, includes most AWS services. • More info here: https://aws.amazon.com/cli/ • Github here: https://github.com/aws/aws-cli ecs-cli: also official, but just for ECS. Supports docker compose files. • More info here: https://github.com/aws/amazon-ecs-cli Some good unofficial options: Fargate cli: https://github.com/jpignata/fargate Coldbrew cli: https://github.com/coldbrewcloud/coldbrew-cli
  34. The awesome-ecs project: https://github.com/nathanpeck/awesome-ecs

  35. Workshops! From @brentcontained https://t.co/ba0usbZqHN

  36. Kubernetes on AWS From @nathanpeck https://github.com/nathanpeck/aws-workshop-for-kubernetes

  37. ECS two ways From @arungupta https://github.com/arun-gupta/ecs-workshop From @abbyfuller (me) https://github.com/abby-fuller/ecs-demo

  38. © 2018, Amazon Web Services, Inc. or Its Affiliates. All

    rights reserved. What’s next?
  39. We want to hear from all of you! More focus

    on supporting Tasks as compute primitive, more focus on removing undifferentiated heavy lifting. Our roadmap is driven by feedback:
  40. How can I get started? • To join the EKS

    preview: https://aws.amazon.com/eks/ • To get started with Fargate: https://aws.amazon.com/fargate/ • Blogs: https://aws.amazon.com/blogs/aws/aws-fargate/ • https://aws.amazon.com/blogs/aws/amazon-elastic-container-service-for-kubernetes/ • Liz Rice from Aquasec on Fargate: https://blog.aquasec.com/securing-struts-in-aws-fargate • Nathan Peck from AWS: https://medium.com/containers-on-aws/choosing-your-container-environment-on-aws- with-ecs-eks-and-fargate-cfbe416ab1a • Deepak Singh (containers GM at AWS): https://www.slideshare.net/AmazonWebServices/containers-on-aws-state- of-the-union-con201-reinvent-2017
  41. Need a little help? Community Slack channels: awsdevelopers.slack.com amazon-ecs.slack.com Or

    reach out to one of us directly: @abbyfuller or abbyfull@amazon.com @nathankpeck @brentcontained @paulmaddox
  42. Go build (and tell us about it)!

  43. Thank you!