Does gluster volume plugin available for docker?
Yes, its available here .
This article talks about how to use this plugin and make use of gluster volume when spawning docker containers.
For the gluster volume plugin to work, we need an experimental build of docker which can be fetched from docker Github. If you dont have the experimental binary of docker running in your system get it from docker Github.
https://github.com/docker/docker/tree/master/experimental have instructions on how to run docker experimental binary.
Once your docker daemon is running from the experimental build, pull gluster volume plugin from github source.
As mentioned in the README file in github, you need to execute ‘docker-volume-glusterfs’ as shown below. That said, here the IP, “10.70.1.100” is my gluster server which export a replica volume called ‘test-vol’. For more details on gluster volume types and configuration please refer http://gluster.readthedocs.org/en/latest/ .
Once its done, we can spawn containers as shown below, where ‘test-vol’ is the gluster volume name and “/b1” is the mount point in spawned container, ‘docker.io/fedora’ is the image name.
‘touch /b1/second” create a file called ‘second’ in “/b1” mount point.
[root@]# ./docker-latest run -it –volume-driver glusterfs –volume test-vol:/b1 docker.io/fedora touch /b1/second
Let us verify whether the file creation worked successfully and the new file (second) is available in the brick path of gluster server node.
From ‘test-vol’ volume details, we can see that “/home/test-brick1” is one leg of replica volume in my setup.
[root@dhcp1-100 test-brick1]# pwd /home/test-brick1 [root@dhcp1-100 test-brick1]# ls second
Awesome !! Isn’t it?
Thanks https://github.com/calavera for the plugin & Thanks neependra for pointers.