29
© 2015 Mesosphere, Inc. All Rights Reserved. WHAT YOU ALWAYS WANTED TO KNOW ABOUT CONTAINER ORCHESTRATION AND NEVER DARED TO ASK 1 Michael Hausenblas | All Things Open | Raleigh, NC | 2015-10-20

What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

Embed Size (px)

Citation preview

Page 1: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

WHAT YOU ALWAYS WANTED TO KNOW ABOUT CONTAINER ORCHESTRATION AND NEVER DARED TO ASK

1

Michael Hausenblas | All Things Open | Raleigh, NC | 2015-10-20

Page 2: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

CONTAINERS ARE LIKE VMS, RIGHT?

2

Page 3: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

CONTAINERS ARE LIKE VMS, RIGHT?

3

Page 4: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

CONTAINERS ARE LIKE VMS, RIGHT?

4

No!

• dependency management for apps

• lightweight: startup time, avg. runtime, footprint

• pets vs cattle

Page 5: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

CONTAINERS ARE LIKE VMS, RIGHT?

5

Pets are individuals that you give names and when they get ill you nurse them back to health.

Cattle are anonymous, identical to other cattle you assign numbers and when they get ill → next one.

http://www.theregister.co.uk/2013/03/18/servers_pets_or_cattle_cern/

Page 6: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

ARE CONTAINERS SECURE?

6

Page 7: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

ARE CONTAINERS SECURE?

7

Page 8: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

ARE CONTAINERS SECURE?

8

• containers share same kernel (!)

• namespaces ('user' almost there)

• lock down networking (e.g. Docker's --icc=false)

Page 9: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

ARE CONTAINERS SECURE?

9

Don't bake credentials into Docker images!

Rather do …

$ docker run -d -e API_TOKEN=SECRET somedatabase

$ docker run -d -v $(pwd):/fsecret:/fsecret:ro somedatabase

Ideally, use a key-value (in-memory) store such as

Square's KeyWhiz, HashiCorp's Vault, or Crypt

Page 10: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

SHOULD I REALLY BE USING A CONTAINER ORCHESTRATION TOOL?

10

Page 11: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

SHOULD I REALLY BE USING A CONTAINER ORCHESTRATION TOOL?

11

Page 12: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

SHOULD I REALLY BE USING A CONTAINER ORCHESTRATION TOOL?

12

Yes!

• No getting up at 3am to replace a HDD or deploy

an app onto a new server

• Elasticity (traffic, business needs, etc.)

Page 13: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

HOW DO I LAUNCH 100,000 CONTAINERS?

13

Page 14: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

HOW DO I LAUNCH 100,000 CONTAINERS?

14

Page 15: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

HOW DO I LAUNCH 100,000 CONTAINERS?

15

• Are you Google? Facebook? Twitter?• Small is beautiful and containers at scale is hard

• But, what should I use?• For a handful of nodes:

Nomad, Kubernetes, Docker Swarm, Apache Mesos• For ~100 nodes:

Kubernetes, Apache Mesos• For 100s to 1000s nodes:

Apache Mesos

Page 16: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

I ALREADY USE CHEF, PUPPET, ANSIBLE, SALTSTACK, ETC.—DO I REALLY NEED A CONTAINER ORCHESTRATION SYSTEM?

16

Page 17: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

I ALREADY USE CHEF, PUPPET, ANSIBLE, SALTSTACK, ETC.—DO I REALLY NEED A CONTAINER ORCHESTRATION SYSTEM?

17

Page 18: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

I ALREADY USE CHEF, PUPPET, ANSIBLE, SALTSTACK, ETC.—DO I REALLY NEED A CONTAINER ORCHESTRATION SYSTEM?

18

• It's really horses for courses• Base provisioning: CM tool of your choice• Container orchestration: Apache Mesos,

Kubernetes, Nomad, Docker Swarm

Page 19: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

CONTAINER ORCHESTRATION, THAT'S FOR MICROSERVICES, OR?

19

Page 20: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

CONTAINER ORCHESTRATION, THAT'S FOR MICROSERVICES, OR?

20

Page 21: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved. 21

• Orthogonal issues …• … however, many (successful) microservices

architectures I've seen are containerized• Worry first about the basics:

• Are you using Git?• Have you got your CI/CD pipeline set up?• How do you deploy your (container) images?

CONTAINER ORCHESTRATION, THAT'S FOR MICROSERVICES, OR?

Page 22: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

THAT CONTAINER ORCHESTRATION THING THAT'S FOR ON-PREMISES, RIGHT?

22

Page 23: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

THAT CONTAINER ORCHESTRATION THING THAT'S FOR ON-PREMISES, RIGHT?

23

Page 24: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved. 24

• Nope, just different things are important• Think: provisioning (putting a box into a rack vs.

pressing a button)• Actually, many do hybrid cloud (on-premises +

cloud or inter-cloud)

THAT CONTAINER ORCHESTRATION THING THAT'S FOR ON-PREMISES, RIGHT?

Page 25: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

BUT THERE ARE CERTAINLY SOME DOWNSIDES TO IT, I'M SURE!

25

Page 26: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

BUT THERE ARE CERTAINLY SOME DOWNSIDES TO IT, I'M SURE!

26

Page 27: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved. 27

• Mostly challenges of social nature (less people can

take of more stuff)

• Convince your colleagues and boss with:

The Phoenix Project

BUT THERE ARE CERTAINLY SOME DOWNSIDES TO IT, I'M SURE!

Page 28: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved. 28

BUT THERE ARE CERTAINLY SOME DOWNSIDES TO IT, I'M SURE!

http://shop.oreilly.com/product/9781939902184.do

http://p24e.io

http://shop.oreilly.com/product/0636920039952.do https://manning.com/books/mesos-in-action

28

http://shop.oreilly.com/product/0636920043874.do

Page 29: What You Always Wanted to Know About Container Orchestration and Never Dared to Ask

© 2015 Mesosphere, Inc. All Rights Reserved.

AND NOW IT IS YOUR TURN …

29