[OOD-users] OOD - couple of initial setup questions

Chris Collins Chris.Collins at hull.ac.uk
Mon Jul 23 16:36:59 EDT 2018


Hi Eric,

Thanks very much for the pointers on this one. Knowing how and where I can use markup has got me most of the way to where I want to be, which is really just a proof of concept anyway.

It may be relevant to describe what I'm playing around and putting together - the standard job composer is ideal for most users, but there are some users who will still prefer a more straight forward click and go interface without the exposure to slurm submission script etc. So I'm seeing about using the interactive app form to create a job and launch it. This is basically only a small modification to the existing interactive app scripts.

In terms of a file chooser, all I am doing is getting a file listing from a specific directory. For example, for a Matlab page, there will be a Matlab projects directory and the chooser will list all .m files. With the markdown, I can put a link to the file explorer page as part of the page description, so users can upload their .m files to the relevant location (I've added in some Ruby that if someone visits the app page, it creates the relevant project subdirectory etc. Given this, I can actually get away without an upload element.

In theory this would work for a whole raft of job types that have simple commands, alongside Matlab for example there is Stata, SAS, Comsol, R etc...

Thanks,

Chris


________________________________
From: Franz, Eric [efranz at osc.edu]
Sent: 19 July 2018 18:26
To: User support mailing list for Open OnDemand
Subject: Re: [OOD-users] OOD - couple of initial setup questions

Chris,

You can include standard HTML in the help sections of the “attributes” in the form.yml.erb. The “attributes” have a key “widget” that specifies the Rails form helper method to execute to create the associated form element (http://guides.rubyonrails.org/v4.2/action_view_overview.html#formhelper). The help text actually is rendered using a markdown parser that is set to allow HTML tags. So you may or may not be able to hack in there script tags with embedded JavaScript that could manipulate the DOM however you see fit, though that would be quite a hack. There isn’t a way right now to put arbitrary HTML as far as I know. I look a little more and if I find something I’ll let you know.

What file chooser are you using (or wanting to use) for choosing existing files on the cluster?

In regards to being able to do file uploads, unfortunately it appears there is a bug in the code where the value of all of the attributes are coerced into strings prior to being used to render the template files. So you can add a file upload form element but won’t be able to process it. I was able to get file uploading working with hack. Though it is unreliable and something that is likely to break in future versions of OnDemand without warning. I can share that if you would like.

Thanks,
Eric

---
Eric Franz, Senior Web & Interface App Engineer
Ohio Supercomputer Center
An Ohio Technology Consortium (OH-TECH) Member
1224 Kinnear Road
Columbus, OH 43212
email: efranz at osc.edu

From: OOD-users <ood-users-bounces+efranz=osc.edu at lists.osc.edu> on behalf of Chris Collins <Chris.Collins at hull.ac.uk>
Reply-To: User support mailing list for Open OnDemand <ood-users at lists.osc.edu>
Date: Wednesday, July 18, 2018 at 6:27 PM
To: User support mailing list for Open OnDemand <ood-users at lists.osc.edu>
Subject: Re: [OOD-users] OOD - couple of initial setup questions

Hi Eric,

Thanks very much for the detailed response. We're a slurm house, so I guess thats something we'll ignore for the time being - I had considered a passenger app alternative to the system status app, so maybe that is an easier route to go down for now.

For now I've just used a very simple file chooser (based on the contents of the clusters filesystem) which at least allows me to choose from an existing file, but if it was possible to have a file upload, that would be great. Also - stupid question but is there a simple way to include standard HTML in a form.yml.erb file? (I should at this point say my Ruby experience goes back the few days I've been looking at OOD!).

Thanks,

Chris


From: Franz, Eric [mailto:efranz at osc.edu]
Sent: 16 July 2018 17:26
To: User support mailing list for Open OnDemand <ood-users at lists.osc.edu>
Subject: Re: [OOD-users] OOD - couple of initial setup questions

Chris,

The system status app that we currently use at OSC has its rpm at https://yum.osc.edu/ondemand/latest/web/el7/x86_64/ondemand-systemstatus-1.4.0-1.el7.x86_64.rpm and the GitHub repo is currently at https://github.com/AweSim-OSC/osc-systemstatus (we haven’t moved it yet to the OSC org but will be doing so soon). This app depends on both moab and ganglia.

This app to work you will need to add to the cluster config files a custom section for moab and ganglia. This is what that section looks like in our cluster config:

v2:
  metadata:
    title: "Owens"
    url: "https://www.osc.edu/supercomputing/computing/owens"
    hidden: false
  login:
    host: "owens.osc.edu"
  job:
    adapter: "torque"
    host: "owens-batch.ten.osc.edu"
    lib: "/opt/torque/lib64"
    bin: "/opt/torque/bin"
    version: "6.0.1"
  custom:
    moab:
      host: "owens-batch.ten.osc.edu"
      bin: "/opt/moab/bin"
      version: "9.0.1"
      homedir: "/var/spool/moab"
    ganglia:
      host: "ganglia.osc.edu"
      scheme: "https://"
      segments:
        - "graph.php"
      req_query:
        c: "Owens"
      opt_query:
        h: "%{h}.ten.osc.edu"
      version: "3"

No thought has been given to making this app working outside of OSC or with something other than moab and ganglia, which is why it was never advertised as an Open OnDemand app. If you have success running then that will be helpful to know and we can consider including this as an optional installable app in the stable rpms folder and mention it in the documentation. Note that an updated version of this simple app will be available this week that has a much simpler code base, similar to the tutorial app https://osc.github.io/ood-documentation/master/app-development/tutorials-passenger-apps/ps-to-quota.html.

As for getting this and the Ganglia graphs in Active Jobs to work, at OSC we depend on the same ganglia config section in the “custom” section above. That would need to exist and be properly set in order to work. I will say in both cases I would consider this feature “experimental”. It is reliable enough to work at OSC that we use it in production, but we are just making use of the query param “api” exposed by Ganglia’s graph.php script that generates the graph images, instead of using a supported API provided by Ganglia or reading the RRD itself.

In regards to file uploads or file selection in an interactive app, we have not tried or demonstrated that yet, so I don’t know. I can look into it and follow up this week on this thread.

Thanks,
Eric

---
Eric Franz, Senior Web & Interface App Engineer
Ohio Supercomputer Center
An Ohio Technology Consortium (OH-TECH) Member
1224 Kinnear Road
Columbus, OH 43212
email: efranz at osc.edu<mailto:efranz at osc.edu>

From: OOD-users <ood-users-bounces at lists.osc.edu<mailto:ood-users-bounces at lists.osc.edu>> on behalf of Chris Collins <Chris.Collins at hull.ac.uk<mailto:Chris.Collins at hull.ac.uk>>
Reply-To: User support mailing list for Open OnDemand <ood-users at lists.osc.edu<mailto:ood-users at lists.osc.edu>>
Date: Monday, July 16, 2018 at 6:38 AM
To: "ood-users at lists.osc.edu<mailto:ood-users at lists.osc.edu>" <ood-users at lists.osc.edu<mailto:ood-users at lists.osc.edu>>
Subject: [OOD-users] OOD - couple of initial setup questions

Hi All,

I’ve just started playing with OOD in a VM environment, just to get a feel for how it works and how it could benefit our HPC user community. It does look like it could be a really useful tool (great work by those involved!) but I just have a few questions, the first two regarding differences between my initial setup and what appears on the various video/presentation versions –


  1.  I can’t seem to find the “System Status” app on the couple of simple installations I’ve done (btw my install is ondemand-1.3.7-1.el7.x86_64, ondemand-release-web-1.3-1.el7.noarch)
  2.  This may be a simple one, but how do you integrate ganglia rrd graphs into the active job display?
  3.  Finally, has anyone got any advice/examples of including ‘widgets’ like file uploads or file selection in an interactive app? While the job composer is really great for the majority, I’d like to make a very simple job submission entry point based on the interactive app setup. Most of it is there, bar the option to select an input file etc.

Sorry for the very simple questions or if I’ve missed something obvious here, I have tried going through the documentation

Many thanks,

Chris


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osu.edu/pipermail/ood-users/attachments/20180723/a31c037f/attachment-0001.html>


More information about the OOD-users mailing list