I’m defining services / networks / volumes in a v3 docker-compose format … volumes are of type “cloudstor:aws”. When the stack is deployed (docker stack deploy -c docker-compose.yml <stack-name>) I expect to see the services mount the cloudstor volumes, no matter what node that service gets deployed to.
The cloudstor volume doesn’t get mounted on the node where the service is deployed (unless that node already has the plugin “loaded” / is the node where the volumes were created)
running docker volume ls on the manager where I created the cloudstor volumes, lists the created volumes.
running docker volume ls on a different manager, only shows local volumes … perhaps this is expected?
Additional Information
I have tried adding the “driver” option in the compose file:-
Hi @eoinverling – unfortunately it seems that to use the --mount in a Compose file is not supported quite yet, although this PR adds support for it and hopefully should land in a release soon.
In the interim, I think you will need to use the suggested CLI method to take advantage of Cloudstor:
@eoinverling As @nathanleclaire pointed out above, creating/mounting a distinct volume (backed by cloudstor) for each task is not possible right now through Compose. However, if all your tasks for the service can share the same volume safely (i.e. they don’t overwrite each other’s data at the same time), you can achieve that today with something along the lines of:
If you now look at the nodes where the tasks for the above service got deployed, you should be able to see volumes named stackname_data_vol when you issue docker volume ls
great, thanks for that … so I can “ping” all the volumes I need, on the nodes I need (based on a constraint for example) … then the volumes will be available.
I know this is early days for this … but just to note that when I remove a volume, it still lists as available on other nodes