The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
1.
2.
3.
4.
5.
6.
7.
8.
9. Deploy services
reliably & consistently
• If it works locally, it will work on the server
• With exactly the same behavior
• Regardless of versions
• Regardless of distros
• Regardless of dependencies
10.
11. Just like the real thing
• Work in dev environment
• Other services (databases etc.) in containers
• Whenever you want to test « for real »:
• Build in seconds
• Run instantly
13. 15 Months Later: An Incredible Platform and Ecosystem
Community
460+ Contributors 250+ Meetups on Docker
2.75M Downloads 6.7K Projects on GitHub
Official Repos & 14K+ Dockerized Apps
Support
Enterprise Support
Robust Documentation
Implementation, Integration, Training
Network of Partners
The Docker Platform
!
Docker Engine
Docker Hub
!
Build, Ship, and Run
Partners
Content
Users
14. 55 People and a Turtle
Now up to 55
people
(and our pet
turtle, Gordon)
15. …to Build, Ship, and Run
Docker Hub
Build Ship
Run
Source
Dev
QA
Staging
Linux OS
Doocckkeerr
Linux OS
Linux OS
Doocckkeerr
Infrastructure Management
Physical
Infrastructure Management
Virtual
Cloud
Source Code
Repository
DockerFile
Docker
Boot2Docker
Linux OS
Doocckkeerr
TEST TEST
TEST TEST
TEST
GCE RAX IBM
Mac/Win Dev
Machine
Analytics
DB
Prod Machine
Doocckkeerr
++
Users Collab
Provenance Policy
Registries
Public Curated Private
Docker Hub API
Third Party Tools
Prod Machine
Prod Machine
VM
DoDcokcekrer
VM
DoDcokcekrer
VM
DoDcokcekrer
QA Machine
16. An Open Platform…
API
Engine Hub
open source software at the heart
of the Docker platform
cloud-based platform services for distributed
applications
API
20. BGP / OSPF
Quagga Quagga
HTTP Service HTTP Service HTTP Service
Zookeeper
Haproxy Haproxy
Zookeeper
{
{
image #1:
your-favorite-lb
image #2:
consensus-web-service
Zookeeper
21.
22. Do it!
‣ Satisfied with your local build?
‣ Push it to a registry (public or private)
‣ Run it (automatically!) in CI/CD
‣ Run it in production
‣ Happiness!
‣ Something goes wrong? Rollback painlessly!
55. a security product
• Docker Engine is a security product.
• It provides a wrapper around processes
• Provides a path toward attestation of arbitrary
processes (Trusted Compute)
• You can use VMs to wrap containers
56. a work in progress…
That said…
Security was not a priority for the 1.0 release
Security is a priority post-1.0
Big issues are still be discovered at a rapid clip…
Big issues are being resolved at a rapid clip.
57. libchan
a lightweight communication
protocol for distributed systems
Tuesday, June 10, 14 25
58. libchan
Like Go channels over the network
Simple message passing
Synchronization d
without sharing state
Raw socket passing: channels as
gateways to any other protocol
Nesting: channels can send channels
Tuesday, June 10, 14 26
59. libchan
Available transports:
SPDY/TLS,
websocket,
raw TCP,
high-perf unix sockets (with fd passing),
in-memory go channels.
Designed to be simple and portable
Tuesday, June 10, 14 27
61. libswarm
A standard interface to combine and organize
services in a distributed system.
Compose complex architectures from standard
building blocks
Avoid vendor lock-in by swapping any service out
with another
Pick services from a built-in library, or write your own
with a simple API.
Tuesday, June 10, 14 40
62. or Consul or Helios or Centurion
Shipper or Geard or Mesos or Coreos/Fleet
EC2 Rackspace GCE Orchard Tutum
Tuesday, June 10, 14 38
64. Images on HW
is usually mutable
Hardware
Image
Linux
Installs Chef
Chef
Image'
Linux
Chef
Creates
Replaces
Runs
65. Ephemeral environments
are (somewhat) immutable.
Hypervisor
Image
Linux
Chef
Runs
Image'
Linux
Chef
Chef
Runs
Configures
VM
Accesses
COW
66. Containers are like ephemeral VMs
Docker
Image
Linux
Chef
Runs
Image'
Linux
Chef
Chef
Runs
Configures
Container
Accesses
COW
Hypervisor
Image
Linux
Chef
Runs
Image'
Linux
Chef
Chef
Runs
Configures
VM
Accesses
COW
Hypervisor
VM
Docker
Container
67. Chef-for-runtime
$ cat Dockerfile
FROM fedora
RUN yum update;
yum -y install chef
ADD http://x/receipes.tar.gz /opt/chef"
ADD solo.rb /etc/chef/solo.rb"
CMD chef-solo -c /etc/chef/solo.rb ; !
apachectl start
80. Burning configuration
into images.
Image
Linux
Docker Initiates Creates Container
Chef
Build Creates
Runs
Chef
Configures
81.
82. Bakery Chef
$ cat Dockerfile
FROM fedora
RUN yum update;
yum -y install chef"
ADD http://x/receipes.tar.gz /opt/chef"
ADD solo.rb /etc/chef/solo.rb"
RUN chef-solo -c /etc/chef/solo.rb
83. Expanded view:
Burning configuration into
images.
Docker Initiates Image tag
Image'
Linux
Chef
Chef
Build
Creates
Image
Linux
Chef
Creates
Runs Creates
References
1
2
84.
85.
86. Anatomy of a Docker
+Chef build & run
Image
Linux
Docker Initiates Creates Container
Chef
Chef
Runs
Configures
Build Creates
Runs
Chef
Configures
Stage 1
Stage 2
87. For All The Things!
$ cat Dockerfile
FROM fedora
RUN yum update;
yum -y install chef
ADD http://x/receipes.tar.gz /opt/chef"
ADD solo-stage1.rb /etc/chef/solo-stage1.rb"
ADD solo-stage2.rb /etc/chef/solo-stage2.rb"
RUN chef-solo -c /etc/chef/solo-stage1.rb"
CMD chef-solo -c /etc/chef/solo-stage2.rb; "
apachectl start
88. Does it converge?
$ docker build —rm .
$ echo $? # pass or fail
(This is great use of Docker as an
alternative to VMs for testing Chef recipes
targeting non-Docker production systems)