Alles Docker oder Was ?

Post on 16-Apr-2017

61 views 3 download

Transcript of Alles Docker oder Was ?

BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH

Alles Docker oder was?Grundlagen und Vorteile von Container-Architekturen

Anatole Tresch, Principal Consultant

Alles Docker oder was?2 25.11.15

BIO

Anatole Tresch

● Principal Consultant, Trivadis AG (Switzerland)● Star Spec Lead JSR 354, Most significant spec lead 2015● Expert Group Member● Technical Architect, Lead Engineer● Apache PPMC Member

● Twitter: @atsticks● anatole@apache.org● anatole.tresch@trivadis.com●

Alles Docker oder was?3 25.11.15

Agenda

● Motivation

● Containers

● Docker

● Docker in Practice

Why Docker will rule the world!4 10.02.16

Alles Docker oder was?5 25.11.15

Docker?

● > 50000 pulls

● > 4000 Github stars

● > 100 significant contributors

● > 150 projects on top of Docker

● 1000s of dockerized applications

● Integrated with Jenkins, Travis, Chef, Puppet, Vagrant and Openstack

● Used by Ebay, Uber, Mozilla, Cloudfare, Rackspace and more...

http://docker.com

Alles Docker oder was?6 10.02.16

Let‘s go back to the

history of computation...

Alles Docker oder was?7 10.02.16

We started with...

Alles Docker oder was?8 10.02.16

Abstract symbols and formulas...

Alles Docker oder was?9 10.02.16

...and improved...

Alles Docker oder was?10 10.02.16

We scaled !

Alles Docker oder was?11 10.02.16

Alles Docker oder was?12 10.02.16

We started with automation...

Alles Docker oder was?13 10.02.16

Alles Docker oder was?14 10.02.16

...and miniaturization...

Alles Docker oder was?15 10.02.16

Alles Docker oder was?16 10.02.16

...and then we added electricity...

Alles Docker oder was?17 10.02.16

First we used it…

… as engines for our mechanical devices...

Alles Docker oder was?18 10.02.16

Then we used itfor performing the calculations itself...

Alles Docker oder was?19 10.02.16

Alles Docker oder was?20 10.02.16

...and things evolved further...

Alles Docker oder was?21 10.02.16

We made computers talking with each other.

So they can collaborate.

Alles Docker oder was?22 10.02.16

We started small…

...and evolved quickly...

Alles Docker oder was?23 10.02.16

...until...

Alles Docker oder was?24 10.02.16

Alles Docker oder was?25 25.11.15

Recapitulation...

Thick Client/Server appon thick client

Well defined stack:● OS● Runtime● Middleware

Monolithic physicalinfrastructure

1995 Today

Thin apps (mobile, tablet)

Assembled using (micro)services

Running on any resources (public, private, virtualized)

Why Docker will rule the world!26 10.02.16

Container

Alles Docker oder was?27 25.11.15

Challenges 2016

How to ensure servicesinteract consistently?

How to avoid dependency hell?

How to avoid N x NDifferent configs?

How to fail-over, migrate & scale quickly?

How to ensure compatibility?

How to ensure decouplingon client side? Manage

Javascript...How to ensure location

Transparency andResilience at Big Scale?

Alles Docker oder was?28 25.11.15

Mul

tiple

Sta

cks

Mul

tiple

HW

env

Challenges

Smooth and quick migration?

Do services andapps interact

appropriately?

Alles Docker oder was?29 25.11.15

Results in N x N compatibility nightmareStatic website

? ? ? ? ? ? ?

Web frontend

? ? ? ? ? ? ?

Background workers

? ? ? ? ? ? ?

User DB ? ? ? ? ? ? ?

Analytics DB

? ? ? ? ? ? ?

Queue ? ? ? ? ? ? ?

Development VM

QA Server Prod Server

Onsite Cloud

Pulic Cloud

Contributors Laptop

Customer Services

Alles Docker oder was?30 10.02.16

Why Containers help?

Alles Docker oder was?31 10.02.16

Let‘s look at the „real“ thing...

Alles Docker oder was?32 25.11.15

Mul

tiple

Goo

dsM

ultip

le m

etho

dsfo

r st

orin

g/tr

ansp

ort

Cargo Transport Pre 1960

Can I transport quicklyand smoothly (egfrom boat to trainTo truck)

Do I worry abouthow goods interact(eg coffe beansnext to spices)

Alles Docker oder was?33 25.11.15

Results in N x N compatibility matrix nightmare

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

? ? ? ? ? ? ?

Alles Docker oder was?34 10.02.16

What was the solution?

