Containers Aren't Just for the Cloud

33
Containers Aren’t Just for the Cloud Local Development with Docker and Kalabox

Transcript of Containers Aren't Just for the Cloud

Containers Aren’t Just for the Cloud

Local Development with Docker and Kalabox

I’m a co-founder at Kalamuna.

I listen to people and help solve their problems.reynoldsalec

[email protected]

Alec Reynolds

areynolds

Ben Cauldwell

I’m the lead developer of Kalabox.

I dig deep to find elegant solutions for complicated problems.

Kalamuna is an agency in the San Francisco East Bay aka Oakland that makes the internet for rabble rousing companies and organizations.

What is Docker?

What is Docker?

.“An easy, lightweight virtualized environment for portable applications.”--Docker website

Stop with the Bay Area doublespeak and break it down for me kid.

What is Docker?

.“An easy, lightweight virtualized environment for portable applications.”

Docker uses containers.

Virtual Machine

What is a container?

Container

Virtual Machine

Why use containers?

Container

This is heavy

Why use containers?

.Quick re-building and deployment of apps.

Faster scaling.

Require fewer resources (= lower hosting bill)

What is Docker?

.“An easy, lightweight virtualized environment for portable applications.”

Docker uses containers.

Docker makes it easy to have groups of containers that work together to power your app.

What is Docker?

.“An easy, lightweight virtualized environment for portable applications.”

Docker uses containers.

Docker makes it easy to have groups of containers that work together to power your app.

Docker apps are easier to install, configure, and deploy.

Why Would I Use Docker for Local Development?

Pros:■ Good performanceCons:■ Websites don’t run on Mac OS X

(prod parity)■ Tooling has unreliable versions■ Issues updating team tooling■ Not cross-platform

Existing Local Dev Solutions: Native

Existing Local Dev Solutions: Virtual Machines

Pros:■ Production Parity■ Easier to deploy/version toolingCons:■ All applications must run on same

infrastructure■ Hard to test/debug new

infrastructure■ Typically SLOW AS BALLZ

Simple.

Easy setup.

Fast.

Flexible.

Complete.

Open Source.

Cross-Platform

Your Tooling.

Prod Parity.Jeff Geerling - http://www.midwesternmac.com/blogs/jeff-geerling/developing-drupal-vagrant-and

Jeff Geerling - http://www.midwesternmac.com/blogs/jeff-geerling/developing-drupal-vagrant-and

Simple.

Easy setup.

Fast.

Flexible.

Complete.

Open Source.

Cross-Platform

Your Tooling.

Prod Parity.

Some hard numbers

VagrantVirtual Machine

DockerContainers

● ~15 min install time

● ~6 min Drupal install

● ~Run 1 webserver● ~20 tools

● ~5 min install time● ~2 min Drupal

install● ~Run plethora of

containers● As many tools as

you want

Jeez, that sounds great. What else could a dev want?

Batteries Not Included: DNS Routing

.Docker: 1. Start boot2docker in VirtualBox

2. Start server container: docker run -d -P --name web nginx

3. Lookup the container’s port: docker ps4. Go to the url: http://localhost:49157

Batteries Not Included: DNS Routing

.■ Have you ever edited /etc/hosts?■ Do you never want to touch it again?

Batteries Not Included: Filesharing

.■ Sharing files between a virtual machine

and its host can be slow

Batteries Not Included: Pluggable App Infrastructure

.

■ What if I want to do something on a certain step of my app’s spin-up?

■ What if I wanted to package dev tooling along with my app setup and make CLI commands available?

■ What if I want to integrate with cloud dev tools and hosting providers?

You can think about Kalabox as a super-fast, highly customizable Vagrant for containers.

Kalabox architecture

Mac OSX/Windows/Linux

Provider/Boot2Docker/TinyCoreLinux

Express Othersv

Backdrop

Drupal8

DRUSH

What it all means

● Save tons of time● Use the tools you deserve● Production parity● Standardize your team,

tools and flow● Use the latest and greatest

Metaslide for demo:

1. Spin up some apps

2. Show app arch

3. Show customize opts

4. Show plugins

Roadmap

LOCAL DEV FOR THE MASSES: VAGRANT + VIRTUAL BOX + PUPPET = KALABOX

Summer 2015

Roadmap

LOCAL DEV FOR THE MASSES: VAGRANT + VIRTUAL BOX + PUPPET = KALABOX

Questions?

Thank You!

www.kalamuna.comalec OR

[email protected]