5

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.

Jorge Castro
  • 73,717

2 Answers2

7

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
slangasek
  • 5,828
kim0
  • 337
1

There is one caveat about setting this on the environment namely that if your using an image which needs a 64-bit image, you'll need to specify the ami directly with default-instance-id.

We're currently working on a more generic resource constraint implementation which will be significantly more flexible and cross provider.