SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
The age of orchestration
NICOLA PAOLUCCI • DEVELOPER INSTIGATOR • ATLASSIAN • @DURDN
From Docker basics to cluster management
2
Time me and ring a bell if I am over it. Just kidding I’ll
be over by a bit but it’s ok. We’re friends.
Three minute Docker intro?
3
BINS/LIBS
GUEST OS
HYPERVISOR
HOST OS
SERVER
ROBUST
MONOLITHIC
SLOW TO BOOT
HEAVY
OVERHEAD
APP A
BINS/LIBS
GUEST OS
APP B
DEFINITIONS
Traditional Virtual Machines
4
DOCKER ENGINE
HOST OS
SERVER
LEAN
LIGHTWEIGHT
ISOLATED
PORTABLE
EFFICIENT
BINS/LIBS
APP A
BINS/LIBS
APP B
DEFINITIONS
Docker Containers
5
DEFINITIONS
Seen from another angle, the core of
Docker is four distinct things
Clearly defined
interfaces
Central registry of
ready images
Caching mechanism
to re-use steps
A standard format to
package applications
6
DO WE USE IT?
We have embraced Docker on two fronts
For our internal PaaS In our products
NOT PART OF THIS
SESSION
@durdn
Our internal PaaS,
called Micros
8
File infrastructure numbers
Microservices
8
8
9
File infrastructure numbers
Containers spun per conversion
5
9
10
File infrastructure numbers
Containers spun per month
M6
10
@durdn
@durdn
Orchestration is the
next arena
What’s Orchestration?
13
Services
YOUR APPLICATION
Orchestration
FRAMEWORKS
Data Center
PHYSICAL INFRA
What’s Orchestration?
13
Services
YOUR APPLICATION
Orchestration
FRAMEWORKS
Data Center
PHYSICAL INFRA
@durdn
@durdn
@durdn
17
18
Docker’s Own Orchestration Tools
Docker machine Docker compose Docker swarm Docker network
Where is the DEMO
Lebowski?
20
TOOL NR.1
Docker machine
Simple command line tool to provision local
and remote hosts with Docker installed.
Fantastic to get up and running fast. It has
drivers for many Internet service providers
and PaaS.
Docker machine
$ docker-machine create -d v
INFO[0000] Downloading boot2
INFO[0001] Creating SSH key.
INFO[0001] Creating VirtualB
INFO[0006] Starting VirtualB
INFO[0007] Waiting for VM to
INFO[0041] "dev" has been cr
• Provision a machine with
Docker installed and ready
• Pull a minimal image
• Run a few docker commands
• Tear down the machine
Docker machine DEMO
$ docker-machine create -d virtualb
INFO[0000] Downloading boot2docker.
INFO[0001] Creating SSH key...
INFO[0001] Creating VirtualBox VM..
INFO[0006] Starting VirtualBox VM..
INFO[0007] Waiting for VM to start.
INFO[0041] "dev" has been created a
• “docker-machine create” to provision the host, locally or remotely
• “docker-machine ls” to list the machines
• “docker-machine stop/rm” to stop and remove
Recap of what you saw
$ docker-machine create -d
INFO[0000] Downloading boo
INFO[0001] Creating SSH ke
INFO[0001] Creating Virtua
INFO[0006] Starting Virtua
INFO[0007] Waiting for VM
INFO[0041] "dev" has been
24
TOOL NR.2
Docker compose
Docker compose
Describe the relation of your components in a
simple YAML file called docker-compose.yml
and docker-compose takes care of starting
them and linking them in order.
1 stash:
2 image: atlassian/stash
3 ports:
4 - "7990:7990"
5 - "7999:7999"
6 volumes:
7 - /root/orchestration/stash-data:/
8 links:
9 - db
10 user: root
11 privileged: true
12 db:
13 image: postgres
14 environment:
15 POSTGRES_PASSWORD: somepassword
• Provision a machine on a PaaS
• Pull PostgreSQL and a Java
app from the Registry
• Use Compose to start the app
• Tear down the machine
Docker compose DEMO
$ docker-compose up -d
• “docker-machine create” to provision the host
• Edit “docker-compose.yml” to describe our app
• “docker-compose up -d” to start our application
• “docker-machine rm compose-demo“ to
remove it
Recap of what you saw
$ docker-compose up -d
28
TOOL NR.3
Docker swarm
Deploy images and run containers on a full
clusters as if you’re handling a single machine
Docker swarm
$ docker pull swarm
$ docker run --rm swarm create
6856663cdefdec325839a4b7e1de38e8
@durdn
Docker swarm
swarm master
swarm node swarm node swarm node
container
container
container
container
container
container
discovery service
High level architecture
scheduler
• Strategies
• Spread
• Binpack
• Random
• Filters
• Constraint
• Affinity
• Port
• Dependency
• Health
Swarm comes with strategies and filters
$ docker run -e 
constraint:instance==database --name db
• Provision a Docker swarm
• Made up of three hosts
• Master node
• Node with 2gb of RAM
• simple Node
• Use labels to deploy to nodes
• Run Java app and PostgreSQL
on different nodes
The plan for the Swarm DEMO
$ docker pull swarm
$ docker run --rm swarm create
6856663cdefdec325839a4b7e1de38e8
@durdn
After Step 1
demo-master
node-1 node-2
label: java
discovery service
Current Architecture
scheduler
RAM: 2GB
label: database
RAM: 512MB
@durdn
After Step 2
demo-master
node-1 node-2
label: java
discovery service
Current Architecture
scheduler
RAM: 2GB
label: database
RAM: 512MB
PostgreSQL
@durdn
After Step 3
demo-master
node-1 node-2
label: java
discovery service
Current Architecture
scheduler
RAM: 2GB
label: database
RAM: 512MB
PostgreSQLJava App
• We created a 3-node cluster with
“docker-machine”
• We tagged the nodes with labels
• We started our components using
label constraints and not machine
names
Recap of Swarm DEMO
$ docker pull swarm
$ docker run --rm swarm create
6856663cdefdec325839a4b7e1de38e8
39
COROLLARY
Docker Java Images Are Big
The default Java image is
800+MB ?!
$ docker pull java
REPOSITORY IMAGE ID VIRTUAL SIZE
java 5282faca75e8 817.6 MB
• Alpine Linux provides a minimal
container image of 5MB
• It includes BusyBox and a
package manager
• OpenJDK 7 is already on it…
• Resulting in a 123MB Java image
Start with a smaller base image
FROM alpine:3.2
RUN apk --update add openjdk7-jre
CMD ["/usr/bin/java", "-version"]
For Oracle Java 8 you have to roll it your own
http://bit.do/minimal-java
I hope you are hyped as I am
for all this coolness, come
talk to me afterwards!
Thank you!
NICOLA PAOLUCCI • DEVELOPER INSTIGATOR • ATLASSIAN • @DURDN
Twitter: @durdn

