Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After I have specified a default EC2 instance type for my Juju charm, how do I override that for one of the services?

For instance, the Juju tutorial deploys wordpress and mysql, and I can set the default-instance-type in my environments.yaml so both services are m1.small

But how do I configure it so that (only) the mysql service gets deployed on an instance type better suited to a database, like m2.xlarge ?

share|improve this question
up vote 4 down vote accepted

In summary, if you wanted to deploy with m2.xlarge:

 juju deploy mysql --constraints 'instance-type=m2.xlarge'

Or if you want your deployment script to be more portable between providers:

 juju deploy mysql --constraints 'mem=8G'

Here are the corresponding documents:

share|improve this answer
Thanks for that. I'll try and keep an eye on the Launchpad updates. – James Mitchell Feb 7 '12 at 1:21
I see that juju in Ubuntu 12.04 has the constraints feature now, and I can specify a default architecture, memory, or type for a whole environment, and then change it for a single service. Good work! – James Mitchell May 18 '12 at 21:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.