Reusing Singularity VNC bc_desktop configuration in apps

Hi,

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.

Hi and thanks for posting.

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.

Hi,

Thank - what I am trying to ask if whether the recommended approach is for the VNC configuration can be specified at the cluster level and then reused in applications rather than defining the vnc configuration in every app. I tried adding to the cluster definition as Add Cluster Configuration Files — Open OnDemand 2.0.20 documentation but couldn’t get it to accept some of my configuration that I defined in https://github.com/SupercomputingWales/open-ondemand-apps/blob/main/bc_desktop/submit/container.yml.erb - maybe I can create wrappers for all that code and define the location for some of those scripts I override. I wasn’t sure what was possible in the cluster level VNC configuration.

Thanks for the clarification.

I think some documentation around what you are speaking about would be the submit.yml.erb file: submit.yml.erb — Open OnDemand 2.0.20 documentation

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?

Hi,

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.

Thanks.

I think he’s talking about running this way:

I’m here because I had a similar question – how to avoid having to duplicate that for every app (which honestly isn’t a huge burden, but it would be a nice-to-have).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.