Contenu connexe

Tendances

Tendances (20)

Going Production with Docker and Swarm
Going Production with Docker and SwarmGoing Production with Docker and Swarm
Going Production with Docker and Swarm
 
Dockercon Swarm Updated
Dockercon Swarm UpdatedDockercon Swarm Updated
Dockercon Swarm Updated
 
Docker Swarm for Beginner
Docker Swarm for BeginnerDocker Swarm for Beginner
Docker Swarm for Beginner
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015
 
Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)Docker Swarm Meetup (15min lightning)
Docker Swarm Meetup (15min lightning)
 
Swarm mode
Swarm modeSwarm mode
Swarm mode
 
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
Docker Swarm 45-min Workshop (Mountain View Docker Meetup 2/24/2016)
 
Docker Networking & Swarm Mode Introduction
Docker Networking & Swarm Mode IntroductionDocker Networking & Swarm Mode Introduction
Docker Networking & Swarm Mode Introduction
 
Docker 1.12 and swarm mode
Docker 1.12 and swarm modeDocker 1.12 and swarm mode
Docker 1.12 and swarm mode
 
Docker Online Meetup #28: Production-Ready Docker Swarm
Docker Online Meetup #28: Production-Ready Docker SwarmDocker Online Meetup #28: Production-Ready Docker Swarm
Docker Online Meetup #28: Production-Ready Docker Swarm
 
Docker Swarm & Machine
Docker Swarm & MachineDocker Swarm & Machine
Docker Swarm & Machine
 
Deep Dive into Docker Swarm Mode
Deep Dive into Docker Swarm ModeDeep Dive into Docker Swarm Mode
Deep Dive into Docker Swarm Mode
 
What's New in Docker 1.12?
What's New in Docker 1.12?What's New in Docker 1.12?
What's New in Docker 1.12?
 
Container Orchestration with Docker Swarm
Container Orchestration with Docker SwarmContainer Orchestration with Docker Swarm
Container Orchestration with Docker Swarm
 
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
 
Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)
Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)
Docker swarm-mike-goelzer-mv-meetup-45min-workshop 02242016 (1)
 
Docker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker SwarmDocker Swarm Is Dead: Long Live Docker Swarm
Docker Swarm Is Dead: Long Live Docker Swarm
 
