+ - 0:00:00
Notes for current slide
Notes for next slide
Containers: A Guide for the Perplexed

Josh Berkus

Red Hat

PDX DevOps 10/17

1 / 45

what would maimonides do

2 / 45

perplexed cover image

3 / 45

"Your purpose should be always to know the whole that was intended to be known."

4 / 45

"A sensible man should not demand of me, or hope that when we mention a subject, we shall make a complete exposition of it."

5 / 45

container spinning

What's a container?

6 / 45

docker logo

7 / 45

many container technologies

8 / 45

Everything You Know About Containers Is Wrong

9 / 45
stack of kids in a coat

There Are No Containers

10 / 45
stack of kids in a coat

  Interlocking parts




  • Linux Namespaces
  • Cgroups
  • Networking tricks
11 / 45

lego death star

12 / 45

lego escher

13 / 45

lego cthulu

14 / 45
Containers
and Images
15 / 45

not a pipe

What's an Image?

16 / 45

Images

  1. a tarball
    containing a user FS
  2. some metadata

image == packaging

17 / 45

Layered Images

  • union file system:
    overlayFS, AuFS, devicemapper
  • layers can be added
  • layers can be shared
18 / 45

image formats

Image Formats

19 / 45

Building Images

  1. Copy a base image ("Fedora 26")
  2. Add new layer(s)
  3. Add metadata
  4. Bundle up
20 / 45

Building Tools

  • Docker Build (Dockerfile)
  • rkt
  • Buildah
  • ad-hoc
21 / 45

Sharing Images: Registries

  • hub.docker.io
  • Google container registry
  • CoreOS quay.io
  • Specialty: CentOS, Fedora, etc.
  • local registry
22 / 45

Installing images

  1. find on registies
  2. download to a local cache
  3. copy to memory at runtime

docker pull, skopeo

23 / 45

How to Run an Image

start a single binary from the image running on the host OS in a namespaced process, file, and resource space

24 / 45

Image Runtimes

  • Docker Daemon
    containerd
  • Rkt + Systemd
  • OCI + Systemd
  • CRI-O
25 / 45
From One To Many
26 / 45

cloud picture

27 / 45

Container Host OS

  1. smaller
    container support, nothing else
  2. immutable
    updates like containers
28 / 45

container-oses

Container Host OSes

29 / 45

"Orchestration"

run many containers
over many machines

30 / 45

Parts of Orchestration

  1. Scheduler: dispatches containers to machines
  2. Agents: manages containers on each machine
  3. API Server: communicates between machines
  4. DCS: shared data store for cluster
  5. Plugins: storage, networking, etc.
31 / 45

orchestration systems

Orchestration Systems

32 / 45

Networking

out of the box, containers have only the host network, so we need to fake a network using Linux kernel tools and networking components so that they can pretend to be servers

33 / 45

networking tools

Container Networking Tools

34 / 45

Discovery

finding your containers

  • name
  • service type
  • port

some DNS, some not

35 / 45

discovery tools

Discovery Tools

36 / 45

istio logo

"Service Mesh"

37 / 45

What's a "service mesh"?

istio diagram

38 / 45

Storage

  1. some containers need to store data
  2. data can be ephemeral
    (local Volumes)
  3. data can also be long-term
    (Persistent Volumes)
  4. sometimes data needs to move with the container
39 / 45

Ways to do storage

  • network storage (NAS)
  • local storage w/copying
  • cloud storage (Gluster, Ceph, Rook, EBS)

no "container storage" ... yet

40 / 45
Other Stuff
41 / 45

Hosting: CaaS, PaaS, FaaS

  • CaaS: run containers on their infra (GKE, Amazon CS)
  • PaaS: run applications as containers on their infra (OpenShift, DEIS)
  • FaaS: run code functions as containers on their infra (Serverless)
42 / 45

More Containery Stuff

  • monitoring
  • tracing
  • CI/CD tools
  • API tools
43 / 45

what would maimonides do

44 / 45

Still Perplexed?

web:

events:

jberkus.github.io www.databasesoup.com www.projectatomic.io

Cloud Native Portland
meetup.com/Cloud-Native-PDX/

LISA - KubeCon
SCALE Container Day

45 / 45

what would maimonides do

2 / 45
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow