aarhus devops meetup february 2016 - docker in development

Post on 13-Feb-2017

315 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

February Aarhus DevOps Meetup

Docker in Development

Contact Information

Torben B HaaghTeam Lead, Cloud TeamStibo SystemsE: tobh@stibosystems.comW:www.stibosystems.dkL: linkedin.com/in/tbhaagh

Docker Job Trends

4

5

Evolution of IT

1995 2015

Running on any available set of

physical resources(public/private/

virtualized)

Assembled by developers using

best available services

Thin app onweb or mobileThick, client-server

app on thick client

Well-defined stack:- O/S

- Runtime- Middleware

MonolithicPhysical

Infrastructure

Source: http://www.slideshare.net/dotCloud/why-docker

Challenges

2015

How to ensure services interact consistently,

avoid dependency hell

Running on any available set of

physical resources(public/private/

virtualized)

Assembled by developers using

best available services

Thin app on web or mobile

Source: http://www.slideshare.net/dotCloud/why-docker

How to migrate & scale quickly, and ensure

compatibility

How to avoid N×M different configurations

7

Static website

Web frontend

User DB

Queue Analytics DB

Background workers

API endpoint

nginx 1.5 + modsecurity + openssl + bootstrap 2

postgresql + pgv8 + v8

hadoop + hive + thrift + OpenJDK

Ruby + Rails + sass + Unicorn

Redis + redis-sentinel

Python 3.0 + celery + pyredis + libcurl + ffmpeg + libopencv + nodejs

+ phantomjs

Python 2.7 + Flask + pyredis + celery + psycopg + postgresql-client

Development VM

QA server

Public Cloud

Disaster recovery

Contributor’s laptop

Production Servers

Challenges

Multip

licity

of S

tacks

Multip

licity

of

hard

ware

environm

ents

Production Cluster

Customer Data Center

Do s

erv

ices a

nd

apps in

tera

ct

appro

pria

tely?

Can I m

igra

te

sm

ooth

ly and

quic

kly?

Source: http://www.slideshare.net/dotCloud/why-docker

8

Results in N×M compatibility nightmare

Static website

Web frontend

Background workers

User DB

Analytics DB

Queue

Development

VMQA Server

Single Prod

Server

Onsite

ClusterPublic Cloud

Contributor’s

laptop

Customer

Servers

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

Source: http://www.slideshare.net/dotCloud/why-docker

9

Multip

licity

of G

oods

Multip

ilicity

of

meth

ods for

transport

ing/s

toring

Do I w

orry a

bout

how

goods in

tera

ct

(e.g

. coffe

e b

eans

next to

spic

es)

Can I tra

nsport q

uic

kly

and s

mooth

ly(e

.g. fro

m b

oat to

train

to

truck)

Cargo Transport Pre-1960

Source: http://www.slideshare.net/dotCloud/why-docker

10

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

Also an N×M Matrix

Source: http://www.slideshare.net/dotCloud/why-docker

11

Multip

licity

of G

oods

Multip

licity

of

meth

ods for

transport

ing/s

toring

Do I w

orry a

bout

how

goods in

tera

ct

(e.g

. coffe

e b

eans

next to

spic

es)

Can I tra

nsport

quic

kly a

nd s

mooth

ly(e

.g. fro

m b

oat to

tra

in to

truck)

Solution: Intermodal Shipping Container

…in between, can be loaded and

unloaded, stacked, transported efficiently

over long distances, and transferred from

one mode of transport to another

A standard container that is loaded

with virtually any goods, and stays

sealed until it reaches final delivery.

Source: http://www.slideshare.net/dotCloud/why-docker

12

Static website Web frontend User DB Queue Analytics DB

Development VM

QA server Public Cloud Contributor’s laptop

Docker is a shipping container system for code

Multip

licity

of S

tacks

Multip

licity

of

hard

ware

environm

ents

Production Cluster

Customer Data Center

Do s

erv

ices a

nd

apps in

tera

ct

appro

pria

tely?

Can I m

igra

te

sm

ooth

ly and q

uic

kly

…that can be manipulated using standard

operations and run consistently on virtually

any hardware platform

An engine that enables any payload

to be encapsulated as a lightweight,

portable, self-sufficient container…

Source: http://www.slideshare.net/dotCloud/why-docker

AppA

Containers vs. VMs

Host OS

Infrastructure

GuestOS

Bins/Libs

AppA’

Bins/Libs

AppB

Bins/Libs

App A

’ Docker

Infrastructure

App A

VM

Container

Containers are isolated,

but share OS and, where

appropriate, bins/libraries

Bins/

Libs

Source: http://www.slideshare.net/dotCloud/why-docker

GuestOS

Bins/Libs

GuestOS

App B

App B

App B

App B

Host OS

Hypervisor (Type 2)

Why the Business Care

“… make your local development and build workflow faster, more efficient, and more lightweight.”

- James Turnbull, The Docker Book: Containerization is the new virtualization

Why Developers Care

“Docker interests me because it allows simple environment isolation and repeatability. I can create a run-time environment once, package it up, then run it again on any other machine. Furthermore, everything that runs in that environment is isolated from the underlying host (much like a virtual machine). And best of all, everything is fast and simple.”

- Gregory Szorc, Mozilla Foundation

Source: http://www.slideshare.net/dotCloud/why-docker

Why Operations Care

With Docker, Developers care about their applications running inside containers, and Operations cares about managing the containers.

- James Turnbull, The Docker Book: Containerization is the new virtualization

Local Dev

Docker Machine

Docker Compose

Docker Engine

Source

Atlasssian CloudAWS

Bamboo build agent

Docker Hub

Docker Images

Docker Images

Deployment Environments

AWS

Docker Images

Docker Image File

21

FROM FROM FROM FROM ewolff////docker-javaADD ADD ADD ADD application.properties configADD ADD ADD ADD leap-base-0.0.1----SNAPSHOT.jarCMDCMDCMDCMD ////usr////bin////java -jar leap-base-0.0.1----SNAPSHOT.jarEXPOSE EXPOSE EXPOSE EXPOSE 8080

Docker Hub

Demo

Questions & Comments

References

� http://www.slideshare.net/dotCloud/why-docker� https://www.docker.com/products/docker-toolbox� https://github.com/deviantony/docker-elk� https://github.com/google/cadvisor

top related