a dive into containers and docker

70
A Dive Into Containers and Docker Matt Farina / @mattfarina CloudDevelop 2015 1

Upload: matt-farina

Post on 16-Jan-2017

1.146 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: A Dive Into Containers and Docker

1

A Dive Into Containers and DockerMatt Farina / @mattfarinaCloudDevelop 2015

Page 2: A Dive Into Containers and Docker

2

•@mattfarina•mattfarina.com•HP Hewlett Packard Enterprise

• Advanced Technology Group

• Go, Node.js, PHP, Ruby, .NET, Python

• 5 years building in cloud

Page 3: A Dive Into Containers and Docker

3

http://www.slideshare.net/mattfarina/a-dive-into-containers-and-docker

Page 4: A Dive Into Containers and Docker

4

1.Historical2.Informational3.Practical

Page 5: A Dive Into Containers and Docker

5

Change

Page 6: A Dive Into Containers and Docker

6

Page 7: A Dive Into Containers and Docker

7

History: From The Beginning Up To Containers

Long Ago 1980’s 1990’s 2000’s 2010’s

Way Back WhenThe wheel

1990First WebBrowser

1989Web Invented

1995Beowulf cluster

2006AWS

2007Heroku

0/0/0000Calendars reset

1984DEC VAXcluster

2001VMwareESX Server

2011Cloud Foundry

2010OpenStack

Page 8: A Dive Into Containers and Docker

8

Compute Networking Storage

Page 9: A Dive Into Containers and Docker

9

Page 10: A Dive Into Containers and Docker

10

Page 11: A Dive Into Containers and Docker

11

But, Containers Aren’t A New Technology

https://www.flickr.com/photos/littlemisspurps/14925392516/

Page 12: A Dive Into Containers and Docker

12

History: Container Highlights

Long Ago 1980’s 1990’s 2000’s 2010’s

Way Back WhenThe wheel

1990First WebBrowser

1989Web Invented

1995Beowulf cluster

2006AWS

2007Heroku

0/0/0000Calendars reset

1984DEC VAXcluster

2001VMwareESX Server

2011Cloud Foundry

2010OpenStack

2000FreeBSDJails

2004SolarisContainers

1979Unix chroot

2005OpenVZ

2007cgroups

2015Google BorgPaper

2013Docker

Page 13: A Dive Into Containers and Docker

13

What did Docker do to make containers a hit?

Page 14: A Dive Into Containers and Docker

14

User Experience

https://www.flickr.com/photos/pveugen/3182820590/

Page 15: A Dive Into Containers and Docker

15

Page 16: A Dive Into Containers and Docker

16

Page 17: A Dive Into Containers and Docker

17

Virtual Machines

ServerHost OS

Hypervisor

Guest OS

Guest OS

Guest OS

bins/libs bins/libs bins/libs

App A1 App A2 App B

Page 18: A Dive Into Containers and Docker

18

Virtual Machines vs. Containers

ServerHost OS

Hypervisor

Guest OS

Guest OS

Guest OS

bins/libs bins/libs bins/libs

App A1 App A2 App B

ServerHost OS

bins/libs bins/libs

App A1

App A2 App B

Cont

ain

er

Man

ager

Page 19: A Dive Into Containers and Docker

19

Virtual Machine Unused Resources

Server

VM VM VM

App App App

VM VM VM

App App AppUnused Space InsideEach VM

Page 20: A Dive Into Containers and Docker

20

Virtual Machines vs. Containers

Server Server

VM VM VM

App App App

VM VM VM

App App App

App

App

App

App

App

App

App

App

App

App

App

App

App

App

App

App

App

App

Page 21: A Dive Into Containers and Docker

21

bins / libsAre Layered

Layers Are ReusableAnd Shared

Page 22: A Dive Into Containers and Docker

22

An Example of Layers

Ubuntu

Java

Tomcat

An Application

Page 23: A Dive Into Containers and Docker

23

Layers Are Shared

Server

Host OS

Ubuntu

Java Go

Tomcat

App A

App B App C

Page 24: A Dive Into Containers and Docker

24

Layers Are Shared

Server

Host OS

Ubuntu

Java Go

Tomcat

App A

App B App C

31 2 4 5 6

Page 25: A Dive Into Containers and Docker

25

Volumes

25

/var/volume2

/var/volume1

Container

Page 26: A Dive Into Containers and Docker

26 https://www.flickr.com/photos/jakerust/16844922351

Page 27: A Dive Into Containers and Docker

27

Virtual Machines can have hardware level separation

Page 28: A Dive Into Containers and Docker

28

Virtual Machine Border

Server

VM

AppVirtual Machines havea border of hardwareemulation

