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