OSC / ood_core

Open OnDemand core library

Home Page:https://osc.github.io/ood_core/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make default host configurable in Job Composer

sync-by-unito opened this issue · comments

  1. Add ConfigurationSingleton#clusters which will return memoized form of what is currently in config/initializers/ood_appkit.rb. For easy compatibility in short term, config/initializers/ood_appkit.rb could be updated to do OODClusters = Configuration.clusters.
   def clusters
     @clusters ||= OodCore::Clusters.new(OodAppkit.clusters.select(&:job_allow?).reject { |c| c.metadata.hidden })
   end
  1. Add method ConfigurationSingleton#default_batch_host, which gets its value from an env var or default to the first available cluster id found
  2. In these places, use the new Configuration.default_batch_host instead of whatever method is being used for the batch host:
  3. Workflow.new and Workflow.new_from_template both use Manifest#default_host https://github.com/OSC/ondemand/blob/1cf231a26277db8869d75309bcb45291426e9f08/apps/myjobs/app/models/manifest.rb#L54-L56
  4. Workflow.new_from_path has this line workflow.batch_host = OODClusters.first.id https://github.com/OSC/ondemand/blob/1cf231a26277db8869d75309bcb45291426e9f08/apps/myjobs/app/models/workflow.rb#L48

┆Issue is synchronized with this Asana task by Unito

➤ Bart Verheyde commented:

So what needs to be done extra to get this included?