Alles Docker oder was?35 10.02.16

Containers !

Alles Docker oder was?36 25.11.15

Mul

tiple

Goo

dsM

ultip

le m

etho

dsfo

r st

orin

g/tr

ansp

ort

Containers!

Can I transport quicklyand smoothly (egfrom boat to trainTo truck)

Do I worry abouthow goods interact(eg coffe beansnext to spices)

Alles Docker oder was?37 25.11.15

N x N compatibility problem solved !

Alles Docker oder was?38 25.11.15

Benefits

● 90 % of all cargo shipped in containers

● Order of magnitude cost and time

benefits

● Massive reduction in losses due to theft

or damage

● Freight cost reduced from >26% to < 3%

● Massive Globalization

● 500 ships deliver 200M containers/year

● An new eco-system !

Alles Docker oder was?39 10.02.16

And what about Docker ?

Alles Docker oder was?40 10.02.16

= container system for code !

Alles Docker oder was?41 25.11.15

Docker ContainersM

ultip

le S

tack

sM

ultip

le H

W e

nv

Smooth and quick migration?

Do services andapps interact

appropriately?

Alles Docker oder was?42 25.11.15

In other words...M

ultip

le S

tack

sM

ultip

le H

W e

nv

Smooth and quick migration?

Do services andapps interact

appropriately?

Alles Docker oder was?43 25.11.15

Compatibility nightmare solved !Static website

? ? ? ? ? ? ?

Web frontend

? ? ? ? ? ? ?

Background workers

? ? ? ? ? ? ?

User DB ? ? ? ? ? ? ?

Analytics DB

? ? ? ? ? ? ?

Queue ? ? ? ? ? ? ?

Development VM

QA Server Prod Server

Onsite Cloud

Pulic Cloud

Contributors Laptop

Customer Services

Alles Docker oder was?44 25.11.15

Physical and Software Containers ?Aspect Physical Container Software Container

Content Agnostic Any type of cargo Any system and its dependencies

Hardware Agnostic Standard shape and interface allow to move between transport systems without modification or opening

Can run consistently on virtually any hardware – Vms, bare metal, openstack, public cloud – without any modification

Content Isolation Containers can be stacked and shipped together

Resource, network, content isolation.Stacking by orchestration layer.

Automation Easy (loading, unloading, moving) Standard operations: start, stop, status, search, commit,... Matches perfectly with auto-scaling, CI/CD, hybrid clouds

Efficiency No opening or modification needed. Lightweight, no perf or startup penalty, quick to move and manipulate

Separation of concerns Shippers: content, worriors: outside Developers: code, Ops: infrastructure

Alles Docker oder was?45 25.11.15

Advantages

● Clean and portable runtime environment

● Solves dependency hell, eliminates compatibility issues (almost)

● Allows multiple versions running in parallel

● Supports test automatation, integration, packaging

● Cheap, overhead-less

● Instant replay and reset of images

Alles Docker oder was?46 10.02.16

Alles Docker oder was?47 25.11.15

Docker Basics

● Build

● build images that contain your application’s entire environment, or application

operating system

● Ship

● Share images (dockerhub.com, private registry)

● Run

● Docker Daemon, Docker Registry

● Docker Client

Alles Docker oder was?48 25.11.15

Docker Components

Alles Docker oder was?49 25.11.15

Docker – Simple Example

Source: http://blog.arungupta.me/getting-started-with-docker/

Alles Docker oder was?50 25.11.15

Docker – Simple Example

Source: http://blog.arungupta.me/getting-started-with-docker/

Alles Docker oder was?51 10.02.16

Let‘s dive deeper...

Alles Docker oder was?52 10.02.16

Alles Docker oder was?53 25.11.15

Containers vs VMs

● Containers are isolated

● Containers share OS, and where

appropriate bins/libs

● Short Startup < 1 second

Alles Docker oder was?54 25.11.15

Why are Containers so lightweight ?

Original App:● No OS!

VMs Containers

Copy of App:● No OS!

● Can share bins/libs

Modofied App:

● Contains only diffs

between A nd A'

Alles Docker oder was?55 25.11.15

Docker Extension Points

Docker Functionality

● Versioning

● Lifecycle Management

● Networking

● Storage

Other Docker Products

● Machine

● Clustering (Swarm)

● Cloud Integration (Tutum)

● Orchestration (DataCenter)

Storage Storage

Storage Storage

Networking

Networking

NetworkingNetworking

NetworkingStorage Storage

StorageStorage

Alles Docker oder was?56 25.11.15

Size matters!

Alles Docker oder was?57 25.11.15

Participating Companies

