How do I launch and m1.medium on AWS?

Nate Finch nate.finch at canonical.com
Thu Oct 10 10:19:53 UTC 2013


So, it depends on what you mean by explode.  Juju won't misbehave, but
certainly the script will not function in the way the writer intended if
you do juju add-machine --constraints type=m1.large when running against
MaaS instead of EC2.

Both EC2's instance type and MaaS tags are exposed through generic
constraints (type and tags respectively) that are intended to be
implemented in provider-specific ways.  Right now they are just ignored by
providers that don't support them (so you can do tags=foo when running
against EC2, and it'll just act as if the constraint wasn't there).  So
trying to add-machine --constraints type=m1.large against maas will
actually give you any random machine on maas.

I see three possible behaviors when you specify a constraint that is not
supported by the provider you're working against:

1.  It could be ignored (this is what we do now)
2.  It could cause the command to simply fail immediately.
3.  We could try to make our best guess at what the user means.

I'm not a big fan of #3, either of the other behaviors are fine, in my
opinion.

In theory we could translate EC2 instance types into lists of other
constraints (cpu-cores, memory, etc), and use those lists of constraints
against other providers.... so effectively that would work like "hey, give
me something that looks like an m1.large on this provider"... but I'm not
sure if that would be more surprising than helpful.

-Nate


On Wed, Oct 9, 2013 at 11:25 PM, Kapil Thangavelu <
kapil.thangavelu at canonical.com> wrote:

> quick indeed, that's awesome!
>
> fwiw, looking over the branch and the maas tags implementation, these
> provider specific constraints are actually exposed as global constraints so
> a script using wouldn't explode running elsewhere.
>
>
> On Wed, Oct 9, 2013 at 10:27 PM, Gustavo Niemeyer <gustavo at niemeyer.net>wrote:
>
>> Hey Nate,
>>
>> That was quick! :-)
>>
>> Have you read the previous threads on the subject?  Agree with Mark we
>> should do something, but would be good to keep in mind some of the
>> points raised (e.g. scripts that use these provider-specific
>> constraints shouldn't just explode when running elsewhere).
>>
>> On Wed, Oct 9, 2013 at 9:24 PM, Nate Finch <nate.finch at canonical.com>
>> wrote:
>> > I just implemented that tonight, pending code review.  :)
>> >
>> > On Oct 9, 2013 4:59 PM, "Mark Shuttleworth" <mark at ubuntu.com> wrote:
>> >>
>> >>
>> >> We should really allow passing substrate-specific constraints like
>> >> instance types. No need for the voodoo in juju :)
>> >>
>> >> On 09/10/13 20:16, Kapil Thangavelu wrote:
>> >>
>> >> Unfortunately without an ec2 constraint in juju-core around instance
>> type,
>> >> the overlap around capabilities within ec2 instance types means exact
>> >> specification via generic constraint is inexact. looks like you already
>> >> filed a bug on this https://bugs.launchpad.net/juju-core/+bug/1237568
>> >>
>> >>
>> >> On Wed, Oct 9, 2013 at 2:14 PM, Jorge O. Castro <jorge at ubuntu.com>
>> wrote:
>> >>>
>> >>> I can't seem to figure out the right combination of constraints to get
>> >>> an m1.medium.
>> >>>
>> >>> juju bootstrap --constraints "cpu-cores=2 mem=3.75"
>> >>>
>> >>> launches c1.mediums and not m1's.
>> >>>
>> >>> --
>> >>> Jorge Castro
>> >>> Canonical Ltd.
>> >>> http://juju.ubuntu.com/charm-championship - Share your
>> infrastructure,
>> >>> win a prize!
>> >>>
>> >>> --
>> >>> Juju mailing list
>> >>> Juju at lists.ubuntu.com
>> >>> Modify settings or unsubscribe at:
>> >>> https://lists.ubuntu.com/mailman/listinfo/juju
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> Juju mailing list
>> >> Juju at lists.ubuntu.com
>> >> Modify settings or unsubscribe at:
>> >> https://lists.ubuntu.com/mailman/listinfo/juju
>> >>
>> >
>> > --
>> > Juju mailing list
>> > Juju at lists.ubuntu.com
>> > Modify settings or unsubscribe at:
>> > https://lists.ubuntu.com/mailman/listinfo/juju
>> >
>>
>>
>>
>> --
>>
>> gustavo @ http://niemeyer.net
>>
>> --
>> Juju mailing list
>> Juju at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/juju
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20131010/cde320f7/attachment.html>


More information about the Juju mailing list