Evolution of a Docker PAAS

Gabriel Monroy / @gabrtv

About Me

  • 15+ years in IT ops and systems programming
  • Worked at Intuit, Temboo and as a freelance consultant
  • Early and frequent Docker contributor
  • Creator of the Deis project

About Deis

  • First Multi-Host Docker PAAS
  • Heroku-inspired workflow
  • 100% open source
  • Python & Go

Why Docker?

  • Speed
  • Density
  • Portability
  • Community

Why Deis?

Docker is not enough!

Developer Workflow

  • Create applications
  • Deploy code and build artifacts
  • Configure runtime environment
  • Manage releases and rollbacks
  • Run ephemeral commands
  • View aggregated logs
  • Scale out via the process model
  • Collaborate with a team

Division of Responsibility

  • Developers own the containers
  • Operations own the platform

Philosophy


  • Keep a stable developer workflow
  • Rapidly improve the underlying implementation
  • Evolve with the Docker ecosystem

Approach


  • Focus on 12 Factor Apps
  • Use external backing services for state
  • Integrate with adjacent technologies

Deis Today


  • 1,900+ stars, 110+ watchers, 200+ forks
  • 5 full-time devs, ~40 contributors
  • > 100 Deis deployments "in the wild"

How did we get here?

Rush to prototype

Minimum Viable Workflow


$ deis register http://deis.local

$ deis keys:add ~/.ssh/id_rsa.pub

$ deis create myapp

$ git push deis master

$ deis config:set DATABASE_URL=postgres://

$ deis scale web=8
				    

What did we need?

  • Command-line Interface
  • API Server
  • Git Server
  • Buildpacks
  • Scheduler

Workarounds

  • Chef databag scheduler
  • UNIX signal gymnastics
  • Bind mounts

Deis 0.1.0

Docker Goes on a Tear


More Features!

Add to Developer Workflow

  • deis logs
  • deis run
  • deis releases
  • deis sharing

Docker Gets Popular

Learn from the Community

Docker Gets Stable

Dockerize Deis

Deis Components

  • deis/controller
  • deis/database
  • deis/cache
  • deis/logger
  • deis/builder
  • deis/registry
  • deis/router

Deis Artifacts

  • Switch from bind mounts to pure Docker Images
  • Dockerfile shim for injecting Heroku Buildpack output
  • Add last-mile layer for configuration data
  • Distribute containers from private registry

Challenges

  • Docker volumes are hard to work with
  • Docker index errors are non-deterministic
  • Difficult to debug live containers

Deis Gets Popular


Scalability Issues

Deis Scalability Issues

  • Max of 20 servers or 5 deploys/minute
  • Node convergence is slow
  • Pushing the limits of CM

Real Scheduler

Scheduler Prototyping

  • Mesos/Marathon
  • Flynn Layer 0
  • CoreOS/Fleet


Today


  • Deployed at companies of all sizes
  • Active user and developer communities
  • Growing rapidly

Sneak Peek

Deis Build


  • Alternative to `git push` workflow
  • Promote existing Docker images, bit-for-bit
  • Use public index or private registries
  • Deeply integrated with 12 factor model

What's Next?

  • Deploy Deis applications on Mesos using Marathon
  • Identical workflow, enterprise-grade scheduler
  • Mesos is in full production at Twitter, Hubspot, Airbnb
  • Working closely with Mesosphere team


  • Libswarm: "Docker Native" orchestration
  • Deploy Deis applications to any Docker API endpoint
  • Bring post-1.0 Docker features to Deis

Lessons Learned


  • Write the documentation first
  • Pay attention to the ecosystem
  • Stand on the shoulders of giants
  • Invest heavily in automated testing

Contributing

We're Hiring!

Questions?

Resources