docker-volume-gluster
master : develop :
Use GlusterFS as a backend for docker volume
Status : proof of concept (working)
Use GlusterFS cli in the plugin container so it depend on fuse on the host.
Build
make
Start daemon
./docker-volume-gluster daemon
OR in a docker container
docker run -d --device=/dev/fuse:/dev/fuse --cap-add=SYS_ADMIN --cap-add=MKNOD -v /run/docker/plugins:/run/docker/plugins -v /var/lib/docker-volumes/gluster:/var/lib/docker-volumes/gluster:shared sapk/docker-volume-gluster
For more advance params : ./docker-volume-gluster --help OR ./docker-volume-gluster daemon --help
Run listening volume drive deamon to listen for mount request
Usage:
docker-volume-gluster daemon [flags]
Flags:
-o, --fuse-opts string Fuse options to use moint point (default "big_writes,allow_other,auto_cache")
Global Flags:
-b, --basedir string Mounted volume base directory (default "/var/lib/docker-volumes/gluster")
-v, --verbose Turns on verbose logging
Create and Mount volume
docker volume create --driver gluster --opt voluri="<volumeserver>:<volumename>" --name test
docker run -v test:/mnt --rm -ti ubuntu
Docker plugin (New)
docker plugin install sapk/plugin-gluster
docker volume create --driver sapk/plugin-gluster --opt voluri="<volumeserver>:<volumename>" --name test
docker run -v test:/mnt --rm -ti ubuntu
Docker-compose
volumes:
some_vol:
driver: sapk/plugin-gluster
driver_opts:
voluri: "<volumeserver>:<volumename>"
Inspired from :