Make default host configurable in Job Composer
sync-by-unito opened this issue · comments
sync-by-unito commented
- 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 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_host
instead of whatever method is being used for the batch host: Workflow.new
andWorkflow.new_from_template
both useManifest#default_host
https://github.com/OSC/ondemand/blob/1cf231a26277db8869d75309bcb45291426e9f08/apps/myjobs/app/models/manifest.rb#L54-L56Workflow.new_from_path
has this lineworkflow.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
sync-by-unito commented
➤ Bart Verheyde commented:
So what needs to be done extra to get this included?