Hi @Hooverdan,
Before I try to answer your questions and share my thoughts, please accept my apologies for not getting back with you earlier than that; I wanted to take the the proper time to answer you correctly but this has turned out to be rather difficult.
Note, also, that I will try to give more general answers (which seemed to be your focus) rather than specifics to watchtower; these may be better suited for a dedicated thread, for instance.
That sounds like an excellent idea, indeed! I didn’t notice it was outdated and switching to using the official docker image seems like a no-brainer in this case.
I think you said it perfectly there as getting the right balance between simplicity and possibilities may be the most “difficult” part of a rock-on. On one hand, you’re tempted to surface as many options as possible to the user during the installation, but then you run the risk of unnecessarily complicating the install for most users with options they won’t use. I’ve personally never found a one-size fits all solution to this, so I’m always trying to ask myself:
- what will benefit all users, and not just a portion of them?
- would the added feature brought by this specific parameter outweigh the “complexity” brought by asking the user to set it up.
Of course, improving the rock-ons framework to make this kind of choice a lot less difficult is an important solution to the problem and this is also part of what I’ve been trying to work on–on this topic, I’m excited to see you found a great use for the ability to set docker labels from the web-UI. There is a lot more left to do and improve, of course, and that includes the three points you listed:
Currently, all environment variables defined in the rock-on json as “environment objects” are required to be filled and the rock-on install wizard will not let the user proceed to the next step if their corresponding field is left blank. This gives a lot of room for improvement, and your idea of setting a default value for each environment variable is a great one, and was already brought up by @magicalyak in the issue linked below:
You’re also bringing an interesting point, however, to give the possibility to set an environment variable as optional. I can image a simple key:value setting in the json under the specific environment object to set an "optional": true/false
flag. If true
, the given environment variable can be left blank during the rock-on install wizard. Feel free to create an issue on the rockstor-core repo if you’d like.
Not yet (see above), but definitively needs to be implemented. I do see one potential drawback from this, however, in that it may open the gates to rock-ons with a myriad of options surfaced to the user during the rock-on install wizard. This would go against the “simplicity” principle of rock-ons and would thus still represent another example of the difficult choices to make between “simplicity” and “possibilities” I mentioned earlier in my message. I’d like to take the opportunity to point to an idea written up by @phillxnet a little while ago regarding creating a very simple “one click / auto-install” button. There are a lot steps before we can get to this, however–and the points you raised are one of them–but this would greatly help with keeping a sane balance.
Currently in Rockstor, a label can be applied only after the rock-on install, as part of the post-install customization. The only way to do so in the json would be to use the "options"
object, but you would of course not be able to let the user choose the value of the label. I actually wondered whether I should do that when I implemented the feature, but given docker labels are typically used as customization to a container and communication between containers that can happen on any container, it made more sense to me to set it as a post-install customization rather than a JSON setting. I also couldn’t really find a scenario in which a container label needed to be set at install for all users, which heavily factored in my decision. I would be happy to be proven wrong, of course, in which case we can implement a JSON approach as well.
As mentioned at the beginning of my post, I purposely tried to remain general rather than more specific to watchtower as I believe the points you raised an important to the rock-ons framework in general. Let us know if you’d like a more watchtower-centric discussion, however, especially if you already have a JSON that is working well for you. I believe watchtower is a rather popular project so discussing this will the community may help decide what are the options needed and used by most. I may be totally wrong here as I’m not a user, but I hope it’ll help.
Thanks again for all your contributions, and I hope I was able to answer your questions.