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

Zero Downtime Deployments with Docker

Zero Downtime Deployments with Docker

This talk basically talks about how we can use haproxy and docker instances to avoid downtime during Rails deployments.

Vamsee Kanakala

January 04, 2014
Tweet

More Decks by Vamsee Kanakala

Other Decks in Programming

Transcript

  1. What is Docker? • Commoditizes LXC • Portable deployments across

    machines • Efficient, quick provisioning • Near-native performance • Git-like versioning of images • Component re-use • Application-centric
  2. What is LXC? • Provides OS-level virtualization for Linux •

    Own process space • Own network interface • Own init framework • Isolation achieved with cgroups • But shares kernel with the host
  3. Basic workflow • Pull docker images from public registry •

    Run it on your host • Add your own changes • Push it back to share them • Or you could build from ground up... • You can setup a private registry • Or you can sign up for a SaaS offering
  4. Dockerfile • The default way to build it from base

    image • Basically a glorified shell script • But definitely easier to maintain • FROM, RUN, CMD, EXPOSE, ENV, ADD, VOLUME, ENTRYPOINT, etc. • You can create your own base image with tools like debootstrap
  5. Zero-Downtime Deployments • Why do you need them? • Continuous

    delivery • Continous deployments • Rails – long deploys • Migrations? Funny things happen • Asset compilation... zzz • Not limited to Rails, though
  6. Some helpful links... • http://ww.docker.io • http://haproxy.1wt.eu/ • http://www.dockerbook.com/ •

    http://tech.yandex.ru/events/yac/2013/talks/108 5/ • Dokku, Flynn.io, CoreOS, Deis.io, Quay.io, Orchardup.com, and many more...