Great, the parent `brooklyn.properties` solution works for me.

On Thu, Oct 20, 2016 at 8:04 PM Aled Sage <[email protected]> wrote:

> My email client seems to have messed up the indents! Here it is again
> with a comment on each line saying what the indent should be!
>
> ```
> name: Server (Brooklyn Example)
> location:
>    aws-ec2-us-east-1: # two spaces indent
>      imageId: us-east-1/ami-6224a40a # four spaces indent
> services:
> - type: server
>    name: My VM # two spaces indent
> ```
>
> ```
> name: Multiple Servers (Brooklyn Example)
> location:aws-ec2-us-east-1
> services:
> - type: org.apache.brooklyn.entity.stock.BasicApplication
>    brooklyn.config: # two spaces indent
>      provisioning.properties: # 4 spaces indent
>        imageId: us-east-1/ami-6224a40a # 6 spaces indent
>    brooklyn.children: # 2 spaces indent
>    - type: server # 2 spaces indent
>      name: vm1 # 4 spaces indent
>    - type: server # 2 spaces indent
>      name: vm2 # 4 spaces indent
> ```
>
> On 21/10/2016 00:42, Aled Sage wrote:
> > Hi Mike,
> >
> > Off the top of my head, I'd expect it to be:
> >
> > ```
> > name: Server (Brooklyn Example)
> > location:
> > aws-ec2-us-east-1:
> >     imageId: us-east-1/ami-6224a40a
> > services:
> > - type: server
> >   name: My VM
> > ```
> >
> > Alternatively (less good), you could rely on inheriting the
> > "provisioning.properties" in the runtime management hierarchy so that
> > all servers in that part of the tree get the config (see docs at
> > https://github.com/apache/brooklyn-docs/pull/115/files). For example,
> > something like:
> >
> > ```
> > name: Multiple Servers (Brooklyn Example)
> > location:aws-ec2-us-east-1
> > services:
> > - type: org.apache.brooklyn.entity.stock.BasicApplication
> >   brooklyn.config:
> >     provisioning.properties:
> >       imageId: us-east-1/ami-6224a40a
> >   brooklyn.children:
> >   - type: server
> >     name: vm1
> >   - type: server
> >     name: vm2
> > ```
> >
> > Aled
> >
> >
> > On 21/10/2016 00:31, Mike Zaccardo wrote:
> >> Hi dev,
> >>
> >> I'd like to override the `imageID` of a location so it applies to all
> >> entities in a blueprint. Consider this simple blueprint:
> >>
> >> ```
> >> name: Server (Brooklyn Example)
> >>
> >> location: aws-ec2-us-east-1
> >>
> >> services:
> >> - type: server
> >>    name: My VM
> >>    provisioning.properties:
> >>      imageId: us-east-1/ami-6224a40a
> >> ```
> >>
> >> This will successfully deploy a VM to my preconfigured location named
> >> `aws-ec2-us-east-1` with the desired AMI `us-east-1/ami-6224a40a`.
> >> However,
> >> I'd like to add more services to this blueprint but do not want to
> >> have to
> >> specify `provisioning.properties` and `imageId` for each one. What is
> >> the
> >> proper syntax to set the `imageId` for the location itself so that it
> >> will
> >> apply to all entities?
> >>
> >> Thanks,
> >> Mike
> >>
> >
>
>

Reply via email to