Separate folder plugins and passenger apps

Hi All,
Is there a way to separate interactive plugin apps and passanger apps into two different folders while still at system level?
For instance one folder named /var/www/ood/apps/sys/passenger containing OOD’s passenger apps and one folder /var/www/ood/apps/sys/plugins for interactive plugins like RStudio and Jupyter Notebook.
Thanks and best regards

We are curious what the motivation behind this request is? Can you share a bit about what functionality or purpose you are trying to achieve?

Our motivation behind this is to move plugin applications to a shared file system while having passenger apps sitting in /var/www/ood/apps/sys/<passenger app>.
Other instances of OOD would be able call the same plugins via the shared file system. Like that we would only need to maintain plugins in one place.
Is there a way to have plugins and passenger apps in separate folders?
Thanks

Currently there is not a prescribed way to do this. However, it may be possible to make a modification in a custom dashboard initializer to do this just for the plugins. I will look into that.

There are two separate issues opened that would enable this ability: https://github.com/OSC/ondemand/issues/201 and https://github.com/OSC/ondemand/issues/231.

Part of the challenge is that however we decide to implement this, there will be drawbacks.

The current convention for Passenger apps is, for a sys app like the Dashboard:

  1. URL: https://ondemand/pun/sys/dashboard
  2. PATH: /var/www/ood/apps/sys/dashboard
  3. CONF: /etc/ood/config/apps/dashboard

For a plugin, the convention is the URL extends off the dashboard since it is that app that currently manages the plugins:

  1. URL: https://ondemand/pun/sys/dashboard/batch_connect/sys/jupyter
  2. PATH: /var/www/ood/apps/sys/jupyter
  3. CONF: /etc/ood/config/apps/jupyter

Let’s take the plugin example. One approach is that we add a PLUGINS_PATH variable that can be modified, which defaults to /var/www/ood/apps/sys and would affect only “sys” apps (we would need a separate solution for “dev” and “usr” apps). More directories could be added to that, or the path simply changed. Lets say we do PLUGINS_PATH=/var/www/ood/apps/sys/plugins as suggested above and /var/www/ood/apps/sys/plugins/jupyter is added. What is the URL and CONF for jupyter?

  • Does the URL remain https://ondemand/pun/sys/dashboard/batch_connect/sys/jupyter? If it does, then it would not be possible to have two different plugin path directories that contain jupyter - only one would be loaded, the other ignored.
  • The other option is we treat the /sys/ in the URL as the directory or directory+sub-directories off of /var/www/ood/apps, so if /var/www/ood/apps/sys/plugins/jupyter is added the URL is https://ondemand/pun/sys/dashboard/batch_connect/sys/plugins/jupyter and perhaps the CONF dir would be /etc/ood/config/apps/plugins/jupyter. The drawback of this approach is that any modification to an app location results in a new URL. It would be nice to do this for the passenger apps to ease development of the core passenger apps which are now in a monorepo. However changing the URLs of the core apps is not desirable.

Perhaps we should address the locations of the passenger apps and the plugins separately. We could just make the search path for plugins a single configurable directory, so where the default is /var/www/ood/apps/sys we could change it to /var/www/ood/apps/sys/plugins, and the URLs would stay the same.

It has always bothered me that the URL convention is not the same across the board though, that /pun/sys/jupyter doesn’t load the jupyter app even if it is a plugin. Though adding a solution for that would introduce the problem of potential conflicts, if for example, a passenger app titled jupyter is deployed and a plugin app titled jupyter is deployed, and there is one URL that could map to both of those…