Juju + MAAS + Image Downloads

Ian Booth ian.booth at canonical.com
Fri Sep 5 00:34:22 UTC 2014

On 05/09/14 09:02, David Britton wrote:
> Hi juju folks --
> I'm using MAAS + Juju to do some testing behind a firewall with LXCs.  I
> want to accelerate the download of the large images that I am
> downloading from cloud-images.ubuntu.com.
> I see that MAAS has cloud images.  Ideally, I'd like to instruct Juju to
> download them from there:
>     https://bugs.launchpad.net/juju-core/+bug/1357045
> But I'm not sure that is possible.  So, I'll leave it to someone else to
> pick up that bug if they think it's worthwhile.
> I then tried to setup squid and proxy them transparently and found that
> the image-metadata-url that I give juju is only for the .json files that
> are referenced.  The images are still downloaded via https from
> cloud-images.ubuntu.com.  I'm not even sure if this is a bug.  I mean, I
> understand why you want https, but if I want to mirror it, it's a new
> level of commitment to make it https only especially in a private
> environment.
> Is the only option for me to mirror cloud-images and set up an https
> endpoint (or a transparent https m-i-t-m proxy) in order to avoid
> downloading these large images over and over?

I'm not an LXC (nor MAAS) expert, but I see there being 2 options:

1. Use the ubuntu-cloud template as we do now, but pass in the -T argument to
instruct the script to obtain the specified LXC images from an http endpoint
using wget. This would then replace/override the use of ubuntu-cloudimg-query
which is what reaches out now to cloud-images.canonical.com to obtain the images.

2. Use a different template script and specify it using the -t argument to
lxc-create. This script would have to replicate what's in
/usr/share/lxc/templates/lxc-ubuntu-cloud but obtain the lxc images from elsewhere.

For MAAS, if there were an endpoint which could serve the LXC tarballs, as
opposed to the root images themselves at
then option 1 would be easiest. We could provide a new config option to specify
the correct URL to pass to -T


More information about the Juju mailing list