warning: environments.yaml schema change
William Reade
william.reade at canonical.com
Tue Mar 20 10:21:57 UTC 2012
Hi all
Basic support for EC2 machine constraints will be landing in trunk very
shortly. This includes a change to the environments.yaml schema: the
default-image-id and default-instance-type keys are no longer valid (as
discussed here shortly before Christmas 2011).
In exchange for this, it will become much easier to specify instance
types per-service:
juju deploy foobar --constraints ec2-instance-type=m1.medium
...and to change them later:
juju set-constraints -s foobar ec2-instance-type=m1.large
...or to select machines based on alternative criteria:
juju deploy foobar --constraints "ec2-zone=a arch=i386 mem=3G"
...and of course to update them later:
juju set-constraints -s foobar ec2-zone=b arch=amd64
Further notes:
* EC2 is the only provider that pays any attention to the constraints
you set.
* Constraint changes do not cause units to be redeployed; they only
affect provisioning of future machines. Redeploying a service on a
larger instance type involves setting the new service constraints;
adding new units, which will use the new constraints; and retiring the
old units once the new ones have come up.
* Environment constraints are not implemented: services without explicit
constraints will default to "cpu=1 mem=512M", which translates to a
64-bit m1.small.
* EC2 architecture will implicitly default to "amd64" if
ec2-instance-type is specified. To start an i386 instance, you can't use
ec2-instance-type directly: you need to specify "arch=i386", along with
cpu and mem constraints satisfied by the instance-type you're looking
for. (The easiest option is just to set "arch=i386", which will get you
a 32-bit m1.small.)
* When multiple instance types can satisfy your constraints (that is,
very frequently: a cg1.4xlarge satisfies "cpu=1 mem=512M" just fine) the
cheapest one will be chosen (based on us-east-1 pricing).
* This mechanism should also take care of image selection (based on
charm series and desired architecture).
* HVM images are not yet supported. Re-reading the EC2 FAQs, it emerges
that this is a proper no-foolin' bug that will prevent anyone from using
cc1.4xlarge, cc2.8xlarge, or cg1.4xlarge instance types.
In light of the HVM issue, I'm going to hold off merging this for a
short time; however, please consider this to be your final warning that
a potentially disruptive change is *imminent*.
Cheers
William
More information about the Juju
mailing list