Deploying units with a specific AMI

Kapil Thangavelu kapil.thangavelu at
Thu Apr 26 20:21:29 UTC 2012

Excerpts from Jorge O. Castro's message of 2012-04-26 16:09:19 -0400:
> On Thu, Apr 26, 2012 at 4:04 PM, Francis J. Lacoste
> <francis.lacoste at> wrote:
> > juju bootstrap --constraints instance-type=XXX
> >
> > All future deploy not specifying an instance-type constraints will use
> > that one.
> Interesting, is that by design? I would have expected for it to always
> follow the default (or a specific image in environments.yaml) unless I
> add the flag.

it is by design. the bootstrap constraints set the default for the environment. 
it can be overridden on a per service basis when deploying by specifying 
constraints ie.

  juju deploy --constriants="instance-type=m1.small" wordpress

or it can be modified on a service or environment basis via

  juju set-constraints 

also note that constraints solve against generic resources (mem, cpu, etc) 
taking into account instance-type mapping to those generic constraints, so 
simply settings.. --constraints="mem=4G" will suffice to pick the correct 
instance type.



More information about the Juju mailing list