Convenience argument for automatically mounting multiple volumes?

9 views
Skip to first unread message

rkt...@eldondev.com

unread,
Dec 6, 2017, 1:48:15 PM12/6/17
to rkt...@googlegroups.com
Hi!
I am interested in using rkt as effectively a standalone tool for
running some personal infrastructure, Some of the containers I am
running have numerous data volumes that they want to mount, and it would
be preferable not to have to enumerate each one as a host mount. Is
there a way or would it be interesting to do something like the
following:

Have a convenience argument to mount the volumes descriped in an aci
whith a single root at a part of the filesystem. So for example, if my
aci wants /var/log, /var/data, /opt/data and /var/lib/data as volumes, I
could just point it at /opt/application, and end up with logs in
/opt/application/var/log, data in /opt/application/var/data , etc.

I haven't dug into the code yet, but I would imagine it could somehow
reside near the place where the "empty" default volume mount is handled.
I am open to maintaining my own patches for it if I get time to
implement, but I would be interested on feedback if, for some reason,
this is super hard or a Very Bad Idea. If it might be interesting to
others, I can also open a GH issue.

Thanks!
Eldon

Derek Gonyeo

unread,
Dec 6, 2017, 2:01:11 PM12/6/17
to rkt...@eldondev.com, rkt-dev
I can't comment on whether or not such changes would be welcome, but something that comes to mind is that you could have a single mount, /opt/application -> /opt/application, and inside the container have /var/data and /var/lib/data be symlinks to /opt/application/var/data and /opt/application/var/lib/data. If your applications follow symlinks correctly, I imagine this would result in the same behavior with only one mount.


--
You received this message because you are subscribed to the Google Groups "rkt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rkt-dev+unsubscribe@googlegroups.com.
To post to this group, send email to rkt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rkt-dev/20171206184813.GN10881%40npcomp.net.
For more options, visit https://groups.google.com/d/optout.

rkt...@eldondev.com

unread,
Dec 7, 2017, 12:41:31 AM12/7/17
to rkt-dev
My primary purpose in this scenario (and often when deploying container
architectures) isn't necessarily to use containers or applications of
which I specifically control the application development or packaging.
As such I have little control over whether the applications follow
symlinks properly or not. In fact I would likely have to repackage the
application to create the proper symlinks unless I am mistaken. I would
really prefer to leverage existing images directly if possible.

Thanks!
Eldon
Reply all
Reply to author
Forward
0 new messages