Report this

What is the reason for this report?

Does DigitalOcean have a plan to offer shared storage volumes for Docker Swarm Mode in near future?

Posted on October 16, 2017

We have been using DO for all development/testing activities. We have successfully deployed a scalable staging environment using Docker Swarm Mode. The only glitch is that we can not scale the application container across multiple swarm nodes as these instances can not share a persistence storage (volumes) across the nodes. There are many suggestions from unofficial sources to use NFS, Flocker, GlusterFS, etc. But there is no clear direction / guideline from DigitalOcean.

Without an officially supported solution for shared storage from DO, we have to regretfully leave DO and join the AWS band wagon.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

DigitalOcean does not have an official storage plugin for Docker Swarm. In general, I’d recommend using REX-Ray. It can be used with Docker Swarm as well as other schedulers like Kubernetes and Mesos. The initial implementation of the DigitalOcean plugin was done by a DO engineer.

You can handle the initial configuration by running:

  1. docker plugin install rexray/dobs DOBS_REGION=sfo2 DOBS_TOKEN=YOUR_API_TOKEN

Now running docker volume ls will expose any DigitalOcean block storage volumes you may have already created. You can create new ones via:

  1. docker volume create -d rexray/dobs --name do-volume-sfo2 --opt=size=100

Now you can treat that like any other Docker volume. The plugin will handle mounting it locally as needed.

rexray/dobs is a good option, but it seems that you can only have the volume attached to one node at each time (I suppose that is a digitalocean limitation), so this is not useful if you want to have the volume mounted into several nodes at the same time.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.