Default-Image-Id

anirup dutta anirupdutta at gmail.com
Mon Apr 22 03:41:47 UTC 2013


Hey Ian,

Thanks for the information. I am kind of surprised because, the earlier
versions of Juju allowed specifying a user defined default image by putting
it up in the environmental configuration (
https://juju.ubuntu.com/docs/provider-configuration-ec2.html) so I didn't
expect the feature to be removed. Good to hear that it is making a
comeback.

I have a question, is there a workaround. I don't want to start with a
vanilla instance and I would rather prefer to use my own customized ami
because it would save me a lot of time in setting up my deployments. In the
kind of experiments, I am running using Juju, I deploy them for few hours
and then tore them down.

Or should I fall back to an older version of Juju. I think 0.6(honolulu)
release or 0.5.3 should support it.




On Sun, Apr 21, 2013 at 9:59 PM, Ian Booth <ian.booth at canonical.com> wrote:

> Hi Anirup
>
> On 22/04/13 09:33, anirup dutta wrote:
> > Hello Everyone,
> >
> > I am new to Juju and I am trying to learn it. I want to use my own ami
> > while launching in ec2. The environments file had a option for using
> > default-image-id but it has been deprecated and works only with the
> legacy
> > deployments. It mentions in the documentation that we can use constraints
> > to do so but I couldn't find a proper documentation to do that.
> >
> > This is the different things that I tried :
> >
> > juju bootstrap --constraints "image-id: ami-xxxxxxxx"
> > juju bootstrap --constraints "default-image-id: ami-xxxxxxxx"
> > juju bootstrap --constraints "ami-image-id: ami-xxxxxxxx"
> >
> > I get an error like this
> >
> > ERROR Could not interpret 'ami-image-id:' constraint: need more than 1
> > value to unpack
> >
> > It would be great if someone can help me with this.
> >
>
> Constraints are used not to specify an image id to use, but rather to
> specify
> the type of instance to run based on user specified virtual machine
> parameters
> like amount of RAM, number of CPU cores etc. So you say something like:
>
> juju bootstrap --constraints "mem=4G cpu-cores=4"
>
> in order to run up a machine with 4GB of RAM and 4 cores. juju will look
> at the
> available EC2 instance types (m1.small. m1.medium etc) and pick the best
> one to
> use based on the supplied constraints and your region.
>
> In terms of picking an image to run, for EC2, juju looks at the cloud guest
> images availability data on http://cloud-images.ubuntu.com/ (see
> https://help.ubuntu.com/community/UEC/Images for some details) to
> determine the
> correct ami image id to use based on your configured Ubuntu series. The
> out-of-the-box behaviour is to use a "precise" image matching your chosen
> arch
> but you can also set an environment attribute "default-series" to boostrap
> a
> different image eg "raring". When charms are deployed, I *think* the
> series is
> read from the charm URL (if specified therein), and it falls back to the
> bootstrap node's series otherwise (someone will correct me if I am wrong
> I'm sure).
>
> There is some code landing soon which will allow EC2 and Openstack
> providers to
> fallback to a user specified default-image-id and default-instance-type
> but the
> current behaviour is that this will only happen if juju is unable to find
> matching instance type and image as described above.
>
> I hope this helps answer your question.
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>



-- 
Anirup Dutta
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20130421/c8eb4f02/attachment.html>


More information about the Juju mailing list