The Revolution Will Be
Credits
The @docker presentation to beat is https://github.com/jbarratt/dockertalk …. Thanks @jbarratt for looking past the buzz and doing our work justice. -- Solomon Hykes
In the beginning, there was the computer
From the beginning we've neededto figure out how to share these things.
It wasn't long after the first computer that Time Sharing started (1957)
What do we need to share?
Resources: We all get enough (but not too much)
Security/Privacy: We stay out of each other's stuff
Dependencies: Apps & Libs I need
Many Strategies
Impacts
The cloud is built mostly around IaaS/VM technology.
EC2, VMWare, KVM, Xen
OS Images
This seems to be the de-facto way to deploy apps these days.
Tons of development work has gone into figuring out how to make this work.
Virtuozzo/OpenVZ ("Thick Containers")
This sparked my love for containers as it's what we do at (mt)
Much higher memory desnity, lower startup time, copy-on-write filesystem, but still acts like a whole system.
Can't customize the kernel but otherwise pretty server-like
3-10x better density & performance, depending on workload
Also supports VM niceties like Live Migration
Other players here, Solaris Zones.
Density/Efficiency: We should care.
Profit
Extra servers, networking gear
Power Costs
Performance
Social and Environmental Responsibility
Power usage = C02
Shipping = C02
Manufacturing = Precious Metals, Toxic Waste
Also, can be terrible working conditions.
Powering & Cooling a server for 3-8 months will generally equal the original costs of the device.
By Density I mean "how densely we can pack services without degrading service quality." Not overselling.
On Power
TL;DR Today's Cloud Might Need Improvement
Let's take a look at the workload.
Apps & Server Layer
How do we ship our applications?
It depends, lots of strategies.
I'm going to outline a common "good practice" we use and then look at how it could be improved.
A Hypothetical Python App
We need python 3.2. Damn, distro doesn't provide it.
Need a library that clashes with the system's version. Damn.
We package the whole mess, using virtualenv
and some glue.
Oh, and we need redis 2.6 for Lua support. Distro has 2.4. Triple damn.
Oh, and the QA team has standardized on Centos.
Oh, BTW, the new search service is a node.js app, that's cool, right?
Let's walk through a simple modern case.
Netflix Model
Bake an entire server image
Test as a unit
Use for deploy and rollback
Progress! But, 'the computer' is a very chunky unit of abstraction.
Not sure if they invented it, but the first use case I saw.
The Tricky Bits
Lots of sysadmin surface area
Additional Daemons to run & manage
Large images to juggle. 1 byte change? 0.5 GB image.
Boot Times. 2 seconds - 15 mins (OpenStack nodepool)
Density isn't great.
What about PaaS?
Cool! "Process Virtualization Not Server Virtualization."
Sort of.
Local dev, QA, staging can be tough to clone their versions of.
Hard upper bound on troubleshooting
Generally fixed userland
Lots of capability limits (daemons, storage, networking, etc)
DREAM WITH ME
What is Docker?
“Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application.”
What is Docker?
What is Docker?
Sphere of docker in the center, 3 axes coming out for cgroups, namespaces, filesystem
Concerns are orthogonal to each other
Outside of Docker, all tools listed are useful on their own if you need something more lightweight.
Portability & Density
Extremely Lightweight
Build containers manually or with many flavors of repeatable process
Run those on local, dev, QA, stage, prod, cloud, PaaS...
Who is Docker?
Tons of people!
Open Sourced by dotCloud, part of a family of other great tools. (hipache)
< 1 year old, but hundreds of committers, and it's blogged about constantly
Quick Survey?
Note here I'm not in the project, some of my team has contributed to docker, and we've been evaluating it heavily internally for many projects.
Ecosystem:
Huge and Growing.
Not Just Docker
LXC vanilla // OpenStack
CloudLinux
lmctfy
But Docker is Crazy.
PaaS : Cocaine (!!!!), dotCloud, Deis, OpenShift, Flynn, Dokku..
IaaS : OpenStack (Standard in Havana)
VPS : Many/Most providers possible if not easy (Linode, DO)
Distros : CoreOS
Config Management : Puppet, Chef, Salt, Ansible
Orchestration : Heat, Maestro, Mesos, Toscanni
Dashboards : Docker-UI, Shipyard, Horizon
I want to show off some of the OpenStack integration particularly.
Security
Pretty tested stuff
Ubuntu ships with extra hardening (AppArmor vs /proc/sys*)
Can be layered (e.g. OpenShift, SELinux)
Lower priv mode coming soon
Docker Index, Handle With Care. (Build Dockerfiles)
How do I play?
curl http://get.docker.io | sudo sh
Or
# Install vagrant, then...
$ git clone https://github.com/dotcloud/docker.git
$ vagrant up
$ vagrant ssh
$ sudo docker
Should I do more than play?
Not rated as "production ready" due to API volatility
Very usable for nearline applications (e.g. testing)
Let's Get Our Hands Dirty