Contained Support

Kelly Mason

Customer Engineer @ Bugsnag

@kellymase

Replicating and sharing technical support issues using containers

In store for today:

  • Why containerization is so trendy
  • Support engineering use cases for containers
  • Running and debugging a containerized application

@kellymase

First, a practical step.

Download docker:

docs.docker.com/install

@kellymase

  • create a Docker account
  • install Docker Community Edition (free)

@kellymase

Containerization

A way to package an application and everything the application needs to run in isolation from the operating system and infrastructure it runs on.

It allows applications to run easily and consistently in various environments (in the cloud, on your local machine, etc).

@kellymase

Why do we care?

@kellymase

Often you want to work on one portion of a complex system or codebase, and you want the rest of the system to Just Work.

An example

@kellymase

@kellymase

@kellymase

HOUSE

HOUSE

KITCHEN

BEDROOM

GARAGE

@kellymase

@kellymase

@kellymase

Operating System

Docker

Infrastructure

@kellymase

A few support use cases

@kellymase

Cloning and testing a repo quickly

@kellymase

Example

Hi Support,

 

Oh no! It looks like the filter bar is broken on your website.

Sincerely,

Searchy McFilterson

@kellymase

@kellymase

@kellymase

"Well it worked when I tested it!"

@kellymase

@kellymase

Example

Hi Team,

 

We tried to install your ruby gem, but it doesn't work with Ruby 2.1 so unfortunately we can't use it.

Sincerely,

Antique Rubyist

@kellymase

Dependencies on dependencies

@kellymase

Hi there,

 

My configuration doesn't work. I'm using Laravel 5.1, PHP 5.2, Composer 1.4, and Bugsnag 2.0. Help!

Sincerely,

My job depends on this

Example

@kellymase

Today's support request:

random inspiration that isn't very...inspirational

@kellymase

@kellymase

To the command line!

@kellymase

@kellymase

Dockerfile instructions Docker reads from to create the Docker image

Terminology

Docker image a static, read-only template of layered filesystems, including the application, its libraries and binaries that instructs how to build the container

Docker container an individual instance of a Docker image that actually runs the code

@kellymase

Build and run

@kellymase

Build

Hey Docker! Build an image of my application.

@kellymase

Build

Hey Docker! Build an image of my application.

I'll need to refer to the image later...add the tag myfirstimage.

@kellymase

Build

Hey Docker! Build an image of my application.

I'll need to refer to the image later...add the tag myfirstimage.

Use the Dockerfile that's located in our current folder.

@kellymase

Run

Hey Docker, run an image for me.

@kellymase

Run

Hey Docker, run an image for me.

Using whatever is mapped to port 8080 in the container, expose it on port 8080 in my dev environment.

@kellymase

Run

Hey Docker, run an image for me.

Using whatever is mapped to port 8080 in the container, expose it on port 8080 in my dev environment.

Remember that image with the tag myfirstimage we created a minute ago? use that.

@kellymase

Build and run

@kellymase

Fix the bug

@kellymase

Build and run (again)

@kellymase

Docker Compose

@kellymase

Docker compose

Instructions for starting your containers

Build an image of your application

Dockerfile 

@kellymase

Instructions Docker reads from to create the Docker image

docker-compose.yml 

$ docker-compose.yml 

Steps to share

@kellymase

Next Steps:

@kellymase

hello@kellymariemason.com

  1. Clone the app
  2. Fix the bug
  3. build the docker image
  4. run the docker image

@kellymase

Reproduce and fix:

Service #1

Service #2

UI

mobile!

@kellymase

Service #1

Service #2

UI

mobile!

@kellymase

Service #1

Service #2

UI

mobile!

@kellymase

Operating System

Docker

Infrastructure

@kellymase

Contained Support with Docker

By Kelly Mason

Contained Support with Docker

  • 619