Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf ·...

75
Something until the talk starts, eg. Flickr slideshow

Transcript of Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf ·...

Page 1: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Something until the talk starts, eg. Flickr slideshow

Page 2: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Docker from Dev to Prodfor JavaSkop 2015

Page 3: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Chris@cimnine

Disclaimer: The opinions expressed are those of the speaker and do not reflect opinions of any other person, company or agency.

Page 4: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Chris@cimnine

Disclaimer: The opinions expressed are those of the speaker and do not reflect opinions of any other person, company or agency.

Page 5: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Chris@cimnine

Disclaimer: The opinions expressed are those of the speaker and do not reflect opinions of any other person, company or agency.

Page 6: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CI Integration Pre-Prod Prod

Page 7: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

orange lines are data flow and blue lines are control flow

VCS

DEVDEV CICI Integr.Integr.Pre

ProdPre

ProdProdProd

Dev

Page 8: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.Pre

ProdPre

ProdProdProd

Dev

orange lines are data flow and blue lines are control flow

Page 9: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.Pre

ProdPre

ProdProdProd

Dev

orange lines are data flow and blue lines are control flow

Page 10: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.Pre

ProdPre

ProdProdProd

Dev Ops

orange lines are data flow and blue lines are control flow

Page 11: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are
Page 12: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

Dev Ops

Pre-Prod

Prod

orange lines are data flow and blue lines are control flow

Page 13: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CI Integration Pre-Prod Prod

Page 14: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

DevDev CI Integration Pre-Prod Prod

Page 15: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

DevDev CI Integration Pre-Prod Prod

Page 16: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are
Page 17: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

jar

Java

Page 18: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

jar

Java

Page 19: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

jar

Java

Page 20: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

DevDev CI Integration Pre-Prod Prod

Page 21: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CI Integration Pre-Prod Prod

Page 22: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI

Dev

orange lines are data flow and blue lines are control flow

Page 23: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI

Devgit push

orange lines are data flow and blue lines are control flow

Page 24: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI

Devpost-commit

hook

orange lines are data flow and blue lines are control flow

Page 25: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CICI Integration Pre-Prod Prod

Page 26: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CICI Integration Pre-Prod Prod

Page 27: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CI Integration Pre-Prod Prod

Page 28: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

Dev

?

orange lines are data flow and blue lines are control flow

Page 29: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI

Repository

Integr.Integr.

Dev

orange lines are data flow and blue lines are control flow

Page 30: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI

DockerRegistry

Integr.Integr.

Dev

orange lines are data flow and blue lines are control flow

Page 31: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

Dev

DockerRegistry

dockerpush

orange lines are data flow and blue lines are control flow

Page 32: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

Dev

DockerRegistry

ssh + docker run

orange lines are data flow and blue lines are control flow

Page 33: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

orange lines are data flow and blue lines are control flow

Page 34: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

install that thing

orange lines are data flow and blue lines are control flow

Page 35: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

ssh + docker run

orange lines are data flow and blue lines are control flow

Page 36: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CI Integration Pre-Prod Prod

Page 37: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CI Integration Pre-Prod Prod

Page 38: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

Pre ProdPre

ProdProdProd

orange lines are data flow and blue lines are control flow

Page 39: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

Pre ProdPre

ProdProdProd

Ops

orange lines are data flow and blue lines are control flow

Page 40: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

Pre ProdPre

ProdProdProd

Ops

orange lines are data flow and blue lines are control flow

Page 41: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

Pre ProdPre

ProdProdProd

Ops

orange lines are data flow and blue lines are control flow

Page 42: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Easy Packaging

Consistent Dependencies

Repeatable Deployments

Easy Automation

Page 43: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Logging

Monitoring

Scaling

Continuous Delivery

Automatic Recovery

Page 44: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

Pre ProdPre

ProdProdProd

Ops

orange lines are data flow and blue lines are control flow

Page 45: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

Pre ProdPre

ProdProdProd

orange lines are data flow and blue lines are control flow

