cloudfoundry-attic / bosh-init

bosh-init is a tool used to create and update the Director VM
Apache License 2.0
31 stars 33 forks source link

Implement bosh v2 template accessors #76

Closed keymon closed 8 years ago

keymon commented 8 years ago

Bosh implements a new called v2 schema, which includes some features like links. These features include new Template Accessors:

the link template accessor allows access to link information such as instance names, AZs, IDs, network addresses, etc.

link("...") allows access to linked instances and their properties if_link("...") allows conditional access to a link (useful for optional links)

Without this feature, deployments of releases with the new features will fail.

An example of this is concourse > v1.0.0, which includes several jobs using the link features

voelzmo commented 8 years ago

As far as I know, those accessor are actually implemented already, we just need a release of bosh-init. See commit such as https://github.com/cloudfoundry/bosh-init/commit/8f2ceb9a3520b9f5d20fd7b8ee315274f38e2f3c

Edit: apparently, 0.82 has just been released, so you should be good to go here.

keymon commented 8 years ago

Actually this is even more complicated. Bosh-init should support all the new features in bosh (aka bosh v2), if we want to use the same manifest with bosh-init than we use with bosh.

But I think one could write a manifest that works on bosh-init even using releases with the new features

keymon commented 8 years ago

@voelzmo if_link() is indeed implemented, but I cannot find whether link() helper is implemented: (more info here https://github.com/cloudfoundry/bosh/blob/master/bosh-template/lib/bosh/template/evaluation_context.rb#L96)

cppforlife commented 8 years ago

we are not planning to implement v2 links in bosh-init. for releases like concourse which use bosh-init for a single vm, currently they'll have to keep around properties that allow non link configuration (ie if_p).

Sent from my iPhone

On Apr 26, 2016, at 4:06 AM, Hector Rivas Gandara notifications@github.com wrote:

@voelzmo if_link is indeed implemented, but I cannot find if link() helper is implemented: (more info here https://github.com/cloudfoundry/bosh/blob/master/bosh-template/lib/bosh/template/evaluation_context.rb#L96)

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub

cppforlife commented 8 years ago

0.0.90 implements job level properties. if_link was also added in earlier releases. currently expected v2 compatibility in bosh-init is complete for now.