Good suggestion - we could definitely improve the syntax. How about
this, which is closer to what we have today:

whirr.templates.web=role1+role2
whirr.templates.db=role3+role4

whirr.instance-templates=3 web, 2 db
whirr.templates.web.hardwareId=x4.large
whirr.templates.web.imageId=eu-east/0a1b2c3d
whirr.templates.db.hardwareId=x1.large

Tom

On Thu, Feb 2, 2012 at 2:05 AM, Karel Vervaeke <[email protected]> wrote:
> Hi, I'd like to suggest a change in the configuration syntax.
> It's really a minor improvement, but I wanted to share the idea nonetheless:
>
> Currently, you have to change things in at least two places to add a role:
>
> whirr.instance-templates=3 role1+role2, 2 role3+role4
> whirr.templates.role1+role2.hardwareId=x4.large
> whirr.templates.role1+role2.imageId=eu-east/0a1b2c3d
> whirr.templates.role3+role4.hardwareId=x1.large
>
> I would suggest something like this:
>
> # roles
> whirr.instance-class.web=role1+role2
> whirr.instance-class.db=role3+role4
>
> # hardware
> whirr.instance-descriptor.lightweight.hardwareId=x1.large
> whirr.instance-descriptor.heavyweight.hardwareId=x4.large
>
> # assign roles to hardware
> whirr.instance-templates=3 web/heavyweight, 1 db/lightweight, 1 db/heavyweight
>
> Regards,
> Karel
>
> --
> Karel Vervaeke
> http://outerthought.org/
> Open Source Content Applications
> Makers of Kauri, Daisy CMS and Lily

Reply via email to