Juju in LXC

Charles Butler charles.butler at canonical.com
Tue Nov 18 14:06:07 UTC 2014


Thank you for sharing this Ondrej!

I'm excited to hear you got nested LXC containers working for your use
case. This is certainly an interesting story - as its far lighter weight
than running an isolated VM.

Cheers!

On Tue, Nov 18, 2014 at 4:51 AM, Ondrej Kuznik <ondrej.kuznik at credativ.co.uk
> wrote:

> Hi all,
> a bit of background: running Debian on a not-so-high-spec machine, the
> most often suggested way of running Juju (vagrant) has not been the best
> experience so far.
>
> The VM eats most of my RAM (the few bits not taken up by Iceweasel
> already) and takes ages to do the simplest of things. Yet it has worked
> well enough for a while, until I needed relations with the postgresql
> charm.
>
> That issue turns out to have been fixed since, but given that I already
> had to start over with a fresh VM, it was a good time to try and go
> native again - with LXC.
>
> According to lazyPower, noone has really tried that, or they haven't
> shared their experience yet. He suggested I do so, should I be
> successful. So here it comes.
>
> Juju a la Debian, or LXCeption
> ------------------------------
>
> Ingredients:
> - 1 Debian Jessie (a Wheezy with backports might work as well?)
> - aptitude install lxc ebtables bridge-utils libvirt-bin debootstrap
> - a cup of https://wiki.debian.org/LXC
> - a pinch of https://help.ubuntu.com/lts/serverguide/lxc.html#lxc-nesting
>
> If lxc-checkconfig approves of your machine, you can proceed to create
> your new container:
>
> lxc-create -n juju-host -t ubuntu-cloud -- --release trusty
>
> Then, as per the Ubuntu documentation, edit your container config
> (/var/lib/lxc/juju-host/config) to include:
>
> lxc.mount.auto = cgroup
>
> Sprinkle with networking of your liking and you can start the machine.
> Your Juju is ready to serve!
>
> As expected, it is much snappier and friendly. One gotcha is that,
> usually after an environment destroy, the cgroups get unmounted/somehow
> disabled in the container and new containers in the nest will not start.
> Restarting the juju host container makes that go away.
>
> Maybe that's juju being overzealous when shutting down the its machines?
> Can file a bug if anyone thinks it's worth investigating.
>
> Have fun,
> Ondrej
>
> --
> Consultant
> credativ Ltd
> Suite 5, Bloxam Court
> Corporation Street           UK office:  +44 1788 298150
> Rugby                        Email:      ondrej.kuznik at credativ.co.uk
> CV21 2DU                     Web:        http://www.credativ.co.uk
> --
> credativ Ltd is registered in England & Wales, company no. 5261743
> Certified by CompTIA / AccredIT UK with the ICT Supply standard of
> quality for Software Product Design and Development
>
>
> --
> 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/20141118/643d880e/attachment.html>


More information about the Juju mailing list