I just published my first two Docker managed plugins for
glusterfs and generic https://github.com/trajano/docker-volume-plugins.
It’s my first multi-file go project so I am still learning the ropes and just using it as an excuse to learn Go. Perhaps some comments on how I did the coding, because I personally don’t like the way I did the polymorphism for the callback methods.
- The way I wrote the plugin, I can probably tweak it a little to support anything that supports
nfs. However, I am thinking of making this a bit more general aside from having the specifics of
cifsI am thinking of adding something that allows anyone to specify a package to install and the mount point information as settings and let the user decide what to do from there (e.g. use ceph, NFS, sshfs etc) without having to make specific versions.
- I am actually trying to majorly rearchitect this into another cooky idea where instead of using the glusterfs client i would use the server instead. Conceptually the plugin will act as the gluster server, but talk with other plugins to form the cluster and use a device mounted to the node
I actually completed the
cifs plugin now. Loosely based on the ContainerX approach and updated the next steps.
There’s a bug https://github.com/trajano/docker-volume-plugins/issues/2 that appears to indicate that this plugin may not be compatible with 17.09 of Docker.
There’s a bug I found and already fixed in how I mounted the
/root partition for the cifs-volume-plugin which allowed the plugin to write to the
/root partition. The plugin code does not do any writes, but I fixed it so that it hardens it a bit more. I’ll release it as soon as I can get the systemd to work in a plugin
CentOS Managed Volume Plugin added. It supports NFS as a managed plugin.