<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title>Tianon's Ramblings</title>
	<link href="https://tianon.github.io/" />
	<link type="application/atom+xml" rel="self" href="https://tianon.github.io/atom.xml" />
	<updated>2016-03-09T10:38:58-07:00</updated>
	<id>https://tianon.github.io</id>
	<author>
		<name>Tianon Gravi</name>
		<email>admwiggin@gmail.com</email>
		<uri>https://tianon.github.io</uri>
	</author>

	<entry>
		<id>https://tianon.github.io/post/2016/03/03/vultr-docker-ipv6</id>
		<link type="text/html" rel="alternate" href="https://tianon.github.io/post/2016/03/03/vultr-docker-ipv6.html"/>
		<title>Docker on VULTR + IPv6</title>
		<published>2016-03-03T00:00:00-07:00</published>
		<updated>2016-03-03T00:00:00-07:00</updated>
		<author>
			<name>Tianon Gravi</name>
			<email>admwiggin@gmail.com</email>
			<uri>https://tianon.github.io</uri>
		</author>
		<content type="html">&lt;p&gt;I’ve been using &lt;a href=&quot;https://www.vultr.com&quot;&gt;VULTR&lt;/a&gt; for a little while now and have been generally very pleased (especially with the very recent facelift the management portal received).  I don’t want to waste too much time talking about it, but the “killer feature” for me (over some of their competitors like &lt;a href=&quot;https://www.digitalocean.com&quot;&gt;DigitalOcean&lt;/a&gt;) is that I can provide a raw ISO and provision my VM directly using it as I would any local VM (which also means that once my VM is up and working, I get to use the OS’s standard kernel, which is especially important for using Debian Unstable well).&lt;/p&gt;

&lt;p&gt;Anyhow, already too much about that – let’s get to the cool stuff.&lt;/p&gt;

&lt;p&gt;Getting right down to the beef, let’s assume I’ve got a VULTR instance already created, my OS is already installed and working, I’ve enabled IPv6 within VULTR, ensured that my VM is able to &lt;code class=&quot;highlighter-rouge&quot;&gt;ping6 google.com&lt;/code&gt; (to verify at least basic routability), &lt;em&gt;and&lt;/em&gt; have Docker version 1.10.2 installed.&lt;/p&gt;

