Yes volume management may be a bit different than you are used to when using Rancher.
When you run a lot of containers it does not scale well to mount directories to specific host directories which are used in the openHAB Docker readme examples. It then starts to make sense to store data at dedicated storage machines. So that when a container stops due to a server crash/restart/upgrade another one can easily take over using the same data.
There is still the (default) “local” volume driver option that stores the data in volumes on the same machine running the container. You usually have direct access to this data on the host via /var/lib/docker/volumes
.
If you still want to mount specific directories of the host you can ofcourse always fork the catalog and modify the volumes in docker-compose.yml.tpl. Rancher Compose uses the same syntax as Docker Compose but it also supports the Go Template Engine
When you delete the stack Rancher will also delete your volumes! So you should only delete the stack when you are really sure about this (e.g. after creating a backup).
Rancher does support upgrading a stack to a new version. E.g. when openHAB 2.2.0 is released:
- The catalog (hosted at GitHub) is updated
- Users click the refresh button (the circle at the top right in the Catalog screenshot)
- Rancher will show an “Upgrade” button for any stack that can be upgraded
- After clicking “Upgrade” on a stack, Rancher will download the new container and start it with the existing volumes
The only issue with step 4. is that there are still some manual steps involved when upgrading the openHAB containers. E.g. like cleaning /userdata/tmp
and /userdata/cache
and possibly manually migrating /userdata/etc