Mixing AMIs?

Clint Byrum clint at ubuntu.com
Fri Apr 15 16:14:05 UTC 2011


Excerpts from Gustavo Niemeyer's message of Fri Apr 15 06:33:22 -0700 2011:
> > I just started playing around with ensemble, setup my environment and
> > run the mysql/wordpress example. Thanks to Kapil's help on IRC it all
> > worked in the end :)
> 
> That's fantastic.  Please feel free to ping us whenever you have any
> questions on getting this running, or any feedback about how well it
> works for you.
> 
> > On
> > http://readthedocs.org/docs/ensemble/en/latest/provider-configuration-ec2.html
> > I've seen that I can change the AMI via 'param default-image-id'. Is
> > there also a way to use different AMIs for different formulas? E.g. I
> (...)
> 
> Right, this isn't very flexible right now, but will be possible in the
> near future.  The way that this will work is that we'll put that
> information in the formula metadata itself, so rather than the user
> having to select where the formula has to run, the formula author will
> have a saying on where he designed it to work.  It may make sense to
> enable a forceful switch too, but that's a more advanced option which
> may break things more often.

I like the idea of cascading defaults.

The machine provider has a default machine image (I am avoiding AMI
because LXC doesn't know what an AMI is), then the environment has a
default image that it prefers. The formula can override that, as can
the deploy command.

I think the key would be to allow the optional usage of namespace qualifiers.

image: ubuntu,lucid-amd64
image: ami,ami-4854f31c2
image: natty-i386
image: oneiric

Would all be allowed, and should be consumable by the machine
providers. This way a machine provider can just reject a formula/service
where it doesn't know how to handle things in the ami space, and it can
figure out what natty-i386 means fairly easily by looking it up as if
it is each one of the space types it has and then failing only if it
is ambiguous.

Likewise the machine type (t1.micro, m1.large) should cascade in the
same manner and just be ignored by providers that have no concept of
machine type.




More information about the Ensemble mailing list