# Separate folder plugins and passenger apps

**URL:** https://discourse.openondemand.org/t/separate-folder-plugins-and-passenger-apps/789
**Category:** Get Help
**Tags:** question
**Created:** [March 19, 2020, 4:25pm UTC](https://discourse.openondemand.org/t/separate-folder-plugins-and-passenger-apps/789 "2020-03-19T16:25:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rotaugenlaubfrosch](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/rotaugenlaubfrosch/32/314_2.png) [@rotaugenlaubfrosch](https://discourse.openondemand.org/u/rotaugenlaubfrosch)
#### Post date: [March 19, 2020, 4:25pm UTC](https://discourse.openondemand.org/t/separate-folder-plugins-and-passenger-apps/789/1 "2020-03-19T16:25:37Z")

</div>

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

---

<div class="post-metadata">

### Author: ![alanc](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/alanc/32/2524_2.png) [@alanc](https://discourse.openondemand.org/u/alanc)
#### Post date: [March 26, 2020, 2:31pm UTC](https://discourse.openondemand.org/t/separate-folder-plugins-and-passenger-apps/789/2 "2020-03-26T14:31:51Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![rotaugenlaubfrosch](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/rotaugenlaubfrosch/32/314_2.png) [@rotaugenlaubfrosch](https://discourse.openondemand.org/u/rotaugenlaubfrosch)
#### Post date: [March 26, 2020, 5:15pm UTC](https://discourse.openondemand.org/t/separate-folder-plugins-and-passenger-apps/789/3 "2020-03-26T17:15:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)
#### Post date: [March 26, 2020, 6:12pm UTC](https://discourse.openondemand.org/t/separate-folder-plugins-and-passenger-apps/789/4 "2020-03-26T18:12:08Z")

</div>

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](https://github.com/OSC/ondemand/issues/201) and [https://github.com/OSC/ondemand/issues/231](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](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](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](https://github.com/OSC/ondemand/tree/b1acbb06c977d4713ac2b0d0f3016d8266463804/apps). 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…

---

<div class="post-metadata">

### Author: ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)
#### Post date: [May 26, 2022, 3:37pm UTC](https://discourse.openondemand.org/t/separate-folder-plugins-and-passenger-apps/789/5 "2022-05-26T15:37:26Z")

</div>


