A variety of simple swarm aware volume plugins that do not depend on CSI support.
7.2K
This is a Docker Volume Plugin that implements a simple approach to providing cluster aware volumes to docker swarm. A common approach to mounting shared volumes to a swarm is to create a NFS share and mount it on all nodes so services can access their data via bind mounts. This plugin follows the same, simplified, approach. It is initialised with a single share that it mounts on startup, and then provides subfolders on that share as volumes to docker nodes.
Assuming you have 1 or more Docker, or Docker Swarm, nodes running on AWS EC2, which are in a VPC and Security Group that can reach an EFS share:
# Install the plugin on each node, passing in the ID of the EFS share
docker plugin install chrisbecke/swarm-volume:efs --alias swarmvol --grant-all-permissions EFS_ID=fs-0123456789abcdef0
# Check the swarmvol driver exists and works
docker volume create test-shared --driver swarmvol
# on a different node
docker volume ls
Assuming you have 1 or more Docker or Docker Swarm nodes, and a GlusterFS cluster with a volume provisioned for storing docker volumes:
docker plugin install chrisbecke/swarm-volume:glusterfs --alias swarmvol GFS_VOLUME=thevolume GFS_SERVERS=server1,server2
# Check the swarmvol driver exists and works
docker volume create test-shared --driver swarmvol
# on a different node
docker volume ls
Assuming you have an nfs share and 1 or more Docker or Docker swarm nodes:
# Install the plugin. NFS_OPTIONS can be excluded which uses defaults appropriate to AWS EFS shares.
docker plugin install chrisbecke/swarm-volume:nfs --alias swarmvol --grant-all-permissions NFS_DEVICE="nfs-server:/" NFS_OPTIONS="rw,nfsvers=4.1,async"
# Check the swarmvol driver exists and works
docker volume create test-shared --driver swarmvol
# on a different node
docker volume ls
Content type
Plugin
Digest
sha256:f21eb5be3…
Size
103.3 MB
Last updated
over 3 years ago
docker plugin install chrisbecke/swarm-volume:efs