fast containers & dev workflow with juju 1.18

Kapil Thangavelu kapil.thangavelu at canonical.com
Fri Apr 11 21:29:47 UTC 2014


Its built-in into juju local provider, mostly the email was a psa re its
availability, albeit lacking explicit instructions on setting it up.. ie.
my basic workflow on a new machine for getting juju local using this is
roughly as follows.

mkfs.btrfs /dev/sdx
mount -o "relatime,compress=lzo" /dev/sdx /var/lib/lxc
sudo apt-get install squid-deb-proxy

juju bootstrap local
juju set-env apt-http-proxy="http://10.0.3.1:8000"

# First one on a machine takes a long time (independent of environment)
#  lxc will download and cache an ubuntu cloud image, and juju will create
a template container
juju deploy wordpress

# the lack of feedback during this download is a known issue, you can also
explicitly download the image yourself
# to /var/lib/lxc/cloud-$series/image_name

# After that one time slowness, creating machines/containers should be very
quick
juju deploy mysql
juju add-relation mysql wordpress

There's also support for aufs overlay directories, but they are not fully
compatible with all charms.

cheers,

Kapil



On Fri, Apr 11, 2014 at 5:17 PM, Serge E. Hallyn <serge at hallyn.com> wrote:

> Quoting Kapil Thangavelu (kapil.thangavelu at canonical.com):
> > Hi Folks,
> >
> > instructions on getting a speedy workflow with local provider (a
> container
> > per second)
>
> Hey Kapil,
>
> sounds interesting - but I don't see a link?  Is it hidden in plain
> sight?
>
> > with juju's builtin local provider (running 1.18) if you have btrfs @
> > /var/lib/lxc and install squid-deb-proxy on the host, and run juju
> set-env
> > apt-http-proxy="http://10.0.3.1:8000"  you should be able to use the
> local
> > provider with significant speed improvements. (clone for containers
> package
> > caches, you also need to modify the squid deb proxy conf to allow for ppa
> > access).  that won't include nested containers or device access (open
> juju
> > bugs for hat) you can however use add-machine kvm:0 to get a kvm machine
> in
> > local provider for greater machine access on particular workloads. you'll
> > need to configure the 'network-bridge' option in environments.yaml to
> point
> > to virbr0 so lxc and kvm come up on the same network. The first container
> > will see some lag as juju downloads and populates the lxc cloud images
> into
> > /var/cache/lxc and creates a template container for subsequent cloning.
> >
> > cheers,
> >
> > Kapil
>
> > --
> > 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/20140411/43c10969/attachment.html>


More information about the Juju mailing list