Juju + MAAS + Image Downloads

Kapil Thangavelu kapil.thangavelu at canonical.com
Fri Sep 5 13:10:52 UTC 2014


On Thu, Sep 4, 2014 at 7:02 PM, David Britton <davidpbritton at gmail.com>
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?
>
>

its possible, though some minor cheating. most of this behavior is from the
underlying lxc ubuntu-cloud-template

use juju-run to execute this on all machines targeted for lxc containers

mkdir /var/cache/lxc/cloud-$series/
wget -q $maas-image-url -o
/var/lib/cloud-$series/ubuntu-$codename-server-cloudimg-amd64-root.tar.gz

ie. should result in
/var/cache/lxc/cloud-trusty/ubuntu-14.04-server-cloudimg-amd64-root.tar.gz

uvtool for kvm needs different workarounds.



one way to wrap this into core would be to parameterize the cloud template
to take the image url directly instead of doing the simplestreams lookup it
current does.

-k




> --
> David Britton <davidpbritton at gmail.com>
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20140905/d8a317b1/attachment.html>


More information about the Juju mailing list