Consul and docker swarm cluster
Consul and docker swarm clusterConsul and docker swarm cluster
Consul and docker swarm cluster
 
Docker 1.5
Docker 1.5Docker 1.5
Docker 1.5
 

En vedette

OPEX Week Europe 140316
OPEX Week Europe 140316OPEX Week Europe 140316
OPEX Week Europe 140316
Zoe Gammie
 
The missing piece : when Docker networking and services finally unleashes so...
 The missing piece : when Docker networking and services finally unleashes so... The missing piece : when Docker networking and services finally unleashes so...
The missing piece : when Docker networking and services finally unleashes so...
Adrien Blind
 
Elassandra: Elasticsearch as a Cassandra Secondary Index (Rémi Trouville, Vin...
Elassandra: Elasticsearch as a Cassandra Secondary Index (Rémi Trouville, Vin...Elassandra: Elasticsearch as a Cassandra Secondary Index (Rémi Trouville, Vin...
Elassandra: Elasticsearch as a Cassandra Secondary Index (Rémi Trouville, Vin...
DataStax
 
Load Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINX
NGINX, Inc.
 

En vedette (20)

Docker Swarm: Docker Native Clustering
Docker Swarm: Docker Native ClusteringDocker Swarm: Docker Native Clustering
Docker Swarm: Docker Native Clustering
 
Octo talk : docker multi-host networking
Octo talk : docker multi-host networking Octo talk : docker multi-host networking
Octo talk : docker multi-host networking
 
Docker Swarm Overview
Docker Swarm OverviewDocker Swarm Overview
Docker Swarm Overview
 
Dianabol Canada
Dianabol CanadaDianabol Canada
Dianabol Canada
 
Docker in Production - IPC 2016
Docker in Production - IPC 2016Docker in Production - IPC 2016
Docker in Production - IPC 2016
 
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
SenchaCon 2016: Develop, Test & Deploy with Docker - Jonas Schwabe
 
Docker For Azure Deployment Walkthrough
Docker For Azure Deployment WalkthroughDocker For Azure Deployment Walkthrough
Docker For Azure Deployment Walkthrough
 
Docker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12XDocker and Containers for Development and Deployment — SCALE12X
Docker and Containers for Development and Deployment — SCALE12X
 
Monitoring Docker Application in Production
Monitoring Docker Application in ProductionMonitoring Docker Application in Production
Monitoring Docker Application in Production
 
Deploying and Scaling a Rails Application with Docker and Friends
Deploying and Scaling a Rails Application with Docker and FriendsDeploying and Scaling a Rails Application with Docker and Friends
Deploying and Scaling a Rails Application with Docker and Friends
 
Continuous Deployment with Bamboo and Deployit
Continuous Deployment with Bamboo and DeployitContinuous Deployment with Bamboo and Deployit
Continuous Deployment with Bamboo and Deployit
 
Azure Functions VS AWS Lambda: overview and comparison
Azure Functions VS AWS Lambda: overview and comparisonAzure Functions VS AWS Lambda: overview and comparison
Azure Functions VS AWS Lambda: overview and comparison
 
Ideal Deployment In .NET World
Ideal Deployment In .NET WorldIdeal Deployment In .NET World
Ideal Deployment In .NET World
 
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaSAWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
 
OPEX Week Europe 140316
OPEX Week Europe 140316OPEX Week Europe 140316
OPEX Week Europe 140316
 
Docker Datacenter - CaaS
Docker Datacenter - CaaSDocker Datacenter - CaaS
Docker Datacenter - CaaS
 
The missing piece : when Docker networking and services finally unleashes so...
 The missing piece : when Docker networking and services finally unleashes so... The missing piece : when Docker networking and services finally unleashes so...
The missing piece : when Docker networking and services finally unleashes so...
 
Docker networking Tutorial 101
Docker networking Tutorial 101Docker networking Tutorial 101
Docker networking Tutorial 101
 
Elassandra: Elasticsearch as a Cassandra Secondary Index (Rémi Trouville, Vin...
Elassandra: Elasticsearch as a Cassandra Secondary Index (Rémi Trouville, Vin...Elassandra: Elasticsearch as a Cassandra Secondary Index (Rémi Trouville, Vin...
Elassandra: Elasticsearch as a Cassandra Secondary Index (Rémi Trouville, Vin...
 
Load Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINXLoad Balancing Apps in Docker Swarm with NGINX
Load Balancing Apps in Docker Swarm with NGINX
 

Similaire à The age of orchestration: from Docker basics to cluster management

14309525_docker_docker_docker_docker_introduction.ppt
14309525_docker_docker_docker_docker_introduction.ppt14309525_docker_docker_docker_docker_introduction.ppt
14309525_docker_docker_docker_docker_introduction.ppt
aravym456
 

Similaire à The age of orchestration: from Docker basics to cluster management (20)

Paolucci voxxed-days-berlin-2016-age-of-orchestration
Paolucci voxxed-days-berlin-2016-age-of-orchestrationPaolucci voxxed-days-berlin-2016-age-of-orchestration
Paolucci voxxed-days-berlin-2016-age-of-orchestration
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 Presentation
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班
 
廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班廣宣學堂: 容器進階實務 - Docker進深研究班
廣宣學堂: 容器進階實務 - Docker進深研究班
 
Docker HK Meetup - 201707
Docker HK Meetup - 201707Docker HK Meetup - 201707
Docker HK Meetup - 201707
 
14309525_docker_docker_docker_docker_introduction.ppt
14309525_docker_docker_docker_docker_introduction.ppt14309525_docker_docker_docker_docker_introduction.ppt
14309525_docker_docker_docker_docker_introduction.ppt
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
 
Docker Intro
Docker IntroDocker Intro
Docker Intro
 
The Docker Ecosystem
The Docker EcosystemThe Docker Ecosystem
The Docker Ecosystem
 
Docker and Microservice
Docker and MicroserviceDocker and Microservice
Docker and Microservice
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
Consuming Cinder from Docker
Consuming Cinder from DockerConsuming Cinder from Docker
Consuming Cinder from Docker
 
Docker
DockerDocker
Docker
 
Orchestrating Docker with OpenStack
Orchestrating Docker with OpenStackOrchestrating Docker with OpenStack
Orchestrating Docker with OpenStack
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
What is this "docker"
What is this  "docker" What is this  "docker"
What is this "docker"
 
Getting started with Docker sandboxes for MariaDB
Getting started with Docker sandboxes for MariaDBGetting started with Docker sandboxes for MariaDB
Getting started with Docker sandboxes for MariaDB
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
 

Plus de Nicola Paolucci

Git Power Routines
Git Power RoutinesGit Power Routines
Git Power Routines
Nicola Paolucci
 

Plus de Nicola Paolucci (7)

Transformative Git Practices
Transformative Git PracticesTransformative Git Practices
Transformative Git Practices
 
Git Power Routines
Git Power RoutinesGit Power Routines
Git Power Routines
 
Becoming a Git Master
Becoming a Git MasterBecoming a Git Master
Becoming a Git Master
 
Be a better developer with Docker (revision 3)
Be a better developer with Docker (revision 3)Be a better developer with Docker (revision 3)
Be a better developer with Docker (revision 3)
 
Be a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeBe a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the trade
 
Ninja Git: Save Your Master
Ninja Git: Save Your MasterNinja Git: Save Your Master
Ninja Git: Save Your Master
 
Real World Git Workflows - EclipseCon Europe 2013
Real World Git Workflows - EclipseCon Europe 2013Real World Git Workflows - EclipseCon Europe 2013
Real World Git Workflows - EclipseCon Europe 2013
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

The age of orchestration: from Docker basics to cluster management

  • 1. The age of orchestration NICOLA PAOLUCCI • DEVELOPER INSTIGATOR • ATLASSIAN • @DURDN From Docker basics to cluster management
  • 2. 2 Time me and ring a bell if I am over it. Just kidding I’ll be over by a bit but it’s ok. We’re friends. Three minute Docker intro?
  • 3. 3 BINS/LIBS GUEST OS HYPERVISOR HOST OS SERVER ROBUST MONOLITHIC SLOW TO BOOT HEAVY OVERHEAD APP A BINS/LIBS GUEST OS APP B DEFINITIONS Traditional Virtual Machines
  • 5. 5 DEFINITIONS Seen from another angle, the core of Docker is four distinct things Clearly defined interfaces Central registry of ready images Caching mechanism to re-use steps A standard format to package applications
  • 6. 6 DO WE USE IT? We have embraced Docker on two fronts For our internal PaaS In our products NOT PART OF THIS SESSION
  • 18. 17
  • 19. 18 Docker’s Own Orchestration Tools Docker machine Docker compose Docker swarm Docker network
  • 20. Where is the DEMO Lebowski?
  • 21. 20 TOOL NR.1 Docker machine Simple command line tool to provision local and remote hosts with Docker installed. Fantastic to get up and running fast. It has drivers for many Internet service providers and PaaS. Docker machine $ docker-machine create -d v INFO[0000] Downloading boot2 INFO[0001] Creating SSH key. INFO[0001] Creating VirtualB INFO[0006] Starting VirtualB INFO[0007] Waiting for VM to INFO[0041] "dev" has been cr
  • 22. • Provision a machine with Docker installed and ready • Pull a minimal image • Run a few docker commands • Tear down the machine Docker machine DEMO $ docker-machine create -d virtualb INFO[0000] Downloading boot2docker. INFO[0001] Creating SSH key... INFO[0001] Creating VirtualBox VM.. INFO[0006] Starting VirtualBox VM.. INFO[0007] Waiting for VM to start. INFO[0041] "dev" has been created a
  • 23. • “docker-machine create” to provision the host, locally or remotely • “docker-machine ls” to list the machines • “docker-machine stop/rm” to stop and remove Recap of what you saw $ docker-machine create -d INFO[0000] Downloading boo INFO[0001] Creating SSH ke INFO[0001] Creating Virtua INFO[0006] Starting Virtua INFO[0007] Waiting for VM INFO[0041] "dev" has been
  • 24. 24 TOOL NR.2 Docker compose Docker compose Describe the relation of your components in a simple YAML file called docker-compose.yml and docker-compose takes care of starting them and linking them in order. 1 stash: 2 image: atlassian/stash 3 ports: 4 - "7990:7990" 5 - "7999:7999" 6 volumes: 7 - /root/orchestration/stash-data:/ 8 links: 9 - db 10 user: root 11 privileged: true 12 db: 13 image: postgres 14 environment: 15 POSTGRES_PASSWORD: somepassword
  • 25. • Provision a machine on a PaaS • Pull PostgreSQL and a Java app from the Registry • Use Compose to start the app • Tear down the machine Docker compose DEMO $ docker-compose up -d
  • 26. • “docker-machine create” to provision the host • Edit “docker-compose.yml” to describe our app • “docker-compose up -d” to start our application • “docker-machine rm compose-demo“ to remove it Recap of what you saw $ docker-compose up -d
  • 27. 28 TOOL NR.3 Docker swarm Deploy images and run containers on a full clusters as if you’re handling a single machine Docker swarm $ docker pull swarm $ docker run --rm swarm create 6856663cdefdec325839a4b7e1de38e8
  • 28. @durdn Docker swarm swarm master swarm node swarm node swarm node container container container container container container discovery service High level architecture scheduler
  • 29. • Strategies • Spread • Binpack • Random • Filters • Constraint • Affinity • Port • Dependency • Health Swarm comes with strategies and filters $ docker run -e constraint:instance==database --name db
  • 30. • Provision a Docker swarm • Made up of three hosts • Master node • Node with 2gb of RAM • simple Node • Use labels to deploy to nodes • Run Java app and PostgreSQL on different nodes The plan for the Swarm DEMO $ docker pull swarm $ docker run --rm swarm create 6856663cdefdec325839a4b7e1de38e8
  • 31. @durdn After Step 1 demo-master node-1 node-2 label: java discovery service Current Architecture scheduler RAM: 2GB label: database RAM: 512MB
  • 32. @durdn After Step 2 demo-master node-1 node-2 label: java discovery service Current Architecture scheduler RAM: 2GB label: database RAM: 512MB PostgreSQL
  • 33. @durdn After Step 3 demo-master node-1 node-2 label: java discovery service Current Architecture scheduler RAM: 2GB label: database RAM: 512MB PostgreSQLJava App
  • 34. • We created a 3-node cluster with “docker-machine” • We tagged the nodes with labels • We started our components using label constraints and not machine names Recap of Swarm DEMO $ docker pull swarm $ docker run --rm swarm create 6856663cdefdec325839a4b7e1de38e8
  • 35. 39 COROLLARY Docker Java Images Are Big The default Java image is 800+MB ?! $ docker pull java REPOSITORY IMAGE ID VIRTUAL SIZE java 5282faca75e8 817.6 MB
  • 36. • Alpine Linux provides a minimal container image of 5MB • It includes BusyBox and a package manager • OpenJDK 7 is already on it… • Resulting in a 123MB Java image Start with a smaller base image FROM alpine:3.2 RUN apk --update add openjdk7-jre CMD ["/usr/bin/java", "-version"]
  • 37. For Oracle Java 8 you have to roll it your own http://bit.do/minimal-java
  • 38. I hope you are hyped as I am for all this coolness, come talk to me afterwards!
  • 39. Thank you! NICOLA PAOLUCCI • DEVELOPER INSTIGATOR • ATLASSIAN • @DURDN Twitter: @durdn