1. 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
2. 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
●
3. Alles Docker oder was?3 25.11.15
Agenda
●
Motivation
●
Containers
●
Docker
●
Docker in Practice
5. 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
6. Alles Docker oder was?6 10.02.16
Let‘s go back
to the
history of computation...
25. Alles Docker oder was?25 25.11.15
Recapitulation...
Thick Client/Server app
on thick client
Well defined stack:
●
OS
●
Runtime
●
Middleware
Monolithic physical
infrastructure
1995 Today
Thin apps (mobile, tablet)
Assembled using
(micro)services
Running on any
resources (public,
private, virtualized)
27. Alles Docker oder was?27 25.11.15
Challenges
2016
How to ensure services
interact consistently?
How to avoid
dependency hell?
How to avoid N x N
Different configs?
How to fail-over,
migrate & scale quickly?
How to ensure
compatibility?
How to ensure decoupling
on client side? Manage
Javascript...
How to ensure location
Transparency and
Resilience at Big Scale?
28. Alles Docker oder was?28 25.11.15
MultipleStacksMultipleHWenv
Challenges
Smooth and quickmigration?
Do services and
apps interact
appropriately?
29. Alles Docker oder was?29 25.11.15
Results in N x N compatibility nightmare
Static
website
? ? ? ? ? ? ?
Web
frontend
? ? ? ? ? ? ?
Backgroun
d workers
? ? ? ? ? ? ?
User DB ? ? ? ? ? ? ?
Analytics
DB
? ? ? ? ? ? ?
Queue ? ? ? ? ? ? ?
Developm
ent VM
QA Server Prod
Server
Onsite
Cloud
Pulic
Cloud
Contributo
rs Laptop
Customer
Services
32. Alles Docker oder was?32 25.11.15
MultipleGoods
Multiplemethods
forstoring/transportCargo Transport Pre 1960
Can I transport quickly
and smoothly (eg
from boat to trainTo truck)
Do I worry about
how goods interact
(eg coffe beans
next to spices)
33. Alles Docker oder was?33 25.11.15
Results in N x N compatibility matrix nightmare
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
? ? ? ? ? ? ?
36. Alles Docker oder was?36 25.11.15
MultipleGoods
Multiplemethods
forstoring/transportContainers!
Can I transport quickly
and smoothly (eg
from boat to trainTo truck)
Do I worry about
how goods interact
(eg coffe beans
next to spices)
37. Alles Docker oder was?37 25.11.15
N x N compatibility problem solved !
38. 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 !
41. Alles Docker oder was?41 25.11.15
Docker Containers
MultipleStacksMultipleHWenv
Smooth and quickmigration?
Do services and
apps interact
appropriately?
42. Alles Docker oder was?42 25.11.15
In other words...
MultipleStacksMultipleHWenv
Smooth and quickmigration?
Do services and
apps interact
appropriately?
43. Alles Docker oder was?43 25.11.15
Compatibility nightmare solved !
Static
website
? ? ? ? ? ? ?
Web
frontend
? ? ? ? ? ? ?
Backgroun
d workers
? ? ? ? ? ? ?
User DB ? ? ? ? ? ? ?
Analytics
DB
? ? ? ? ? ? ?
Queue ? ? ? ? ? ? ?
Developm
ent VM
QA Server Prod
Server
Onsite
Cloud
Pulic
Cloud
Contributo
rs Laptop
Customer
Services
44. 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
45. 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
53. 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
54. 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'
57. Alles Docker oder was?57 25.11.15
Participating Companies
Source: Lawrence Hecht / TheNewStack
58. Alles Docker oder was?58 25.11.15
Usage
Source: Lawrence Hecht / TheNewStack Books
59. Alles Docker oder was?59 25.11.15
Deployment Infrastructure
Source: Lawrence Hecht / TheNewStack
60. Why Docker will rule the world!60 10.02.16
Docker in Practice
61. 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
63. 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
64. 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
65. 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
66. 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
74. 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