aarhus devops meetup february 2016 - docker in development

21
February Aarhus DevOps Meetup Docker in Development

Upload: torben-bisgaard-haagh

Post on 13-Feb-2017

318 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Aarhus DevOps Meetup February 2016 - Docker in Development

February Aarhus DevOps Meetup

Docker in Development

Page 2: Aarhus DevOps Meetup February 2016 - Docker in Development
Page 3: Aarhus DevOps Meetup February 2016 - Docker in Development

Contact Information

Torben B HaaghTeam Lead, Cloud TeamStibo SystemsE: [email protected]:www.stibosystems.dkL: linkedin.com/in/tbhaagh

Page 4: Aarhus DevOps Meetup February 2016 - Docker in Development

Docker Job Trends

4

Page 5: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 6: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 7: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 8: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 9: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 10: Aarhus DevOps Meetup February 2016 - Docker in Development

10

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

Also an N×M Matrix

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

Page 11: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 12: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 13: Aarhus DevOps Meetup February 2016 - Docker in Development

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)

Page 14: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 15: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 16: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 17: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 18: Aarhus DevOps Meetup February 2016 - Docker in Development

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

Page 19: Aarhus DevOps Meetup February 2016 - Docker in Development

Demo

Page 20: Aarhus DevOps Meetup February 2016 - Docker in Development

Questions & Comments

Page 21: Aarhus DevOps Meetup February 2016 - Docker in Development

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