SlideShare a Scribd company logo
Flocker on CoreOS
Hi  my  name  is  Stephen  
I’m  a  developer  evangelist    
at  ClusterHQ  
I  was  previously  at  Iron.io  
advoca<ng  stateless  workloads  
Stateful Containers: Flocker on CoreOS
docker  docs…  
• Volumes  are  ini.alized  when  a  container  is  created.  If  
the  container’s  base  image  contains  data  at  the  
specified  mount  point,  that  exis.ng  data  is  copied  into  
the  new  volume  upon  volume  ini.aliza.on.  
• Volumes  can  be  shared  and  reused  among  containers.  
• Changes  to  a  volume  are  made  directly.  
• Changes  to  a  volume  will  not  be  included  when  you  
update  an  image.  
• Volumes  persist  even  if  the  container  itself  is  deleted.
External  Volumes
docker run -v /data ubuntu
docker run -v /data2 ubuntu
host
/DATA /DATA2
Volumes  inside  a  
container
docker rm <container_1>
host
/DATA /DATA2
Volumes  inside  a  
container
Mount  a  host  directory  as  a  data  volume
docker run -v $HOME:/data ubuntu
host
$HOME/data
Mount  a  host  directory  as  a  data  volume
host
docker rm <container_id>
$HOME/data
Mount  a  host  directory  as  a  data  volume
$HOME/data
host
docker run -v $HOME:/data ubuntu
Mount  a  host  directory  as  a  data  volume
/data
docker run -v /data ubuntu
coreos-­‐host-­‐node—1 coreos-­‐host-­‐node—2
That  container  is  not  guaranteed  to  
be  scheduled  to  that  host
/data
coreos-­‐host-­‐node—1
/data
My data is still here! fresh host volume :(
coreos-­‐host-­‐node—2
docker run -v /data ubuntudocker run rm <container_id>
That  container  is  not  guaranteed  to  
be  scheduled  to  that  host
/host/logs/container/logs
coreos-­‐host-­‐node—1
/host/logs/container/logs
My data is still here! fresh host volume :(
coreos-­‐host-­‐node—2
copy  host    
volume?
• Keep  track  of  Host  Volumes?  
• What  if  the  volume  is  extremely  large?  
• BitTorrent    Sync?  
• Use  NFS?  GlusterFS?  OtherDistributedFileSystemFS  
Problems  to  address
Distributed  Synchronized  Filesystems
coreos-­‐host-­‐node—N…
/data /data /data /data /data
from  what  I  have  read  so  far  
• Network  uniformity  
• CPU  intensive  
• Maintenance  
Redundant  Cloud  Storage!
coreos-­‐host-­‐node—1
/data
coreos-­‐host-­‐node—2
Redundant  Cloud  Storage!
coreos-­‐host-­‐node—1
/data
coreos-­‐host-­‐node—2
Limita<on  of  ~40  EBS  volumes  to  a  Linux  Host  
before  Boot  Failures  become  a  thing
coreos-­‐host-­‐node—1
• MounKng  correct  ebs  volumes  to  the  correct  
containers/host  machine  
• Provisioning  EBS  volumes  happens  manually  not  
dynamically  
• you  need  to  interact  with  the  the  AWS  EBS  API  or  
Console
Problems  to  address
Enter  Flocker
coreos-­‐host-­‐node—1
ectd docker flocker
Redundant  Cloud  Storage!
demo:/data
redis:latest
docker run -d -v demo:/data --volume-driver=flocker --name=redis redis:latest
CREATE
Redundant  Cloud  Storage!
coreos-­‐host-­‐node—1
demo:/data
redis:latest
ectd docker
docker run -d -e USE_REDIS_HOST=redis --link redis:redis -p 80:80 
--name=app stephenitis/bird-counter:latest
flocker
bird-­‐counter
coreos-­‐host-­‐node-­‐1
Redundant  Cloud  Storage!
coreos-­‐host-­‐node—1
demo:/data
redis:latest
ectd docker flocker
bird-­‐counter
coreos-­‐host-­‐node—2
redis:latest
ectd docker flocker
docker run -d -e USE_REDIS_HOST=redis --link redis:redis -p 80:80 
--name=app stephenitis/bird-counter:latest
remount volume
moby-­‐counter
coreos-­‐host-­‐node-­‐2
demo?
coreos-­‐host-­‐node—1
ectd docker flocker
Flocker  Create  and  Mount  a  Volume
demo:/data
redis:latest
docker run -d -v demo:/data --volume-driver=flocker --name=redis redis:latest
CREATE
coreos-­‐host-­‐node—1
demo:/data
redis:latest
ectd docker
docker run -d -e USE_REDIS_HOST=redis --link redis:redis -p
80:80 --name=app stephenitis/bird-counter:latest
flocker
bird-­‐counter
coreos-­‐host-­‐node-­‐1
Flocker  Magic
coreos-­‐host-­‐node—1
demo:/data
redis:latest
ectd docker
$ docker run -d -v demo:/data --volume-driver=flocker --name=redis
redis:latest
$ docker run -d -e USE_REDIS_HOST=redis --link redis:redis -p
80:80 --name=app stephenitis/bird-counter
flocker
bird-­‐counter
coreos-­‐host-­‐node—2
redis:latest
ectd docker flocker
bird-­‐counter
coreos-­‐host-­‐node-­‐2
how  it  works
Magic.
• All  Flocker  services  to  be  Containerized  
• run  our  containers  in  “privileged”  mode  
• When  the  operator  executes  docker  run  -­‐-­‐privileged  
• We  need  to  to  communicate  the  state  of    mounted  
volumes  to  the  host  system  back  to  our  containerized  
flocker  service  
Problems  to  address  to  get  this  
to  work  on  CoreOS
coreos-­‐host-­‐master-­‐node
docker flocker-­‐docker-­‐plugin
flocker-­‐container-­‐agent
flocker-­‐dataset-­‐agent
flocker-­‐control-­‐service
docker run -d -v demo:/data --volume-driver=flocker --name=redis redis:latest
redis
Installing the tools across all cores nodes was
brainlessly easy with our uft-flocker tool
$ uft-flocker-install cluster.yml
$ uft-flocker-config cluster.yml
$ uft-flocker-plugin-install cluster.yml
$ # boom shaka laka
Making  installa<on  of  all  the    
pieces  easier
wrapping flocker in nsenter
wrap commands that interact with host with nsenter `mount`,
`umount`, `lsblk`, `losetup`
https://github.com/jpetazzo/nsenter
nsenter
it can enter existing namespaces, or
spawn a process into a new set of
namespaces.
https://github.com/jpetazzo/nsenter
syncing /etc/mtab for `psutil`
/etc/mtab
psutil
Installing the tools across all cores nodes was
brainlessly easy with our uft-flocker tools
/etc/mtab
psutil
/bin/nsenter --mount=/host/proc/1/ns/mnt -- cat /etc/
mtab > /etc/mtab.tmp
- mv /etc/mtab.tmp /etc/mtab
ClusterHQ
etc etc..
Thanks  to
ClusterHQ  team  
Madhuri  Yechuri  /  Luke  Marsden  /Kai  Davenport  
CoreOS  (for  teaching  us  how  our  services  would  
work  in  a  dockerized  format)  
Giant  Swarm  (for  pushing  us  forward)  
Jérôme  Petazzoni  (nsenter  _w)
demo  instruc.ons  at  
goo.gl/Wymh74
Q’s
@stepheniKs  
stephen@clusterhq.com  
San  Francisco  |  Bristol  |  Remote  
Hiring  like  
ClusterHQ.com/careers/

More Related Content

PPTX
OpenZFS data-driven performance
ahl0003
 
ODP
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Jan Kalcic
 
PPT
Develop with linux containers and docker
Fabio Fumarola
 
PPT
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Sematext Group, Inc.
 
PDF
Shipping python project by docker
Wei-Ting Kuo
 
PDF
Redis persistence in practice
Eugene Fidelin
 
PPTX
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Sematext Group, Inc.
 
PPTX
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Patrick McGarry
 
OpenZFS data-driven performance
ahl0003
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Jan Kalcic
 
Develop with linux containers and docker
Fabio Fumarola
 
Running High Performance and Fault Tolerant Elasticsearch Clusters on Docker
Sematext Group, Inc.
 
Shipping python project by docker
Wei-Ting Kuo
 
Redis persistence in practice
Eugene Fidelin
 
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Sematext Group, Inc.
 
Journey to Stability: Petabyte Ceph Cluster in OpenStack Cloud
Patrick McGarry
 

What's hot (19)

PDF
OSv at Cassandra Summit
Don Marti
 
PPTX
HBaseConEast2016: HBase on Docker with Clusterdock
Michael Stack
 
PDF
Introduction to Docker & CoreOS - Symfony User Group Cologne
D
 
PDF
Docker.io
Ladislav Prskavec
 
PDF
Scaling Servers and Storage for Film Assets
Perforce
 
PDF
Docker volume-isolator-in-mesos
Guangya Liu
 
PDF
Solr on Docker - the Good, the Bad and the Ugly
Sematext Group, Inc.
 
PDF
Monitoring and Log Management for
Sematext Group, Inc.
 
PDF
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Rongze Zhu
 
PDF
CoreOS @Codetalks Hamburg
Timo Derstappen
 
PDF
Move Over, Rsync
All Things Open
 
PDF
Dockerを利用したローカル環境から本番環境までの構築設計
Koichi Nagaoka
 
PDF
GlusterFS As an Object Storage
Keisuke Takahashi
 
PDF
Elasticsearch for Logs & Metrics - a deep dive
Sematext Group, Inc.
 
PDF
Cobbler, Func and Puppet: Tools for Large Scale Environments
ViSenze - Artificial Intelligence for the Visual Web
 
PPTX
Getting Started with Docker
Geeta Vinnakota
 
PDF
CephFS in Jewel: Stable at Last
Ceph Community
 
PPTX
Ceph Day Chicago - Ceph Deployment at Target: Best Practices and Lessons Learned
Ceph Community
 
PPT
Fake IT, until you make IT
Bas Meijer
 
OSv at Cassandra Summit
Don Marti
 
HBaseConEast2016: HBase on Docker with Clusterdock
Michael Stack
 
Introduction to Docker & CoreOS - Symfony User Group Cologne
D
 
Scaling Servers and Storage for Film Assets
Perforce
 
Docker volume-isolator-in-mesos
Guangya Liu
 
Solr on Docker - the Good, the Bad and the Ugly
Sematext Group, Inc.
 
Monitoring and Log Management for
Sematext Group, Inc.
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Rongze Zhu
 
CoreOS @Codetalks Hamburg
Timo Derstappen
 
Move Over, Rsync
All Things Open
 
Dockerを利用したローカル環境から本番環境までの構築設計
Koichi Nagaoka
 
GlusterFS As an Object Storage
Keisuke Takahashi
 
Elasticsearch for Logs & Metrics - a deep dive
Sematext Group, Inc.
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
ViSenze - Artificial Intelligence for the Visual Web
 
Getting Started with Docker
Geeta Vinnakota
 
CephFS in Jewel: Stable at Last
Ceph Community
 
Ceph Day Chicago - Ceph Deployment at Target: Best Practices and Lessons Learned
Ceph Community
 
Fake IT, until you make IT
Bas Meijer
 
Ad

Viewers also liked (8)

PPTX
Globalizing the CCSS - Amy
KathyGShort
 
PDF
บทที่ 3 มุมมองทางจิตวิทยาการเรียนรู้กับเทคโนโลยี
Pennapa Kumpang
 
PPTX
Globalizing the common core standards in the
KathyGShort
 
PDF
Action controller
Stephen Nguyen
 
PDF
Mobile wireless connected Information clouds and learning
Pennapa Kumpang
 
PPTX
Building your global library
KathyGShort
 
PPT
Chapter1_Technologies
Pennapa Kumpang
 
PPT
Worlds of Words
KathyGShort
 
Globalizing the CCSS - Amy
KathyGShort
 
บทที่ 3 มุมมองทางจิตวิทยาการเรียนรู้กับเทคโนโลยี
Pennapa Kumpang
 
Globalizing the common core standards in the
KathyGShort
 
Action controller
Stephen Nguyen
 
Mobile wireless connected Information clouds and learning
Pennapa Kumpang
 
Building your global library
KathyGShort
 
Chapter1_Technologies
Pennapa Kumpang
 
Worlds of Words
KathyGShort
 
Ad

Similar to Stateful Containers: Flocker on CoreOS (20)

PPTX
Data Focused Docker Clustering. Docker Hamburg
msh100
 
PDF
Docker Tips And Tricks at the Docker Beijing Meetup
Jérôme Petazzoni
 
PPTX
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
Docker, Inc.
 
PDF
Docking postgres
rycamor
 
PDF
Using Docker with OpenStack - Hands On!
Adrian Otto
 
PPTX
Data focused docker clustering
Luke Marsden
 
PDF
CoreOS automated MySQL Cluster Failover using Galera Cluster
Yazz Atlas
 
PPTX
Big Data in Container; Hadoop Spark in Docker and Mesos
Heiko Loewe
 
PDF
Docker and coreos20141020b
Richard Kuo
 
PDF
Docker Insight
Tiago Pires
 
PDF
A Gentle Introduction to Docker and Containers
Docker, Inc.
 
PDF
Introduction to Docker (as presented at December 2013 Global Hackathon)
Jérôme Petazzoni
 
PDF
Real-World Docker: 10 Things We've Learned
RightScale
 
PDF
Everything You Need to Know About Docker and Storage by Ryan Wallner, ClusterHQ
Docker, Inc.
 
PDF
Nebulaworks Docker Overview 09-22-2015
Chris Ciborowski
 
PPTX
Flocker
Venkata Naga Ravi
 
PDF
Introduction to Docker storage, volume and image
ejlp12
 
PDF
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
PDF
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Jérôme Petazzoni
 
PDF
Learning from ZFS to Scale Storage on and under Containers
inside-BigData.com
 
Data Focused Docker Clustering. Docker Hamburg
msh100
 
Docker Tips And Tricks at the Docker Beijing Meetup
Jérôme Petazzoni
 
DockerCon EU 2015: Persistent, stateful services with docker cluster, namespa...
Docker, Inc.
 
Docking postgres
rycamor
 
Using Docker with OpenStack - Hands On!
Adrian Otto
 
Data focused docker clustering
Luke Marsden
 
CoreOS automated MySQL Cluster Failover using Galera Cluster
Yazz Atlas
 
Big Data in Container; Hadoop Spark in Docker and Mesos
Heiko Loewe
 
Docker and coreos20141020b
Richard Kuo
 
Docker Insight
Tiago Pires
 
A Gentle Introduction to Docker and Containers
Docker, Inc.
 
Introduction to Docker (as presented at December 2013 Global Hackathon)
Jérôme Petazzoni
 
Real-World Docker: 10 Things We've Learned
RightScale
 
Everything You Need to Know About Docker and Storage by Ryan Wallner, ClusterHQ
Docker, Inc.
 
Nebulaworks Docker Overview 09-22-2015
Chris Ciborowski
 
Introduction to Docker storage, volume and image
ejlp12
 
Docker Introduction + what is new in 0.9
Jérôme Petazzoni
 
Docker Introduction, and what's new in 0.9 — Docker Palo Alto at RelateIQ
Jérôme Petazzoni
 
Learning from ZFS to Scale Storage on and under Containers
inside-BigData.com
 

Recently uploaded (20)

PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Doc9.....................................
SofiaCollazos
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 

Stateful Containers: Flocker on CoreOS