docker in production now: seattle docker meetup march 2015

58
Docker In Production Now Justin Clayton, March 2015

Upload: justin-clayton

Post on 14-Jul-2015

528 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Docker In Production Now: Seattle Docker Meetup March 2015

Docker In Production Now

Justin Clayton, March 2015

Page 2: Docker In Production Now: Seattle Docker Meetup March 2015

This Presentation May Not Be For You If:

• You already containerized absolutely everything • You are running Kubernetes and/or Mesosphere in prod • You are a dev and you deploy exclusively to a PaaS • Your company was founded earlier today

Page 3: Docker In Production Now: Seattle Docker Meetup March 2015

But For The Rest Of Us

Page 4: Docker In Production Now: Seattle Docker Meetup March 2015

Existing infrastructure to maintain

Page 5: Docker In Production Now: Seattle Docker Meetup March 2015

Extensive library of configuration

management recipes

Page 6: Docker In Production Now: Seattle Docker Meetup March 2015

Existing CI/CD System

Page 7: Docker In Production Now: Seattle Docker Meetup March 2015

Perception that Docker is only for the cool kids

Page 8: Docker In Production Now: Seattle Docker Meetup March 2015

I hate you, Windows. Why are you still here?

Page 9: Docker In Production Now: Seattle Docker Meetup March 2015

Why Do We Care About Docker?

Page 10: Docker In Production Now: Seattle Docker Meetup March 2015

To Solve Business Problems!

Page 11: Docker In Production Now: Seattle Docker Meetup March 2015

Agility, Flexibility, Stability

Page 12: Docker In Production Now: Seattle Docker Meetup March 2015
Page 13: Docker In Production Now: Seattle Docker Meetup March 2015
Page 14: Docker In Production Now: Seattle Docker Meetup March 2015
Page 15: Docker In Production Now: Seattle Docker Meetup March 2015

How do I solve my immediate problems while

still building for the future?

Page 16: Docker In Production Now: Seattle Docker Meetup March 2015

Prepare For The Future

Page 17: Docker In Production Now: Seattle Docker Meetup March 2015

Install Docker Everywhere

Page 18: Docker In Production Now: Seattle Docker Meetup March 2015

--insecure-registry=0.0.0.0/0

Page 19: Docker In Production Now: Seattle Docker Meetup March 2015

Start Replacing Parts

Page 20: Docker In Production Now: Seattle Docker Meetup March 2015

Drop-In Replacements! Example: Redis caching

Page 21: Docker In Production Now: Seattle Docker Meetup March 2015

$ docker run redis

Page 22: Docker In Production Now: Seattle Docker Meetup March 2015

Problems:

• Production config? • Deploy? • Manage running container?

Page 23: Docker In Production Now: Seattle Docker Meetup March 2015

Solution: Leverage Your CM!

Page 24: Docker In Production Now: Seattle Docker Meetup March 2015

Show Example Code Now

Page 25: Docker In Production Now: Seattle Docker Meetup March 2015

Recap! Instead Of Doing This:• writing a custom config • compiling our own Redis from source • packaging it into an RPM • hosting it on an internal package repo • hacking community Puppet modules to get it to use our

version and config

Page 26: Docker In Production Now: Seattle Docker Meetup March 2015

Now we’re doing this:

• writing our custom config • running the latest official redis container

Page 27: Docker In Production Now: Seattle Docker Meetup March 2015

Now we’re doing this:

• writing our custom config • running the latest official redis containerWIN

Page 28: Docker In Production Now: Seattle Docker Meetup March 2015

Other Good Appliance Examples• Gitlab • Hubot • Jenkins • HAPRoxy

Page 29: Docker In Production Now: Seattle Docker Meetup March 2015

What did we win?

• Reduced CM codebase • Simplified update process • Appliances direct from the vendor

Page 30: Docker In Production Now: Seattle Docker Meetup March 2015

Build and ship your own stuff

Page 31: Docker In Production Now: Seattle Docker Meetup March 2015

Dev wants: more freedom

Page 32: Docker In Production Now: Seattle Docker Meetup March 2015

Ops wants: less variation

Page 33: Docker In Production Now: Seattle Docker Meetup March 2015

Immutable Infrastructure

Page 34: Docker In Production Now: Seattle Docker Meetup March 2015

One approach: give devs full control over their

images

Page 35: Docker In Production Now: Seattle Docker Meetup March 2015

Dev gets: complete freedom

Page 36: Docker In Production Now: Seattle Docker Meetup March 2015

Ops gets: infinity snowflakes

Page 37: Docker In Production Now: Seattle Docker Meetup March 2015
Page 38: Docker In Production Now: Seattle Docker Meetup March 2015

Devs often don't know systems

Page 39: Docker In Production Now: Seattle Docker Meetup March 2015
Page 40: Docker In Production Now: Seattle Docker Meetup March 2015

Standardized on JVM languages

Page 41: Docker In Production Now: Seattle Docker Meetup March 2015

If you can build a JAR, we can deploy it

Page 42: Docker In Production Now: Seattle Docker Meetup March 2015

Dev gets: a little freedom

Page 43: Docker In Production Now: Seattle Docker Meetup March 2015

Ops gets: less variation

Page 44: Docker In Production Now: Seattle Docker Meetup March 2015
Page 45: Docker In Production Now: Seattle Docker Meetup March 2015

Standard App Packaging

Page 46: Docker In Production Now: Seattle Docker Meetup March 2015

Standard Deploy Process

Page 47: Docker In Production Now: Seattle Docker Meetup March 2015

Dev gets: complete freedom

Page 48: Docker In Production Now: Seattle Docker Meetup March 2015

Ops gets: no snowflakes!

Page 49: Docker In Production Now: Seattle Docker Meetup March 2015

Reinventing CI/CD can be high-cost

Page 50: Docker In Production Now: Seattle Docker Meetup March 2015

Don't Refactor In The Red

Page 51: Docker In Production Now: Seattle Docker Meetup March 2015

The container is the build artifact

Page 52: Docker In Production Now: Seattle Docker Meetup March 2015

The container is the unit of deployment

Page 53: Docker In Production Now: Seattle Docker Meetup March 2015

Start by replacing only those things

Page 54: Docker In Production Now: Seattle Docker Meetup March 2015

Drop-In Replacements!

Page 55: Docker In Production Now: Seattle Docker Meetup March 2015

Show Example Code Now

Page 56: Docker In Production Now: Seattle Docker Meetup March 2015

Recap! We now have:

• A template for docker builds in CI • Even less CM code now • Cleaner deploys

Page 57: Docker In Production Now: Seattle Docker Meetup March 2015

What we didn't touch• Load balancing • Deployment strategy (A/B farm, etc.) • Multi-tenancy of containers • Service discovery

Page 58: Docker In Production Now: Seattle Docker Meetup March 2015

Thanks For ComingJustin Clayton @justinclayton42 github.com/justinclayton