HeavenVolkoff / docker-volume-glusterfs

This is a managed Docker volume plugin to allow Docker containers to access GlusterFS volumes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker volume plugin for GlusterFS

Disclaimer

This plugin was forked from urbitechsro/docker-volume-glusterfs which, in turn, was forked from mikebarkmin/docker-volume-glusterfs

This is a managed Docker volume plugin to allow Docker containers to access GlusterFS volumes. The GlusterFS client does not need to be installed on the host and everything is managed within the plugin.

Go Report Card

Usage

0 - Build and enable the plugin

$>  ./build.sh

1 - Change the plugin default options (OPTIONAL)

$>  docker plugin set SERVERS=<server1,server2,...,serverN> VOLNAME=<volname> DEBUG=<0|1>

2 - Create a volume

$>  docker volume create -d glusterfs \
        -o servers=<server1,server2,...,serverN> \
        -o volname=<volname> \
        -o subdir=<subdir> \
        glustervolume
glustervolume

$>  docker volume ls
DRIVER           VOLUME NAME
glusterfs:next   glustervolume

or if you set the defaults for the plugin, you can create a volume without any options:

$>  docker volume create -d glusterfs glustervolume
glustervolume

$>  docker volume ls
DRIVER           VOLUME NAME
glusterfs:next   glustervolume

3 - Use the volume

$>  docker run -it -v glustervolume:<path> bash ls <path>

Options

  • servers [required, if no default set]:

    Comma separated list of servers e.g.: 192.168.2.1,192.168.1.1

  • volname [required, if no default set]

    Name of the glusterfs volume e.g.: gv0

    Must be a volume that already exists in the gluster cluster

  • subdir [optional, default: volume name]

    The name of the subdir.

    Will be created, if not found.

For additional options see mount.glusterfs manual.

LICENSE

MIT

About

This is a managed Docker volume plugin to allow Docker containers to access GlusterFS volumes.

License:MIT License


Languages

Language:Go 70.1%Language:Shell 16.9%Language:Dockerfile 13.1%