&lt;p&gt;For the sake of demonstration, we’ll assume that VULTR has assigned my IPv6 as follows: (available under the VM details via &lt;code class=&quot;highlighter-rouge&quot;&gt;Settings &amp;gt; IPv6&lt;/code&gt;)&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Default IP: &lt;code class=&quot;highlighter-rouge&quot;&gt;2001:db8::5400:00ff:fe20:2295&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Network: &lt;code class=&quot;highlighter-rouge&quot;&gt;2001:db8::&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;CIDR: 64&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(The astute reader may recognize &lt;a href=&quot;https://tools.ietf.org/html/rfc3849&quot;&gt;RFC3849&lt;/a&gt; here. 😏)&lt;/p&gt;

&lt;p&gt;The relevant documentation which helped me get to the working state outlined below is in &lt;a href=&quot;https://docs.docker.com/engine/userguide/networking/default_network/ipv6/&quot;&gt;the “IPv6 with Docker” section&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The first step I took was creating a systemd drop-in file so that I could modify the daemon startup parameters (to include &lt;code class=&quot;highlighter-rouge&quot;&gt;--ipv6&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;--fixed-cidr-v6&lt;/code&gt;):&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;# /etc/systemd/system/docker.service.d/ipv6.conf
&lt;/span&gt;&lt;span class=&quot;nn&quot;&gt;[Service]&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;ExecStart&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;
&lt;span class=&quot;py&quot;&gt;ExecStart&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;/usr/bin/docker daemon -H fd:// --ipv6 --fixed-cidr-v6 2001:db8::/80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;I chose to use just &lt;code class=&quot;highlighter-rouge&quot;&gt;/80&lt;/code&gt; for Docker – any other reasonable prefix (assuming it is routed to your host / host network) should also work; the documentation I linked above has an example using a &lt;code class=&quot;highlighter-rouge&quot;&gt;/125&lt;/code&gt;, for example.&lt;/p&gt;

&lt;p&gt;With this half in place, I can &lt;code class=&quot;highlighter-rouge&quot;&gt;systemctl daemon-reload&lt;/code&gt; and &lt;code class=&quot;highlighter-rouge&quot;&gt;systemctl restart docker.service&lt;/code&gt;, and when I start a container it will be automatically assigned an IPv6 address from within that prefix.  Excellent.&lt;/p&gt;

&lt;p&gt;An important caveat to note is that this &lt;em&gt;will&lt;/em&gt; break discovery on our host due to Docker enabling forwarding for us, so (assuming your “internet-facing” interface is named &lt;code class=&quot;highlighter-rouge&quot;&gt;ens3&lt;/code&gt; for the sake of illustration; it might just as easily be &lt;code class=&quot;highlighter-rouge&quot;&gt;eth0&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;eth1&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;enps3&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;lan0&lt;/code&gt;, &lt;code class=&quot;highlighter-rouge&quot;&gt;wlan0&lt;/code&gt;, etc) I had to &lt;code class=&quot;highlighter-rouge&quot;&gt;sysctl net.ipv6.conf.ens3.accept_ra=2&lt;/code&gt;, and I added it to &lt;code class=&quot;highlighter-rouge&quot;&gt;/etc/sysctl.d/docker-ipv6.conf&lt;/code&gt; for good measure (so that I don’t lose it after I reboot).&lt;/p&gt;

&lt;p&gt;The second half of our IPv6 to containers problem is routing.  The nitty-gritty details of this are discussed in &lt;a href=&quot;https://docs.docker.com/engine/userguide/networking/default_network/ipv6/#using-ndp-proxying&quot;&gt;the “Using NDP proxying” section&lt;/a&gt; of the documentation, but the gist is that my containers have IPv6 addresses, but the outside world doesn’t have a route that leads to them, and that we need to tell the kernel to respond to solicitations for our container’s IPv6 addresses appropriately.&lt;/p&gt;

&lt;p&gt;The kernel has a mechanism for doing so (via &lt;code class=&quot;highlighter-rouge&quot;&gt;ip -6 neigh ...&lt;/code&gt;), but it is limited to individual addresses and is thus not especially great for having a solution that works “magically” without further manual labor per-container.&lt;/p&gt;

&lt;p&gt;This is where &lt;a href=&quot;https://github.com/DanielAdolfsson/ndppd&quot;&gt;ndppd&lt;/a&gt; (also &lt;a href=&quot;https://packages.debian.org/sid/ndppd&quot;&gt;packaged for Debian as &lt;code class=&quot;highlighter-rouge&quot;&gt;ndppd&lt;/code&gt;&lt;/a&gt;) came in.&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c1&quot;&gt;# /etc/ndppd.conf
&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;proxy&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;ens3&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;kn&quot;&gt;rule&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2001&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;db8::/80&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;After getting this configuration in place and restarting &lt;code class=&quot;highlighter-rouge&quot;&gt;ndppd&lt;/code&gt; (&lt;code class=&quot;highlighter-rouge&quot;&gt;systemctl restart ndppd&lt;/code&gt;), magic happened.  My containers could &lt;code class=&quot;highlighter-rouge&quot;&gt;ping6 google.com&lt;/code&gt;, and my other IPv6 hosts could &lt;code class=&quot;highlighter-rouge&quot;&gt;ping6&lt;/code&gt; the IPv6 addresses of my individual containers!&lt;/p&gt;

&lt;p&gt;You’ve probably noted that this configuration isn’t exactly secure, since it means that each of my individual containers has a &lt;em&gt;publicly&lt;/em&gt; routable IPv6 address, but for this specific use case, I’m OK with that! 🍦&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; (2015-03-09): thanks to Алексей Шилин for correcting my systemd drop-in file usage! ♥&lt;/p&gt;
</content>
	</entry>

	<entry>
		<id>https://tianon.github.io/post/2015/05/28/dep8-tldr</id>
		<link type="text/html" rel="alternate" href="https://tianon.github.io/post/2015/05/28/dep8-tldr.html"/>
		<title>DEP8 - TL;DR</title>
		<published>2015-05-28T00:00:00-06:00</published>
		<updated>2015-05-28T00:00:00-06:00</updated>
		<author>
			<name>Tianon Gravi</name>
			<email>admwiggin@gmail.com</email>
			<uri>https://tianon.github.io</uri>
		</author>
		<content type="html">&lt;p&gt;DEP stands for “Debian Enhancement Proposals”.  &lt;a href=&quot;http://dep.debian.net/deps/dep8/&quot;&gt;DEP8&lt;/a&gt; is about package testing, specifically post-install (as opposed to &lt;code class=&quot;highlighter-rouge&quot;&gt;dh_auto_test&lt;/code&gt; which runs during package build, usually for unit tests).  It’s great for integration tests, etc. that have more interesting requirements for running than unit tests normally do.&lt;/p&gt;

&lt;p&gt;The problem is that &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=autopkgtest/autopkgtest.git;a=blob_plain;f=doc/README.package-tests.rst;hb=HEAD&quot;&gt;the spec&lt;/a&gt; is a little bit long in the tooth for casual reading / understanding-at-a-glance.&lt;/p&gt;

&lt;p&gt;What follows is my own personal TL;DR version.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-console&quot;&gt;$ cd your-package/
$ mkdir -p debian/tests
$ vim debian/tests/control
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(editor of your choice)&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Tests: my-test
Depends: hello, @
Restrictions: needs-root
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;(see &lt;a href=&quot;https://anonscm.debian.org/gitweb/?p=autopkgtest/autopkgtest.git;a=blob_plain;f=doc/README.package-tests.rst;hb=HEAD&quot;&gt;the spec&lt;/a&gt; for more info about what these mean and what valid values are)&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-console&quot;&gt;$ touch debian/tests/my-test
$ chmod +x debian/tests/my-test
$ vim debian/tests/my-test
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(editor of your choice)&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;set&lt;/span&gt; -e

hello

&lt;span class=&quot;c&quot;&gt;# other bits testing your actual package (installed because of &quot;@&quot; in &quot;Depends:&quot;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;(again, see the spec linked above for details of how this script should behave – in general, non-zero exit code or stderr output mean failure)&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-console&quot;&gt;$ apt-get install autopkgtest # if not already installed
$ adt-run --unbuilt-tree . --- VIRT-SERVER
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Where &lt;code class=&quot;highlighter-rouge&quot;&gt;VIRT-SERVER&lt;/code&gt; is one of: (as of this writing and installed by default with &lt;code class=&quot;highlighter-rouge&quot;&gt;autopkgtest&lt;/code&gt; – YMMV)&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://manpages.debian.org/cgi-bin/man.cgi?manpath=Debian+unstable+sid&amp;amp;query=adt-virt-chroot&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;chroot&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://manpages.debian.org/cgi-bin/man.cgi?manpath=Debian+unstable+sid&amp;amp;query=adt-virt-lxc&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;lxc&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://manpages.debian.org/cgi-bin/man.cgi?manpath=Debian+unstable+sid&amp;amp;query=adt-virt-null&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;null&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://manpages.debian.org/cgi-bin/man.cgi?manpath=Debian+unstable+sid&amp;amp;query=adt-virt-qemu&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;qemu&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://manpages.debian.org/cgi-bin/man.cgi?manpath=Debian+unstable+sid&amp;amp;query=adt-virt-schroot&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;schroot&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://manpages.debian.org/cgi-bin/man.cgi?manpath=Debian+unstable+sid&amp;amp;query=adt-virt-ssh&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;ssh&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
	</entry>

	<entry>
		<id>https://tianon.github.io/post/2015/05/25/dns.he.net-dd-wrt</id>
		<link type="text/html" rel="alternate" href="https://tianon.github.io/post/2015/05/25/dns.he.net-dd-wrt.html"/>
		<title>DD-WRT + dns.he.net (DDNS / inadyn)</title>
		<published>2015-05-25T00:00:00-06:00</published>
		<updated>2015-05-25T00:00:00-06:00</updated>
		<author>
			<name>Tianon Gravi</name>
			<email>admwiggin@gmail.com</email>
			<uri>https://tianon.github.io</uri>
		</author>
		<content type="html">&lt;p&gt;The DD-WRT wiki hilariously has &lt;a href=&quot;https://www.dd-wrt.com/wiki/index.php/Dynamic_DNS#he.net&quot;&gt;a page about this&lt;/a&gt;, but it’s not very helpful and &lt;a href=&quot;https://www.dd-wrt.com/phpBB2/viewtopic.php?t=137570&quot;&gt;account creation is entirely disabled&lt;/a&gt;, so here goes a blog post for my own future reference:&lt;/p&gt;

&lt;p&gt;In the &lt;a href=&quot;https://dns.he.net&quot;&gt;dns.he.net control panel&lt;/a&gt;, enable the hostname (&lt;code class=&quot;highlighter-rouge&quot;&gt;HOSTNAME&lt;/code&gt;) for “dynamic dns”.  Click the DDNS icon and generate a “key” (&lt;code class=&quot;highlighter-rouge&quot;&gt;KEY&lt;/code&gt;), which will be used as the password for updating.&lt;/p&gt;

&lt;p&gt;In the DD-WRT control panel, under “Setup &amp;gt; DDNS” (at least in &lt;code class=&quot;highlighter-rouge&quot;&gt;Firmware: DD-WRT v24-sp2 (02/19/14) std&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;DDNS Service: &lt;code class=&quot;highlighter-rouge&quot;&gt;Custom&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;DYNDNS Server: &lt;code class=&quot;highlighter-rouge&quot;&gt;dyn.dns.he.net&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Username: &lt;code class=&quot;highlighter-rouge&quot;&gt;HOSTNAME&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Password: &lt;code class=&quot;highlighter-rouge&quot;&gt;KEY&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Hostname: &lt;code class=&quot;highlighter-rouge&quot;&gt;HOSTNAME&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;URL: &lt;code class=&quot;highlighter-rouge&quot;&gt;/nic/update?hostname=&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whala.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; (2015-08-19):&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;ddclient.conf&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;highlighter-rouge&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;protocol=dyndns2
use=if
if=eth0
server=dyn.dns.he.net
ssl=no
login=HOSTNAME
password=KEY
HOSTNAME
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content>
	</entry>

	<entry>
		<id>https://tianon.github.io/post/2014/11/22/internets-own-boy</id>
		<link type="text/html" rel="alternate" href="https://tianon.github.io/post/2014/11/22/internets-own-boy.html"/>
		<title>The Internet's Own Boy</title>
		<published>2014-11-22T00:00:00-07:00</published>
		<updated>2014-11-22T00:00:00-07:00</updated>
		<author>
			<name>Tianon Gravi</name>
			<email>admwiggin@gmail.com</email>
			<uri>https://tianon.github.io</uri>
		</author>
		<content type="html">&lt;p&gt;I am really late coming to this train.  This has been on my list since the
day it was released, and today I finally found the time to sit alone and
digest.&lt;/p&gt;

&lt;p&gt;To say that it was “emotionally moving” would be a gross misrepresentation
of the film.  There were clearly some aspects added for dramatic effect, but
if you strip away (for example) the demonization of the opposition’s
actions, the proceedings remain absolutely &lt;em&gt;astounding&lt;/em&gt; and the results
entirely heartbreaking.&lt;/p&gt;

&lt;p&gt;That a society which claims to be as advanced as ours does (technologically,
morally, socially, militarily, etc) could demoralize an individual in this
manner seems terminally and criminally corrupt.&lt;/p&gt;

&lt;p&gt;When my filesystem gets corrupted, I try to desperately salvage any of the
useful information (usually while trying to salvage the entire filesystem),
and once my efforts have proven to have provided all the fruits they
possibly can, I proceed to format the drive and begin again.  Sometimes, a
system needs to be rebooted.  A fresh install of the operating system
usually extends the life of a system by a measurable amount of time.&lt;/p&gt;

&lt;p&gt;Perhaps reinstalling our base operating system is worth a try?&lt;/p&gt;
</content>
	</entry>

	<entry>
		<id>https://tianon.github.io/post/2014/08/30/debconf14</id>
		<link type="text/html" rel="alternate" href="https://tianon.github.io/post/2014/08/30/debconf14.html"/>
		<title>DebConf14</title>
		<published>2014-08-30T00:00:00-06:00</published>
		<updated>2014-08-30T00:00:00-06:00</updated>
		<author>
			<name>Tianon Gravi</name>
			<email>admwiggin@gmail.com</email>
			<uri>https://tianon.github.io</uri>
		</author>
		<content type="html">&lt;p&gt;I was given the opportunity to attend DebConf in Portland this year, and I
must say that it took me entirely by surprise (as a first-time attendee).&lt;/p&gt;

&lt;p&gt;Most conferences have several strong talk tracks and you end up spending a
lot of time sitting in talks wondering when they’ll be over.  At DebConf,
there’s an entirely different dynamic, with a strong focus on what they like
to call “the hallway track” (which this year has taken place a lot in the
hacklabs, too).  Everyone here wants to either talk about building cool
stuff, or sit down and actually build some cool stuff.  A large number of
the talks are just launchpads for informal Q+As or actual hack sessions.&lt;/p&gt;

&lt;p&gt;By coming, I’ve learned a lot about the Debian community and how it operates
as a whole, and managed to meet a lot of very interesting and cool people
(not to mention getting a bunch of them to sign my GPG key, which is also
nice).&lt;/p&gt;

&lt;p&gt;Hopefully I’ll be able to attend more DebConfs in the future, because I’ve
had a great time!&lt;/p&gt;
</content>
	</entry>

	<entry>
		<id>https://tianon.github.io/post/2014/05/17/docker-on-gentoo</id>
		<link type="text/html" rel="alternate" href="https://tianon.github.io/post/2014/05/17/docker-on-gentoo.html"/>
		<title>Love is a Battlefield</title>
		<published>2014-05-17T00:00:00-06:00</published>
		<updated>2014-05-17T00:00:00-06:00</updated>
		<author>
			<name>Tianon Gravi</name>
			<email>admwiggin@gmail.com</email>
			<uri>https://tianon.github.io</uri>
		</author>
		<content type="html">&lt;p&gt;Docker on Gentoo can be a beautiful thing, but it can also be a challenge
navigating some of the trade-offs.&lt;/p&gt;

&lt;p&gt;The hardest decision to make, in my opinion, is which storage backend to
use.  Each one has ups and downs, and some of them have ups and downs that
are more specific to Gentoo than others.&lt;/p&gt;

&lt;h1 id=&quot;aufs&quot;&gt;“aufs”&lt;/h1&gt;

&lt;p&gt;Normally for an out-of-kernel module (even a filesystem), it would be a
simple matter to simply compile said module against the proper kernel
sources and load it up; no harm, no foul.  What’s particularly needling
about AUFS is that it requires patches to the kernel proper (which, I might
add, were submitted for inclusion in the kernel and rejected).&lt;/p&gt;

&lt;p&gt;The quandary that’s most interesting about AUFS is that it’s currently the
recommended Docker backend.  For Ubuntu and Debian users, this isn’t a
problem since the AUFS patches are included in the main kernels and so the
&lt;code class=&quot;highlighter-rouge&quot;&gt;aufs&lt;/code&gt; module is merely a single &lt;code class=&quot;highlighter-rouge&quot;&gt;apt-get install&lt;/code&gt; away.&lt;/p&gt;

&lt;p&gt;As you might imagine, these patches make a bit of a stir for someone who
builds their own kernels (like, say, a Gentoo user), and there are two main
ways to get them.&lt;/p&gt;

&lt;h2 id=&quot;sys-kernelaufs-sources&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;sys-kernel/aufs-sources&lt;/code&gt;&lt;/h2&gt;

&lt;p&gt;I’ll start with the easy way.  If you &lt;code class=&quot;highlighter-rouge&quot;&gt;emerge sys-kernel/aufs-sources&lt;/code&gt;,
you’ll get &lt;code class=&quot;highlighter-rouge&quot;&gt;sys-kernel/gentoo-sources&lt;/code&gt; with the AUFS patches pre-applied.
Choosing this method, it’s merely a matter of making sure &lt;code class=&quot;highlighter-rouge&quot;&gt;CONFIG_AUFS_FS&lt;/code&gt;
is enabled in your &lt;code class=&quot;highlighter-rouge&quot;&gt;.config&lt;/code&gt; and you’re good to go.  If you’re already using
stock &lt;code class=&quot;highlighter-rouge&quot;&gt;sys-kernel/gentoo-sources&lt;/code&gt; and/or are not averse to a slight change,
this will be the easiest, cleanest, and most importantly the least
error-prone option by far.&lt;/p&gt;

&lt;h2 id=&quot;sys-fsaufs3&quot;&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;sys-fs/aufs3&lt;/code&gt;&lt;/h2&gt;

&lt;p&gt;The alternative is to use &lt;code class=&quot;highlighter-rouge&quot;&gt;sys-fs/aufs3&lt;/code&gt;.  This package provides both the
necessary kernel patches and compiles the &lt;code class=&quot;highlighter-rouge&quot;&gt;aufs&lt;/code&gt; module, making it much more
suitable to &lt;code class=&quot;highlighter-rouge&quot;&gt;sys-kernel/vanilla-sources&lt;/code&gt; and the like.  The &lt;code class=&quot;highlighter-rouge&quot;&gt;aufs&lt;/code&gt; module
will only load on a kernel compiled with the AUFS patches.  This ebuild
includes a &lt;code class=&quot;highlighter-rouge&quot;&gt;kernel-patch&lt;/code&gt; use flag that will automatically apply the patches
to &lt;code class=&quot;highlighter-rouge&quot;&gt;/usr/src/linux&lt;/code&gt; at merge time, which is the simplest way to ensure they
are applied.&lt;/p&gt;

&lt;p&gt;Note that in my experience, this method is very human error-prone.  Using
&lt;code class=&quot;highlighter-rouge&quot;&gt;sys-kernel/aufs-sources&lt;/code&gt;, portage tracks the patches.  Using
&lt;code class=&quot;highlighter-rouge&quot;&gt;sys-fs/aufs3&lt;/code&gt;, it’s all up to you.  I wish I could get back the lost time
rebooting into a new kernel only to realize I hadn’t recompiled it again
after re-emerging &lt;code class=&quot;highlighter-rouge&quot;&gt;sys-fs/aufs3&lt;/code&gt;.&lt;/p&gt;

&lt;h1 id=&quot;btrfs&quot;&gt;“btrfs”&lt;/h1&gt;

&lt;p&gt;BTRFS is fun.  It’s speedy, it’s hip, it’s experimental.  The obvious
downside to using it as your Docker backend is that most of us don’t have
our root filesystem on it, which means we either have to reinstall our OS,
make a new partition/drive/loopback for Docker, or choose a different
backend.&lt;/p&gt;

&lt;p&gt;Note that if you &lt;em&gt;do&lt;/em&gt; have BTRFS as your root filesystem, you want to make
sure you &lt;em&gt;do not&lt;/em&gt; use the AUFS backend.  AUFS on top of BTRFS has lots and
lots of strange issues.&lt;/p&gt;

&lt;h1 id=&quot;devicemapper&quot;&gt;“devicemapper”&lt;/h1&gt;

&lt;p&gt;The LVM/devicemapper backend is especially cool because the kernel features
it requires are enabled in a wide variety of pre-compiled kernels, making
this by far the easiest backend to get started with.  Also, it doesn’t
play foul with any known filesystems since it effectively mounts containers
in loopback, avoiding potential issues with filesystems interfering.&lt;/p&gt;

&lt;p&gt;However, unless you configure it to use a raw physical disk partition, the
performance will likely leave much to be desired.&lt;/p&gt;

&lt;h1 id=&quot;vfs&quot;&gt;“vfs”&lt;/h1&gt;

&lt;p&gt;What we lovingly refer to as “vfs” is an interesting driver.  It’s what’s
used for volumes, and is essentially a reference implementation for graph
drivers.  It has no “copy on write” at all, and is essentially just “copy
the entire rootfs for each new layer”, so is perfectly suited for volumes,
but is not at all well-suited for being the general daemon backend.&lt;/p&gt;
</content>
	</entry>

	<entry>
		<id>https://tianon.github.io/post/2014/04/19/getting-high-on-hy</id>
		<link type="text/html" rel="alternate" href="https://tianon.github.io/post/2014/04/19/getting-high-on-hy.html"/>
		<title>Getting High on Hy</title>
		<published>2014-04-19T00:00:00-06:00</published>
		<updated>2014-04-19T00:00:00-06:00</updated>
		<author>
			<name>Tianon Gravi</name>
			<email>admwiggin@gmail.com</email>
			<uri>https://tianon.github.io</uri>
		</author>
		<content type="html">&lt;p&gt;My good friend &lt;a href=&quot;http://pault.ag&quot;&gt;Paul Tagliamonte&lt;/a&gt; recently gave a talk at PyCon
2014 about his language, Hy.  It’s effectively Lisp implemented inside Python
(so cleanly that Python itself doesn’t care to differentiate the result from any
other Python code).&lt;/p&gt;

&lt;p&gt;It’s a solid talk that covers a lot of good ground about some of the cool stuff
you can do with Hy, and especially about the internals of exactly how Hy works,
which is really fascinating stuff.  There’s even a shout-out to our shared love,
&lt;a href=&quot;https://www.docker.io&quot;&gt;Docker&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;The video can be found on
&lt;a href=&quot;https://www.youtube.com/watch?v=AmMaN1AokTI&quot;&gt;YouTube&lt;/a&gt;, but I’ve also embedded
it below for your viewing pleasure.&lt;/p&gt;

&lt;iframe width=&quot;100%&quot; height=&quot;400&quot; src=&quot;//www.youtube.com/embed/AmMaN1AokTI?start=115&amp;amp;html5=1&amp;amp;rel=0&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;p&gt;If you’d like to give Hy a try, you can check it out with
&lt;a href=&quot;http://try-hy.appspot.com&quot;&gt;try-hy&lt;/a&gt;, which is Hy running sandboxed on Google App
Engine so you can play with it freely inside your browser.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/hylang/hy/blob/master/eg/sh/tagwords.hy&quot;&gt;sh/tagwords.hy&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&quot;language-lisp&quot;&gt;;; python-sh from hy

(import [sh [cat grep]])
(print &quot;Words that end with `tag`:&quot;)
(print (-&amp;gt; (cat &quot;/usr/share/dict/words&quot;) (grep &quot;-E&quot; &quot;tag$&quot;)))
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-console&quot;&gt;$ hy sh/tagwords.hy
Words that end with `tag`:
Bundestag
Maytag
Reichstag
Sontag
ragtag
stag
tag
&lt;/code&gt;&lt;/pre&gt;
</content>
	</entry>
</feed>
