Re: Bosh v2 - Addons - reference to collocated job name


Danny Berger
 

Typically the release would generate those values dynamically based on the
`spec` variable (e.g. `<%= spec.job.name %>`. This way the values don't
need to be hard-coded anywhere, and they're compatible with the addons-type
approach you're describing. Some template properties you might find useful:

- spec.job.name - the instance group name
- spec.index - numeric number of the instance (being deprecated)
- spec.id - UUID of the instance
- spec.az - availability zone in cloud-config-aware deployments
- spec.deployment - the deployment name

Here's a page which discusses a bit more about templates and what is
available in the ERB -
http://bosh.io/docs/reference/jobs.html#use-of-properties.

Danny

On Tue, Sep 27, 2016 at 4:36 AM, Stevo Slavić <sslavic(a)gmail.com> wrote:

Hello CF Bosh community,

Is it possible for Bosh v2 addon job to access name of collocated job?
With v1 I was able to configure properties of job and "addon" job
together, as addons were repeated.

E.g. say one has multiple deployments, each deploying a different job,
each job a cluster of x instances, each instance running on its own VM. And
say I wanted on every VM of every deployment to run an addon job which
collects and reports metrics from every VM. For metrics to have meaning, I
need to configure addon job properties with collocated job name (one owning
the instance, to which addon is collocated with) to use it in metric name.
Is that possible? Any docs or examples would be helpful.

Kind regards,
Stevo Slavic.
--
Danny Berger

Join cf-bosh@lists.cloudfoundry.org to automatically receive all group messages.