Giter Club home page Giter Club logo

glusterfs-volume's Introduction

glusterfs-volume

This is a docker volume plugin that provisions docker volumes on glusterfs.

This plugin does not expose glusterfs volumes to docker, instead plugin instances are confugured with a single glusterfs volume, and docker volumes are allocated as sub folders.

Quick Start

To build the plugin just run make build and then docker plugin ls to verify the plugin is available.

Once the plugin is created this way, it can be connected to glusterfs storage :

docker plugin set glusterfs-volume GFS_VOLUME=gv0 GFS_SERVERS=server1,server2,server3
docker plugin enable glusterfs-volume

A better way is to create an instance of the plugin for each unique gluster volume it must manage. For this to work the plugin must be published in a registry.

docker plugin install --alias cloud1 registry.example.com/glusterfs-volume GFS_VOLUME=cloud1 GFS_SERVERS=server1,server2,server3

This plugin expects the root gluster volume to be pre-created.

Publish to a remote repository

docker-compose builder operations are passed an explicit --context default flag so that, if you wish, you can set a remote docker agent as the build target to deploy directly to a swarm server (as an example)

make build push plugin=registry.example.com/gluster-volume

References

Debugging

Plugin Logs

Macos: ~/Library/Containers/com.docker.docker/Data/log/vm/dockerd.log RHEL: journalctl -xfu docker.service

Attach to plugins

runc --root /var/run/docker/plugins/runtime-root/plugins.moby/ list
runc --root /var/run/docker/plugins/runtime-root/plugins.moby/ exec -t 5693b036ce049834b29fa7f00547dc6f89e626c5814987cb805f905dba5d5358 /bin/sh

Notes on local vs global

scope=local

In local mode, Docker stricktly keeps its own record of each volume created and counts this volume as a usage of the plugin.

  • docker plugin rm --force will leave these entries behind, and prevent the docker daemon from starting up cleanly.

As such, a local mode plugin, should only display volumes that have been mounted on the current node. And it should track these to maintain parity with docker as - for display purposes - the plugins list is used. So the user has no way to delete "lost" volumes that count against a volumes usage and prevent it being cleanly removed.

scope local plugins, when used with cloud storage, should treat volume creation as an "Attach-to-existing" verb, and removal as a "detatch" verb, as deleting volumes is the only way to remove them from the local metabase.

There is no particular way to instruct docekr to actually delete unwanted remote storage.

scope=global

scope global plugins can be added and removed at will. docker does not track volumes on each node. this is presumably up to the driver itself, and docker will also NOT prevent a docker volume rm reaching the driver for a volume being used on another node.

glusterfs-volume's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.