https://github.com/sapk/docker-volume-gluster
Use GlusterFS as a backend for docker volume (also as a plugin)
https://github.com/sapk/docker-volume-gluster
docker docker-plugin docker-volume-plugin docker-volumes glusterfs
Last synced: about 1 month ago
JSON representation
Use GlusterFS as a backend for docker volume (also as a plugin)
- Host: GitHub
- URL: https://github.com/sapk/docker-volume-gluster
- Owner: sapk
- License: mit
- Created: 2017-05-12T21:56:09.000Z (almost 9 years ago)
- Default Branch: old
- Last Pushed: 2019-06-18T23:43:04.000Z (over 6 years ago)
- Last Synced: 2024-06-20T02:08:37.504Z (over 1 year ago)
- Topics: docker, docker-plugin, docker-volume-plugin, docker-volumes, glusterfs
- Language: Go
- Homepage:
- Size: 1.91 MB
- Stars: 94
- Watchers: 7
- Forks: 22
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Support: support/docker/Dockerfile
Awesome Lists containing this project
README
# docker-volume-gluster [](https://github.com/sapk/docker-volume-gluster/blob/master/LICENSE) 
[](https://github.com/sapk/docker-volume-gluster/releases) [](https://goreportcard.com/report/github.com/sapk/docker-volume-gluster)
[](https://codecov.io/gh/sapk/docker-volume-gluster)
master : [](https://travis-ci.org/sapk/docker-volume-gluster) develop : [](https://travis-ci.org/sapk/docker-volume-gluster)
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.
## Docker plugin (New & Easy method) [](https://hub.docker.com/r/sapk/plugin-gluster) [](https://hub.docker.com/r/sapk/plugin-gluster)
```
docker plugin install sapk/plugin-gluster
docker volume create --driver sapk/plugin-gluster --opt voluri=":" --name test
docker run -v test:/mnt --rm -ti ubuntu
```
## Create and Mount volume
```
docker volume create --driver sapk/plugin-gluster --opt voluri=",,:" --name test
docker run -v test:/mnt --rm -ti ubuntu
```
## Docker-compose
```
volumes:
some_vol:
driver: sapk/plugin-gluster
driver_opts:
voluri: ":"
```
## Additionnal docker-plugin config
```
docker plugin disable sapk/plugin-gluster
docker plugin set sapk/plugin-gluster DEBUG=1 #Activate --verbose
docker plugin set sapk/plugin-gluster MOUNT_UNIQ=1 #Activate --mount-uniq
docker plugin enable sapk/plugin-gluster
```
## Legacy plugin installation
For Docker version 1.12 or below, the managed plugin system is not supported. This also happens if the plugin is not installed via
`docker plugin install`.
[Docker's new plugin system](https://docs.docker.com/engine/extend/) is the preferred way to add drivers and plugins, where the plugin is just
an image downloaded from registry containing the executable and needed configuration files. You can run both legacy and new plugins
in Docker versions above 1.12, but be aware that legacy plugins will not show up on `docker plugin ls`. They will be listed instead under `plugins` on `docker info`.
That way, the driver's name will be just `gluster` (in both the CLI and Compose environments):
#### 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:
-h, --help help for daemon
--mount-uniq Set mountpoint based on definition and not the name of volume
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=":" --name test
docker run -v test:/mnt --rm -ti ubuntu
```
## Performances :
As tested [here](https://github.com/sapk/docker-volume-gluster/issues/10#issuecomment-350126471), this plugin provide same performances as a gluster volume mounted on host via docker bind mount.
## Inspired from :
- https://github.com/ContainX/docker-volume-netshare/
- https://github.com/vieux/docker-volume-sshfs/
- https://github.com/sapk/docker-volume-gvfs
- https://github.com/calavera/docker-volume-glusterfs
- https://github.com/codedellemc/rexray