Slide 1

Slide 1 text

Scale your containers with Mesos! Docker Palo Alto Meetup Oct 2014 Timothy Chen @tnachen [email protected]

Slide 2

Slide 2 text

About me... Distributed Systems Engineer @ Mesosphere Open source: Apache Mesos PMC / Committer Apache Drill Committer Contribute to Apache Kafka, Spark and others

Slide 3

Slide 3 text

We are Mesosphere

Slide 4

Slide 4 text

 An introduction to the world of Mesosphere  Integrating Docker into Mesos  Demo!

Slide 5

Slide 5 text

What does your production environment look like?

Slide 6

Slide 6 text

Status quo is static partitioning and use of virtual machines

Slide 7

Slide 7 text

Add some virtual machines

Slide 8

Slide 8 text

Provision Hadoop

Slide 9

Slide 9 text

Provision a web service

Slide 10

Slide 10 text

Moar data, moar Hadoop

Slide 11

Slide 11 text

Mesos let us treat a cluster of nodes...

Slide 12

Slide 12 text

As one big computer

Slide 13

Slide 13 text

 Not as individual machines  Not as VMs

Slide 14

Slide 14 text

But as computational resources like cores, memory, disks, etc.

Slide 15

Slide 15 text

Mesos is...  Open Source Apache project  Cluster Resource Manager  Scalable to 10,000s of nodes  Fault-tolerant, battle-tested  An SDK for distributed apps

Slide 16

Slide 16 text

Mesos enables dynamic resource sharing http://mesosphere.io/simulator/ – + Datacenter – + Rails – + Hadoop – + Chronos – + Cassandra – + Spark

Slide 17

Slide 17 text

Mesos is another layer of abstraction Below a PaaS Above an IaaS

Slide 18

Slide 18 text

An abstraction that let us deal with a pool of resources Instead of computers or VMs

Slide 19

Slide 19 text

Making life easier for the data center operator  Multi-tenancy  Improved resource utilization  Resource Isolation  Fault-tolerance  Easy scaling

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

The Mesos ecosystem is growing

Slide 23

Slide 23 text

High Level View of Mesos Framework = scheduler + executor Schedulers get resource offers Executors run tasks

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

We love containers

Slide 26

Slide 26 text

Most modern applications are a web of containers

Slide 27

Slide 27 text

Now what?

Slide 28

Slide 28 text

 Integrating Docker into Mesos  An introduction to the world of Mesosphere  Demo!

Slide 29

Slide 29 text

Mesos has multiple ways of achiving resource isolation Mesos Containerizer (LXC -> Cgroups) External Containerizer Docker Containerizer!

Slide 30

Slide 30 text

Mesos Task integration Docker Container as a Task Docker Container as an Executor

Slide 31

Slide 31 text

Docker Containerizer features Resize Docker Containers Report Usage Info Download and mount files into Container Log forwarding

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

 Demo!  An introduction to the world of Mesosphere  Integrating Docker into Mesos

Slide 34

Slide 34 text

Say hi to Marathon

Slide 35

Slide 35 text

Marathon does it! Start, stop, scale, update apps Nice web interface, API Highly available, no SPoF Native Docker support Pluggable event bus Rolling deploy / restart Application health checks Artifact staging

Slide 36

Slide 36 text

Run a Docker container h t t p - v P O S T h t t p : / / 1 0 . 0 . 8 5 . 9 7 : 8 0 8 0 / v 2 / a p p s @ a p p - r u b y . j s o n { " i d " : " b r i d g e d - w e b a p p " , " c m d " : " p y t h o n 3 - m h t t p . s e r v e r 8 0 8 0 " , " c p u s " : 0 . 5 , " m e m " : 6 4 . 0 , " i n s t a n c e s " : 1 , " c o n t a i n e r " : { " t y p e " : " D O C K E R " , " d o c k e r " : { " i m a g e " : " p y t h o n : 3 " , " n e t w o r k " : " B R I D G E " , " p o r t M a p p i n g s " : [ { " c o n t a i n e r P o r t " : 8 0 8 0 , " h o s t P o r t " : 0 , " p r o t o c o l " : " t c p " } ] } } }

Slide 37

Slide 37 text

Scale! { " i n s t a n c e s " : 5 }

Slide 38

Slide 38 text

Add a UNIQUE hostname constraint { " c o n s t r a i n t s " : [ [ " h o s t n a m e " , " U N I Q U E " ] ] }

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

Mesos for all the containers

Slide 42

Slide 42 text

Mesos for all the things

Slide 43

Slide 43 text

Thanks! Come and talk to us Get Mesosphere packages: Kubernetes on Mesos: Read about Marathon: Try out Mesosphere on GCE: http://mesosphere.io/downloads https://github.com/mesosphere/kubernetes-mesos https://github.com/mesosphere/marathon http://google.mesosphere.io