docker in production now: seattle docker meetup march 2015

Post on 14-Jul-2015

529 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Docker In Production Now

Justin Clayton, 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

But For The Rest Of Us

Existing infrastructure to maintain

Extensive library of configuration

management recipes

Existing CI/CD System

Perception that Docker is only for the cool kids

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

Why Do We Care About Docker?

To Solve Business Problems!

Agility, Flexibility, Stability

How do I solve my immediate problems while

still building for the future?

Prepare For The Future

Install Docker Everywhere

--insecure-registry=0.0.0.0/0

Start Replacing Parts

Drop-In Replacements! Example: Redis caching

$ docker run redis

Problems:

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

Solution: Leverage Your CM!

Show Example Code Now

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

Now we’re doing this:

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

Now we’re doing this:

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

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

What did we win?

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

Build and ship your own stuff

Dev wants: more freedom

Ops wants: less variation

Immutable Infrastructure

One approach: give devs full control over their

images

Dev gets: complete freedom

Ops gets: infinity snowflakes

Devs often don't know systems

Standardized on JVM languages

If you can build a JAR, we can deploy it

Dev gets: a little freedom

Ops gets: less variation

Standard App Packaging

Standard Deploy Process

Dev gets: complete freedom

Ops gets: no snowflakes!

Reinventing CI/CD can be high-cost

Don't Refactor In The Red

The container is the build artifact

The container is the unit of deployment

Start by replacing only those things

Drop-In Replacements!

Show Example Code Now

Recap! We now have:

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

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

Thanks For ComingJustin Clayton @justinclayton42 github.com/justinclayton

top related