DockerCon EU 2015: Monitoring and Managing Dynamic Docker Environments
DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ
Transcript of DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ
![Page 1: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/1.jpg)
Everything you need to know about Docker and storage.
Ryan WallnerTechnical Evangelist, ClusterHQ
![Page 2: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/2.jpg)
Key Concepts Stateful vs Stateless Volumes Plugins
Agenda
Volumes & UCP UCP + Volumes External Volumes VolumeHub
Demo Creating Volumes Manage Volumes Workloads
![Page 3: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/3.jpg)
Key ConceptsDocker & Storage
![Page 4: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/4.jpg)
Docker + Storage
![Page 5: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/5.jpg)
"Stateful" Container
• Secrets - public/private keys, password, etc
• Databases - databases, sharded, clustered.
• Logs - to collect support bundles, run analytics for data mining, etc.
• Other - CI repo data, transcoded bits...
Stateful vs. Stateless"Stateless" Container
• Nothing to Disk • Web Front-End • Can stop and start as many
containers as you’d like • Like http is stateless • Container is ephemeral • What has happened or changed will
be lost.
![Page 6: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/6.jpg)
Docker volumes help store state from the application to locations outside the docker image layer. They are logical building blocks for shared storage when combined with plugins.
• Data is local to engine host only. • Bind-mounts also local, bypass
UFS. • Data is inflexible, prone to loss.
Docker Volumes
$ docker run \ --name my-special-container \ -v /container/dir busybox
[{e779eb1/var/lib/docker/volumes/e779eb1/_ data /container/dir local true }]
![Page 7: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/7.jpg)
Enable external storage management such as shared-storage for volumes.
• Data is external to engine host. • Enables HA for data. • Data can move with container on
failure, maintenance etc.
Docker Volume Plugins
![Page 8: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/8.jpg)
Example
$ docker run --name database \ --volume-driver flocker \ -v vol:/data redis database
$ docker inspect -f “{{.Mounts}}” database [{vol /flocker/71887326.. /data flocker rw true rprivate}]
![Page 9: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/9.jpg)
Container Movement
![Page 10: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/10.jpg)
Volumes & UCPDocker & Storage
![Page 11: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/11.jpg)
Volumes in UCP• Create, Delete, Use from UI • Takes advantage of volume
drivers.
• Limited view into volume management
![Page 12: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/12.jpg)
VolumeHub• Clear visibility for volume
management. • Current status of volumes and
their operations. • Searchable name and metadata. • How much storage in use by size
of volumes.
![Page 13: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/13.jpg)
![Page 14: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/14.jpg)
Demo
![Page 15: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/15.jpg)
Demo Intro
$ docker volume create \ -d flocker --name testfailover \ -o size=10G
$ docker run -d --name=redis-server \ --volume-driver=flocker -v testfailover:/data \ -e reschedule:on-node-failure -e constraint:node!=mha-demo2 \ redis redis-server --appendonly yes
![Page 16: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/16.jpg)
Container running in UCP.
![Page 17: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/17.jpg)
Simulate a Failure
![Page 18: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/18.jpg)
Container Re-scheduling
![Page 19: DockerCon 2016 Ecosystem - Everything You Need to Know About Docker and Storage by ClusterHQ](https://reader031.fdocuments.net/reader031/viewer/2022022203/586fdcce1a28ab18428b664d/html5/thumbnails/19.jpg)
Thank you!