VM

App

VM

App

VM

App

VM

App

VM

App

Page 29: A Dive Into Containers and Docker

29

Virtual MachinesAre A Fairly SafeMulti-Tenant Solution

Page 30: A Dive Into Containers and Docker

30

What aboutcontainers?

https://www.flickr.com/photos/arboghast/3176160087/

Page 31: A Dive Into Containers and Docker

31 https://www.flickr.com/photos/kevandotorg/6229660191

Page 32: A Dive Into Containers and Docker

32

A Shared Kernel and Drivers

Server

Host OS

bins/libs bins/libs

App A1

App A2 App B

Cont

ain

er

Man

ager

Kernel Drivers

Page 33: A Dive Into Containers and Docker

33

A Company Datacenter As ATrusted Place

Page 34: A Dive Into Containers and Docker

34

Page 35: A Dive Into Containers and Docker

35

Intel Clear ContainersLeverage:•Virtualization technology•Kernel Optimizations•Systemd Optimizations•DAX (direct access) in 4.0 kernel•Kernet same-page merging (KSM)

•More…

Page 36: A Dive Into Containers and Docker

36 https://www.flickr.com/photos/kevandotorg/6229660191

Page 37: A Dive Into Containers and Docker

37

Page 38: A Dive Into Containers and Docker

38

Docker Engine

Page 39: A Dive Into Containers and Docker

39

Page 40: A Dive Into Containers and Docker

40

App Container spec

Page 41: A Dive Into Containers and Docker

41

Page 42: A Dive Into Containers and Docker

42

If You’re Using It Today

Page 43: A Dive Into Containers and Docker

43

Page 44: A Dive Into Containers and Docker

44

You Don’t Want To RunContainers InIsolation

Page 45: A Dive Into Containers and Docker

45

Page 46: A Dive Into Containers and Docker

46

Page 47: A Dive Into Containers and Docker

47

Dynamic Scheduling

Machine

App

App

App

App

App

App

App

App

App

App

App

App

App

App

App

App

App

AppAPI

Metadata+

Supporting Things

Application+

Cloud Native Arch

Page 48: A Dive Into Containers and Docker

48

A Machine Can Be A Server Or A Lot More

Page 49: A Dive Into Containers and Docker

49

Deployment

Provisioning

Lifecycle Manageme

nt

Service Manageme

nt

Reporting And

Monitoring

Page 50: A Dive Into Containers and Docker

50

PaaS For More Than Web Applications

Page 51: A Dive Into Containers and Docker

51

The Docker WayDocker Swarm Docker Compose

Page 52: A Dive Into Containers and Docker

52

Page 53: A Dive Into Containers and Docker

53

Page 54: A Dive Into Containers and Docker

54

Page 55: A Dive Into Containers and Docker

55

Code

Push

ScanTest

Deploy

CI/CD

Page 56: A Dive Into Containers and Docker

56

Page 57: A Dive Into Containers and Docker

57

Jenkins + Docker

Page 58: A Dive Into Containers and Docker

58

Page 59: A Dive Into Containers and Docker

59

What Can You Use Today?1.Docker

Page 60: A Dive Into Containers and Docker

60

What Can You Use Today?1.Docker2.Travis CI

Page 61: A Dive Into Containers and Docker

61

What Can You Use Today?1.Docker2.Travis CI or Jenkins + CloudBees Docker Custom Build Environment Plugin

Page 62: A Dive Into Containers and Docker

62

What Can You Use Today?1.Docker2.Travis CI or Jenkins + CloudBees Docker Custom Build Environment Plugin

3.Docker Hub

Page 63: A Dive Into Containers and Docker

63

What Can You Use Today?1.Docker2.Travis CI or Jenkins + CloudBees Docker Custom Build Environment Plugin

3.Docker Hub4.Stackato

Page 64: A Dive Into Containers and Docker

64

What Can You Use Today?1.Docker2.Travis CI or Jenkins + CloudBees Docker Custom Build Environment Plugin

3.Docker Hub4.Stackato or Kubernetes (Azure and Google Cloud offer k8s)

Page 65: A Dive Into Containers and Docker

What’s Coming Soon-ish

65

Page 66: A Dive Into Containers and Docker

66

+

Page 67: A Dive Into Containers and Docker

67

Page 68: A Dive Into Containers and Docker

68

Page 69: A Dive Into Containers and Docker

69

Q&A

Matt [email protected]

http://www.slideshare.net/mattfarina/a-dive-into-containers-and-docker

Page 70: A Dive Into Containers and Docker

70

Thank you

Matt [email protected]

http://www.slideshare.net/mattfarina/a-dive-into-containers-and-docker