I have been using an approach to run the VNC desktop in OpenOndemand inside a Singularity container as suggested in a previous post. This has a lot of configuration inside /etc/ood/config/apps/bc_desktop to specify the commands to run (basically redirects the VNC script to a temporary file and then runs singularity with a container using the temporary file. This works well but I am finding I am duplicating this code in every app I am using, for example to create an app for Matlab I would duplicate the VNC configuration (open-ondemand-apps/container.yml.erb at main · SupercomputingWales/open-ondemand-apps · GitHub) and then create the script to run Matlab. Is there a way of not replicating and reusing the configuration in bc_desktop? This would make things much easier to launch apps. I assume if I didnt use Singularity the vnc template would handle a lot of the logic - its just I override it with Singularity configuration.
Sounds like a non-standard setup from a previous thread but I’m not sure which thread you are referring to.
Since most of the script generation is handled using ERB and the views to pass information to the scripts like you said, you would basically have to harvest what’s happening from those in the standard setup to try and recreate some of that script generation.
I’m not sure this answers the question, but I’m somewhat unsure if I’m understanding what you’re asking.
The key thing which I think you are after here is:
“All of these configuration items can also be applied globally to the entire cluster in the cluster definition files under /etc/ood/config/clusters.d/. If set globally, the option is applied to all applications in that cluster.”
Which sounds like what you are trying to do. Is this on the right path of what you are hoping for?
Okay - that does sound like it should be possible. I tried adding in the configuration options to the cluster definition files but it would fail processing the cluster definition file and not like the shell code being defined within the yaml - maybe I need to be careful with the cluster definition being yaml and the submit script being erb - I will try making scripts to contain a lot of code anyway and refactor a bit.