Think outside the container – A look at three fun ways to use Docker



Think outside the container – A look at three fun ways to use Docker

0 2


carina-use-cases

Our talk at OSCON about neat ways to use Carina

On Github getcarina / carina-use-cases

Think outside the container

A look at three fun ways to use Docker

Ash Wilson, Carolyn Van Slyck and Nick Silkey

Game Plan

  • Docker refresher
  • How the Cloud DNS team is using ChatOps
  • How the Developer Experience team builds, tests and deploys our websites
  • Teaching Docker with JupyterHub and Carina
* Moving your flagship application to Docker can be scary * Let's start with the little things instead

Docker in 60 seconds

  • Docker = Container Black Magic Voodoo
  • Docker Image = A packaged application
    • Minimal operating system
    • Source code
    • Dependencies
  • Docker Container = An instance of an image
$ docker run nginx
What's involved in deploying a flask app What that looks like with Docker

Carina

Docker as a Service

getcarina.com

Secure place to run your containers Push button Docker clusters Free

Nick Silkey, @filler

Ops/RelEng, Rackspace Austin

These are speaker notes

chatops (n): putting tools in the middle of the conversation

These are speaker notes

ohai, hubot!

These are speaker notes

πŸ‡ΊπŸ‡Έ Make Incident ResponseGreat Again πŸ‡ΊπŸ‡Έ

Incident Response is inherently collaborative!

Engineers - Incident Mgmt - Stakeholders - Leadership

These are speaker notes

Bork, Bork, Bork

  • We run Chef
  • "Like knife, but for chat!"
  • @hubot: knife status
  • @hubot: knife search ...
  • @hubot: knife (client|node|role) show ...
These are speaker notes

Another Build, Sir?

Instrument jobs, in chat, via webhooks

  • Paramaterized builds (branch=silkey/yak-shave)
  • Identity support (silkey ran, timsim ran w/ param)
  • State of runs (pass, fail, timestamps)
These are speaker notes

The Team That Chats Together ...

@hubot: gif me rick astley

@hubot: youtube me rick astley

!m elarson

pglass++ for fixing all the things!

These are speaker notes

Carina, eh?

Dev onboarded our OpenStack-based product, in Carina soon after it went public beta. Easy via docker-compose!

These are speaker notes

Lets Do It Live!

Heroku + RedisToGo => Carina + ObjectRocket

Typical Stop, Dump, Check, Import, Start, Validate

Dockerfile > Procfile

Drinking our own 🍾

These are speaker notes

make All The Things!

Remember designate-carina?

$ make bootstrap
$ make cluster-create
$ make all
These are speaker notes

make All The Hubots!

$ make setup
$ make carina-create
$ make d-build
$ make d-run
$ make d-ps
These are speaker notes

make All The Hubots!

$ make d-logs
$ make d-roll
$ make pkg-search HUBOT_PACKAGE=hubot-pugme
$ make pkg-add HUBOT_PACKAGE=hubot-pugme
$ make pkg-up
These are speaker notes

Documentation Previews

Ash Wilson

Mic transition, intro

developer.rackspace.com

support.rackspace.com

getcarina.com

These domains are all served by a single, open-source system called "Deconst"

Not static sites

Each site managed independently by different processes

Making changes = hunting down the right person and sending email

Publishing = all over the place; some Jenkins, some manual

What we didn't want

Avoid "Hey everybody, spend loads of time converting all your docs into our one true format!"

Or even worse: "use the same tooling"

Unify: infrastructure; search; metrics and logging

Separate: GitHub repos; source formats

Deconst

Deconstruct your documentation

"Inverted CMS"

Manage content with an API

Bring together docs written in many places in many ways

Preview links

Number one need from the day we shipped: ability to see content before it's live

Needs to be accessible to a wide range of potential contributors

Don't assume everyone has a good Ruby, Python, Node setup locally

Vagrant/local Docker cause more yak-shaving problems

No "staging server": complicated git workflows, only one person can use it at a time

github.com/Strider-CD/strider

Opensource CI/CD software called "Strider"

Chosen because it's nice and twelve-factor, customizable

Custom build plugins for content and control repositories

Preparer

Strider content build plugin runs two Docker containers in sequence

First is the "preparer"

An adapter between the host doc system and the JSON format the content service understands

Writes assets and JSON documents to directories within a workspace volume

Important to run in Docker, as a non-root user! Jekyll and Sphinx can both run arbitrary code

Also keeps us from having to manage Ruby / Python / Node versions on the build host

Submitter

Query the content service with fingerprints to see which assets and documents are new

Pack them in tarballs and bulk-upload them

Strider watches the container's exit status

Fin

deconst.horse

github.com/deconst

Learning How to Whale

Carolyn Van Slyck

* Teaching Docker * Catch-22 * Setup pains

Live Demo

howtowhale.com

Homepage -> Login -> Try Docker

Slideware Demo

These are screenshots in case we are bit by the live demo demons

Under the Hood

Carina OAuth - authenticate and clusters jupyterhub-carina plugin

Jupyter

Interactive online programming environment

jupyter.org

Previously iPython Focused on data science, but fun for other things too!

A Whale of your Own

getcarina.com/blog/learning-how-to-whale

  • Explore an API or CLI
  • Setup-free workshops
  • Interactive documentation

Thanks!

@smashwilson@carolynvs@filler

🐳 🐳 🐳 πŸ„

getcarina.github.io/carina-use-cases

Think outside the container A look at three fun ways to use Docker Ash Wilson, Carolyn Van Slyck and Nick Silkey