DO YOU REMEMBER THIS
ARTICLE?1
1 http://blog.circleci.com/its-the-future/
Slide 5
Slide 5 text
BUT
YOU PROBABLY DIDN'T
READ THIS2
2 http://blog.circleci.com/it-really-is-the-future/
Slide 6
Slide 6 text
CONTAINERS PREHISTORY
> Containers are not a new idea
> Originated via filesystem containers
with chroot in Unix 7 (1979)
Slide 7
Slide 7 text
CONTAINERS PREHISTORY
> 2000, FreeBSD 4.0
Introduce the jail command
> 2005, Sun Microsystems
Released Solaris Zones
Slide 8
Slide 8 text
THE DARK AGES
> Hardware-level virtualization
Support the execution of a complete operating system
> Virtual Machine
Emulation of a particular computer system
> Hypervisor
Slide 9
Slide 9 text
CONTAINERS
> 2008 LXC (Linux Containers)
Operating-system-level virtualization environment
for running multiple isolated Linux systems
contaniers on a single Linux host
Slide 10
Slide 10 text
LXC
lightweight virtualization
No hypervisor
(as in OS virtualization like KVM, Xen)
Slide 11
Slide 11 text
No content
Slide 12
Slide 12 text
LXC
The Linux kernel provides
control groups
Resources limitation, prioritization, accounting, control
namespace isolation
pid, ipc, uts, user, mnt, net
Slide 13
Slide 13 text
VM VS LINUX CONTAINERS
> Virtualization offers greater isolation
at the cost of greater overhead
> Containers offer less isolation
but lower overhead through sharing the host kernel
Slide 14
Slide 14 text
No content
Slide 15
Slide 15 text
CONTAINERS
> 2013, dotCloud saw the power of Containers
meanwhile they were building PaaS
> Solomon Hykes started Docker
as an internal project within dotCloud
> Struggling as a PasS, dotCloud pivoted
open sourced their container-based
orchestration layer
Slide 16
Slide 16 text
... AND DOCKER
WAS BORN
Slide 17
Slide 17 text
BUT... WHAT IS DOCKER?
> High-level API
Building on top of
facilities provided by
the Linux kernel
Slide 18
Slide 18 text
BUT... WHAT IS DOCKER?
> Union filesystem
For distribute and manage containers images
> Copy on Write - CoW
> AUFS (advanced multi layered unification filesystem) 3
> OverlayFS
3 https://docs.docker.com/engine/userguide/storagedriver/aufs-driver/
Slide 19
Slide 19 text
BUT... WHAT IS DOCKER?
Allows you to package an application with
all of its dependencies into a
standardized unit
Slide 20
Slide 20 text
BUT... WHAT IS DOCKER?
> Command Line Tool
Allows talk with the docker daemon API
Slide 21
Slide 21 text
DOCKER DEMO
Slide 22
Slide 22 text
AND MORE...
Commands:
attach Attach to a running container
build Build an image from a Dockerfile
commit Create a new image from a container's changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes on a container's filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container's filesystem as a tar archive
history Show the history of an image
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
Slide 23
Slide 23 text
inspect Return low-level information on a container or image
kill Kill a running container
load Load an image from a tar archive or STDIN
login Register or log in to a Docker registry
logout Log out from a Docker registry
logs Fetch the logs of a container
network Manage Docker networks
pause Pause all processes within a container
port List port mappings or a specific mapping for the CONTAINER
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart a container
rm Remove one or more containers
Slide 24
Slide 24 text
rmi Remove one or more images
run Run a command in a new container
save Save an image(s) to a tar archive
search Search the Docker Hub for images
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop a running container
tag Tag an image into a repository
top Display the running processes of a container
unpause Unpause all processes within a container
version Show the Docker version information
volume Manage Docker volumes
wait Block until a container stops, then print its exit code
Run 'docker COMMAND --help' for more information on a command.
Slide 25
Slide 25 text
QUICK RECAP
> Image is the filesystem snapshot
> Container is what we call an image when it is run
> Containers share the host kernel
> Containers can only run in Linux,
but each container can contain
a different linux distro
Slide 26
Slide 26 text
DOCKER IS MUCH MORE
> Dockerfile
> Docker Volumes, Networking
> Docker Hub, Docker Registry
> Docker Plugins
> Docker Machine, Docker Swarm, Docker Compose
Slide 27
Slide 27 text
No content
Slide 28
Slide 28 text
docker build -t nginx .
Slide 29
Slide 29 text
THE DOCKER
PROMISE
BUILD AN IMAGE AND RUN
IT EVERYWHERE
Slide 30
Slide 30 text
PAUSE
Slide 31
Slide 31 text
DOCKER REVOLUTION
While OS containers have been around for over a decade,
Docker has brought the concept to a
much broader audience
Slide 32
Slide 32 text
DOCKER REVOLUTION
Docker is doing to apt
what apt did to tar
— Bryan Cantrill, CTO, Joyent
Slide 33
Slide 33 text
ATOMIC HOSTS
> Traditional, a server is build carefully and maintain
> Atomic Update
> CoreOs, Project Atomic, Snappy Ubuntu
> Immutable platform, designed with the sole purpose of
running containerized applications
Slide 34
Slide 34 text
WHAT IF I WANT TO RUN
100 CONTAINERS
Slide 35
Slide 35 text
OR 1000 CONTAINERS
Slide 36
Slide 36 text
OR 10000000.....
Slide 37
Slide 37 text
IS WHAT GOOGLE HAS
BEEN DOING THE LAST
TEN YEARS 4
4 Google 2015, http://research.google.com/pubs/pub43438.html
Slide 38
Slide 38 text
OMEGA: FLEXIBLE,
SCALABLE SCHEDULES
FOR LARGE COMPUTER
CLUSTERS 5
5 Google 2013, http://research.google.com/pubs/pub41684.html
Slide 39
Slide 39 text
No content
Slide 40
Slide 40 text
KUBERNETES
Kubernetes is a cluster manager software
for deploying, running and managing
Docker containers at scale
> 100% Open source, written in go
Slide 41
Slide 41 text
KUBERNETES
Greek for Helmsman
Also the root of the word
Governor and cybernetic
Slide 42
Slide 42 text
KUBERNETES
> Container orchestrator
> Runs and manages containers
> Support multiple cloud and bare-metal environments
> Inspired and informed by Google's experiences and
internal systems
Manage applications, not machines