GitXplorerGitXplorer
s

docker-volume-gluster

public
94 stars
22 forks
28 issues

Commits

List of commits on branch old.
Verified
f922f5d1fad1faac4d4ef3919bef97d6bc179518

Create FUNDING.yml

ssapk committed 6 years ago
Verified
a6e99902e489e4cf4e3a699b8b70596cc33a34fc

managed-plugin: use ubuntu base image

ssapk committed 6 years ago
Verified
462d8181fd4034fbf317328022973d16e4ff08e2

Update travis Go version list

ssapk committed 6 years ago
Unverified
bd0db258c616b3134e9fa019ad942e1398416a9a

Add global capabilities (#50)

nnicodmf committed 6 years ago
Verified
5da0d3c990a2dd9a837862d7bf046bf130044439

Publish versionned plugin

ssapk committed 7 years ago
Verified
021120ccc925993ebd425997fe2b0330a8d3842f

Fix corner case blocking removal of previous failure mount (#29)

ssapk committed 7 years ago

README

The README file for this repository.

docker-volume-gluster License Project Status

GitHub release Go Report Card codecov master : Travis master develop : Travis 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.

Docker plugin (New & Easy method) Docker Pulls ImageLayers Size

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

Create and Mount volume

docker volume create --driver sapk/plugin-gluster --opt voluri="<volumeserver>,<otherserver>,<otheroptionalserver>:<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>"

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 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="<volumeserver>:<volumename>" --name test
docker run -v test:/mnt --rm -ti ubuntu

Performances :

As tested here, this plugin provide same performances as a gluster volume mounted on host via docker bind mount.

Inspired from :