You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by Karel Vervaeke <ka...@outerthought.org> on 2012/02/02 11:05:00 UTC

Recipe syntax suggestion

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

Re: Recipe syntax suggestion

Posted by Andrei Savu <sa...@gmail.com>.
+1 for Tom's suggestion. Also I think that a recipe like this should be
valid:

whirr.templates.master=hadoop-namenode+hadoop-jobtracker
whirr.templates.worker=haddop-datanode+haddop-jobtracker

whirr.instance-templates=1 master, 1 zookeeper+myapp, 5 worker, 5
worker+elasticsearch
whirr.templates.master.hardware-id=x4.large

What's nice about this change is that we should be able to implement it
just by changing the ClusterSpec parser (argument expansion in
whirr.instance-templates).

-- Andrei

On Thu, Feb 2, 2012 at 7:46 PM, Tom White <to...@cloudera.com> wrote:

> 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 <ka...@outerthought.org>
> 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
>

Re: Recipe syntax suggestion

Posted by Tom White <to...@cloudera.com>.
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 <ka...@outerthought.org> 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