ondemand
ondemand copied to clipboard
Make default host configurable in Job Composer
trafficstars
- Add
ConfigurationSingleton#clusterswhich 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 doOODClusters = Configuration.clusters.
def clusters
@clusters ||= OodCore::Clusters.new(OodAppkit.clusters.select(&:job_allow?).reject { |c| c.metadata.hidden })
end
- Add method
ConfigurationSingleton#default_batch_host, which gets its value from an env var or default to the first available cluster id found - In these places, use the new
Configuration.default_batch_hostinstead of whatever method is being used for the batch host: Workflow.newandWorkflow.new_from_templateboth useManifest#default_hosthttps://github.com/OSC/ondemand/blob/1cf231a26277db8869d75309bcb45291426e9f08/apps/myjobs/app/models/manifest.rb#L54-L56Workflow.new_from_pathhas this lineworkflow.batch_host = OODClusters.first.idhttps://github.com/OSC/ondemand/blob/1cf231a26277db8869d75309bcb45291426e9f08/apps/myjobs/app/models/workflow.rb#L48
┆Issue is synchronized with this Asana task by Unito
So what needs to be done extra to get this included?
I'm going to close this as we're redoing the job composer and it'll have dropdowns and choices for clusters.