Ubuntu – How to adjust the instance size that Juju uses

amazon ec2juju

I've fired up some of the example instances of WordPress and MySQL with Juju. A coworker has told me that the default instance size is "small". I'd like to be able to scale this to different sizes on Amazon EC2.

How can I adjust this, is this something defined in a formula or is it an argument I can pass Juju on the command line?

Let's say for example I wanted to deploy wordpress on "large" amazon instances.

Best Answer

As per this section of the documentation you need to define the instance-type as part of a machine constraint:

Deploy MySQL on a machine with at least 32GiB of RAM, and at least 8 ECU of CPU power (architecture will be inherited from the environment, or default to amd64):

juju deploy --constraints "cpu-cores=8 mem=32G" mysql

Deploy to t1.micros on AWS:

juju bootstrap --constraints "cpu-power=0 mem=512M"

Launch all future "mysql" machines with at least 8GiB of RAM and 4 ECU:

juju set-constraints --service mysql mem=8G cpu-cores=4