We have multiple sites/clusters each with it’s own dedicated OnDemand server and I’d like to share apps between the clusters with the apps being agnositc to which site they are running at so they can be copied from site to site without needing to modify them. To get to that I’ve been moving site specific stuff into into /etc/ood/config/apps/dashboard/initializers/
and loading into the apps from there. I’m trying to do that with cluster:
, in an initializer I have:
class SiteOptions
@@cluster = "mysite"
def self.cluster
@@cluster
end
end
Then in form.yml.erb
I use:
cluster: "<% SiteOptions.cluster %>"
This works fine to get the app added to the menu at a site, but when I try to have the app submit a job, I get the error:
save
The cluster was never set. Either set it in form.yml.erb with `cluster` or `form.cluster` or
set `cluster` in submit.yml.erb.
If I set cluster without using a template, e.g.
cluster: "mysite"
Then the app works fine. What am I doing wrong here? Alternatively, is there a better way to abstract the cluster name out of the app and into /etc/ood
that I’ve missed?
griznog