Source: Lawrence Hecht / TheNewStack

Alles Docker oder was?58 25.11.15

Usage

Source: Lawrence Hecht / TheNewStack Books

Alles Docker oder was?59 25.11.15

Deployment Infrastructure

Source: Lawrence Hecht / TheNewStack

Why Docker will rule the world!60 10.02.16

Docker in Practice

Alles Docker oder was?61 10.02.16

For Operations Docker provides

● A standard format for an „executable“

● A unified API for operating these executables

For Developers Docker provides

● Isolated, repeatable and relocatable runtime environment setup

● Isolation between containers and against the host

● Fast and Simple in Use

Alles Docker oder was?62 10.02.16

Nice.

What can I do with it ?

Alles Docker oder was?63 10.02.16

Developers

● Use Microservices !

● Let the infrastructure handle load-balancing, scaling and fail-over

● Focus on the business logic

● Build CI/CD pipelines

● Do canary production testing

● Use Containers as deployable artifact

● Use Containers as building blocks when exploring new solution designs

Alles Docker oder was?64 10.02.16

Operations

● Use containers as the default deployment format

● Execute containers fully automated

● Load-balancing

● Auto-scaling (up and down)

● Resilience and Fail-Over Handling

● Monitoring and Logging

● Use a Datacenter OS

● Dynamic Resource Management

● Global Service Location

● Integration with classic Hypervisor technology

Alles Docker oder was?65 25.11.15

Apache Mesos Apache Mesos Apache Mesos

The Leading Edge...

Ceph Storage Cluster

Orchetration (Kubernetes/Marathon/...)

Cloud Provider 1 Cloud Provider 2 On Premise

VM

Software Defined Network SDN

Distributed Configuration

Ceph Storage Cluster Ceph Storage Cluster

Hypervisor

OrchetrationOrchetration

SDN SDN

VM

Alles Docker oder was?66 25.11.15

The Leading Edge

● Distributed Storage allows to move

your data within minutes.

● Services automatically scale.

● No Outages anymore.

● Cloud Provider has no idea what is

happening inside (which is good)

● Very high degree of automation.

● Microservices and Resilient

Architecture are at its core.

● Machine Learning not yet concidered!

In 5-10 years computation and storage will

be

→ commodity

→ dynamically (automatically?) managed

→ fully distributed and provider transparent

→ resilient

→ 10-20x cheaper

→ This is the 4th revolution of IT

Alles Docker oder was?67 10.02.16

Sounds like Future ?

Alles Docker oder was?68 10.02.16

NO.

Alles Docker oder was?69 10.02.16

It is already here.

Alles Docker oder was?70 10.02.16

Open Source.

Alles Docker oder was?71 10.02.16

Tested.

Alles Docker oder was?72 10.02.16

Production Ready.

Why Docker will rule the world!73 10.02.16

Summary

Alles Docker oder was?74 25.11.15

Summary

● Containers and Microservices are a natural match.

● Use a computational platform to get the maximum benefits.

● Scalability and Resiliency moved from development into operations.

● Get comfortable with modern software design principles.

● Changes affect everything: your infrastructure, your organization, your data, your

skills.

● Containers are at the core.

● The change is disruptive, but IMO inevitable! *

* with no alternative! Compare the impact on taxi companies when Uber.com entered the market

Alles Docker oder was?75 10.02.16

Act NOW !

Thank You !

Alles Docker oder was?76 25.11.15

Referenzen● Docker: http://docker.com, Docker e-books: http://thenewstack.io/ebookseries/ , Performance:

http://de.slideshare.net/Flux7Labs/performance-of-docker-vs-vms, Basics:

http://de.slideshare.net/larrycai/learn-docker-in-90-minutes?related=1

● Docker vs. VMs:

https://dzone.com/articles/vms-vs-docker-dan-jones-in-network-world?utm_source=Weekly%20Digest

&utm_medium=email&utm_content=cloud&utm_campaign=wd%202016-02-17● Linux Containers: https://linuxcontainers.org/

● Open Container: announcement: https://coreos.com/blog/app-container-and-the-open-container-project

● Appc:

http://thenewstack.io/coalition-for-app-container-spec-shows-docker-is-not-the-standard-for-everyone/

● Apache Mesos: http://mesos.apache.org

● Mesosphere: http://mesosphere.com

● Kubernetes: http://kubernetes.io

● Martin Fowler: Microservices. http://martinfowler.com/articles/microservices.html

Alles Docker oder was?77 10.02.16

Alles Docker oder was?Anatole TreschPrincipal Consultant

Tel. +41 58 459 53 93anatole.tresch@trivadis.com