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

Paris container Day 2017 - Production FS: Adapt...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Paris container Day 2017 - Production FS: Adapt or Die - Claudia Beresford & Tiago Scolari, Pivotal

Avatar for Paris Container Day

Paris Container Day

June 13, 2017

More Decks by Paris Container Day

Other Decks in Technology

Transcript

  1. Summary ✘ Glossary - What is a Root Filesystem? ✘

    What is CloudFoundry? ✘ Warden ✘ Garden Linux ✘ Garden runC ✘ GrootFS + Garden runC ✘ The Future ✘ Questions?
  2. ✘ Top of the dir structure ✘ Mount point for

    other FSes at boot ✘ Contains all critical startup files ✘ Sets state of system ✘ Has tools for recovery of broken system and data What is a Root FileSystem?
  3. ✘ Open Source Platform as a Service ✘ Development started

    in 2009 (VMWare) ✘ First released in 2011 ✘ Run application inside containers ✘ Supports buildpacks and Docker images What is CloudFoundry?
  4. Provide framework and runtime support for applications Officially supported: ◦

    Binary ◦ Go ◦ Java ◦ .Net Core ◦ Node.js Buildpacks? ◦ PHP ◦ Python ◦ Ruby ◦ Static File
  5. Warden ✘ Developed in Ruby and C ✘ Initially with

    LXC ✘ Coupled to Linux Namespaces (exc User) & cgroups
  6. WHY AUFS? ✘ Mounting the rootfs was faster than copying

    it ✘ No duplicated files But... ✘ No support for quotas ✘ Not in Mainline Kernel
  7. RootFS Mnt: RootFS RW Layer Droplet Mnt: RootFS RW Layer

    Droplet Mnt: RootFS RW Layer Droplet ... root root root root unique uid APP1 APP2 APP3
  8. Garden & Diego ✘ Replacement for Warden ✘ Go (w)arden

    - Garden ✘ Platform Agnostic API - future support for windows ✘ New scheduler ✘ DEA(Go) - Diego
  9. + Docker Images ✘ No control over RootFS anymore ✘

    Security Risks ✘ User namespaces
  10. Why BTRFS? ✘ Dependence on Docker graph driver ✘ Built

    in support for quotas ✘ The other options were: Overlay - not mature DeviceMapper - required LVM ZFS - proprietary
  11. And... ✘ Huge Performance Hit: BTRFS blamed (eventually) ✘ Theory

    was BTRFS garbage collection was consuming all IOPS from the cells ✘ BTRFS new and didn’t have enough support at the time
  12. RootFS Mnt: RootFS mnt:/dev/loop1 Droplet ... root root APP1 Mnt:

    RootFS mnt:/dev/loop2 Droplet root APP2 Mnt: RootFS mnt:/dev/loop3 Droplet root APP3 sparse
  13. Open Containers Initiative / RunC ✘ Open Standard for containers

    specification ✘ Implementation of OCI container specs
  14. 2015/2016 ✘ OCI: Image-Spec ✘ GrootFS - new project to

    replace Garden Linux backend Dedicated team ✘ Security: Garden runC Rootless
  15. Why BTRFS, again? ✘ Snapshotting: plays well with container images

    ✘ Could be (almost) rootless ✘ Quotas ✘ Previous issues fixed in kernel 4.4 ✘ Big companies investing ✘ Support from Canonical
  16. XFS folder app1/ Overlay mount upperdir: app1/diff lowerdirs: layer1:layer2:layer3 App

    1 XFS folder app2/ Overlay mount upperdir: app2/diff lowerdirs: layer1:layer2:layer3 App 2
  17. What’s Next? ✘ EXT4 Kernel 4.5 in Stemcell Match host

    FS ✘ ShiftFS On the fly user mappings No translation layer