A volume plugin and volume driver are used interchangeably in Docker and Rancher documentation.
But doesn’t clarify if this is in reference to a Docker vs Rancher Volume Plugin. In my opinion, this clarification is important given the different behavior in Rancher vs Docker in compose files.
It would also be very helpful if you included an example v2 compose file that would match the behavior of what the v1 compose file does (e.g. is it local or external). I may be biased here, but the behavior of v1 compose had a breaking changed in some previous version of Rancher (I moved from 1.14 to 1.6 and hit this – in 1.14 it behaved like external in the old storage setup now its local?).
I’ve been wondering about this too. Glad to hear the documentation is getting updated. Is there any documentation on the per_container setting? I’ve seen that in a rancher catalog entry but cannot find any documentation on it.
I’ve been using Rancher since the beginning but still have no clue where to start when it comes to volume management. What with gluster, convoy, nfs, longhorn… What would be really helpful is some advice on how to select a suitable persistent storage setup as well as better communications on things that are no longer core approaches, such as, presumably, gluster.
I see your point about the confusing terminology. Will try to work better definitions into the docs.
In brief, a Rancher Storage Driver provides docker volumes in Rancher. It is extremely confusing in the updated documentation to only refer to storage drivers in the docker storage context (ie devicemapper vs aufs). We’ll have to change that.
But moving on from that, a Rancher Storage Driver is a stack you install that allows you to create and use Rancher volumes with your containers. At the host level, all of our Rancher Storage Drivers (Rancher EFS, NFS, EBS) are implemented as docker volume plugins. But we see that as an implementation detail. If you have a Rancher Storae Driver installed, you can use them as volume drivers in your compose files as outlined in the above article and expect that the volume will be mounted into your container at the expected path.
In Rancher compose, you can also set a volume’s driver to a docker volume plugin that you’ve installed on your hosts out-of-band from Rancher, but Rancher won’t do any intelligent scheduling of that volumes or containers using it because it doesn’t know how to do so.
@djskinner some guidance on current best practices is a great idea. An entire blog article or video could be devoted to that, but I’ll try to give you the summary briefly:
Our two fully officially supported drivers (meaning if someone pays for support, these are the two that are fully covered) are Rancher NFS and Rancher EBS. They are the most stable.
Rancher EFS is available, but currently “experimental,” meaning that there are likely some undiscovered or unfixed bugs.
Convoy still exists as a project because some use it, but it is not our current focus and we don’t recommend it if you are looking for a storage solution.
Gluster was a backed for convoy and we stopped pushing it because what we found is that manage a gluster cluster takes some amount of expertise on the users/admin’s part beyond what we could provide by simply standing up the stack.
As of last I tested this (I think in 1.5.x) pure docker volume plugins being used as documented in docker-compose v1 documentation didn’t work (as volume assumed local volume + in rancher, but volume didn’t exist in rancher) and didn’t work in v2 without some pretty significant manipulation of things (creating fake service that created a custom rancher storage driver, then shifting all volumes to be external volumes + creating volume template via API was only approach I found to work). I’m not sure if this is expected behavior, if yes, I think its still pretty unclear how its supposed to work in the docs, if this is unexpected, I don’t think I’ve seen bugs for this. Also possible this has been fixed since 1.5.x.