Juju in LXC
ondrej.kuznik at credativ.co.uk
Tue Nov 18 09:51:17 UTC 2014
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
- 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.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: OpenPGP digital signature
More information about the Juju