Page 46: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

HelperDev

DockerRegistry

Pre ProdPre

ProdProdProd

orange lines are data flow and blue lines are control flow

Page 47: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

Scheduler (Master)

Dev

DockerRegistry

Pre ProdPre

ProdProdProd

A A A

orange lines are data flow and blue lines are control flow

agent

Page 48: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VCS

DEVDEV CICI Integr.Integr.

Scheduler (Master)

Dev

DockerRegistry

Pre ProdPre

ProdProdProd

A A A

orange lines are data flow and blue lines are control flow

Page 49: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Cluster State

Master

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Page 50: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Cluster State

Master

Page 51: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

commands desired state vs. reports actual state

Cluster State

Master

Page 52: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

commands desired state vs. reports actual state

Cluster State

Master

Page 53: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

commands desired state vs. reports actual state

Cluster State

Master

Page 54: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

Worker Host w/ Agent

commands desired state vs. reports actual state

Cluster State

Master

Page 55: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Worker Worker Worker Worker Worker

commands desired state vs. reports actual state

Cluster State

Master

Page 56: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Orchestration

Page 57: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Which container runs on which host?

Orchestration

Page 58: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Which container runs on which host?

How does the traffic come there?

Orchestration

Page 59: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Which container runs on which host?

How does the traffic come there?

How do the services talk with each other?

Orchestration

Page 60: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Which container runs on which host?

How does the traffic come there?

How do the services talk with each other?

How to do updates w/o service interruption?

Orchestration

Page 61: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Which container runs on which host?

How does the traffic come there?

How do the services talk with each other?

How to scale out?How to do updates w/o service interruption?

Orchestration

Page 62: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Which container runs on which host?

How does the traffic come there?

How do the services talk with each other?

Where do the logs go?

How to scale out?How to do updates w/o service interruption?

Orchestration

Page 63: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Which container runs on which host?

How does the traffic come there?

How do the services talk with each other?

Where do the logs go?

How to scale out?How to do updates w/o service interruption?

Orchestration

Page 64: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Orchestration

Kubernetes

Rancher

Docker Swarm

Apache Mesos with Marathon

Spotify Helios

Newrelic Centurion

Page 65: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Orchestration

Kubernetes

Rancher

Docker Swarm

Apache Mesos with Marathon

Spotify Helios

Newrelic Centurion

Page 66: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Cloud Provider

Google Container Engine

Amazon EC2 Container ServiceMicrosoft Azure

Redhat OpenstackCloudfoundry

heroku

Page 67: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CI Integration Pre-Prod Prod

Page 68: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

http://12factor.net

Page 69: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

I. CodebaseOne codebase tracked in revision control, many deploys

II. DependenciesExplicitly declare and isolate dependencies

III. ConfigStore config in the environment

IV. Backing ServicesTreat backing services as attached resources

V. Build, release, runStrictly separate build and run stages

VI. ProcessesExecute the app as one or more stateless processes

Page 70: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

VII. Port bindingExport services via port binding

VIII. ConcurrencyScale out via the process model

IX. DisposabilityMaximize robustness with fast startup and graceful shutdown

X. Dev/prod parityKeep development, staging, and production as similar as possible

XI. LogsTreat logs as event streams

XII. Admin processesRun admin/management tasks as one-off processes

Page 71: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Dev CI Integration Pre-Prod Prod

Page 72: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are
Page 73: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Databases•Very own requirements:

• State-full• Low CPU but high I/O• Distributed data• (usually) complex to scale• (usually) not built for “hot swap”

• not 12 Factor applications

Page 74: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are

Databases•Don’t dockerize databases

•Keep them external to the system• DBA will love you not hate you• Easier to maintain• Very own cluster mechanisms• Easier routing in Datacenters

Page 75: Something until the talk starts, eg. Flickr slideshowjug.mk/presentations/javaskop15/docker.pdf · Docker Registry Pre Prod Prod A A A orange lines are data flow and blue lines are