Kristian Glass - Do I Smell Burning?

Mostly technical things

Containerised Home Server With Docker Compose and Traefik

I’m a big advocate of using services like Heroku or AWS Elastic Beanstalk rather than running your own servers where you can, but sometimes it’s the right thing to do. For my home automation setup, I want to keep as much of it on the local network as possible, so this was definitely one of those situations.

So I bought an Intel NUC – it’s small, fairly quiet so I can run it indoors, and yet fairly powerful (Core i5, 4GB RAM, 1TB HDD in the one I bought).

I want Infrastructure as Code. I want a documented reproducible version-controlled setup. One perspective is that this is overkill for “just a home server” – my position is that it’s even more necessary, because I’m going to fiddle with it sporadically, it’s highly unique, and it’s only me maintaining it. However I still want a fairly minimal setup.

In the past I’ve done things like writing a bunch of Puppet or Ansible and/or running a suite of VMs, but this can get tedious fast – hoping that a module exists, handling dependencies, encoding installation instructions as config management, etc.

What I really want is akin to a self-hosted PaaS that I can easily deploy on a single box, and that allows me to define apps declaratively.

Thanks to Docker, Docker Compose, Traefik, and a bit of systemd config, that’s fairly straightforward!

Handling .local Hostnames - Multicast DNS

DNS is great. Having to remember IP addresses sucks.

Being able to plug in a device to my home network, give it a name, then be able to reach it as $name.local? That’s great. (One day I’ll set up local authoritative DNS but realistically that’s unlikely to happen soon)

How does that work though? And what do you do when it doesn’t?

Taking a Break

In February 2015 I became LaterPay’s CTO, got to hire and work with some amazing people, and do some awesome stuff.

Three and a half years later, it was time for me to move on.

Altered Carbon

Based on Richard Morgan’s book of the same name, Netflix’s Altered Carbon is “dystopian science fiction cyberpunk” that looks at life, thrills and crimes in a world where bodies are just “sleeves”, and consciousness is stored in a small disk embedded in the spine.

It’s dark, it’s graphic, and it’s gripping.

Image Metadata, GPS Location, Exif Tags and Privacy Leaks

Images can contain metadata. This is useful for things like “when was this photo taken?” or information about the camera, or a text description of what the image contains.

Many cameras (e.g. your iPhone) will include GPS coordinates of where the photo was taken. This is useful for things like “where were we when we had that amazing pizza?” or “where was that beautiful sunset??”.

This is much more problematic when the selfie you just shared includes the precise location of your home.

Connect Together Your Smart Home With Home Assistant

From my smart home user-stories:

For my home, I want a centralised abstracted event hub for connecting sensor/actor devices together, so I can separate “automation logic” from “interfacing code” – even better if the interfacing code is done for me!

Home Assistant handles this nicely.

Previously I’d been wiring things together in a very ad-hoc fashion. My “smart doorbell” had the logic to connect to Slack and SES to send me notifications, my cameras had similar logic replicated, et cetera. Event-handling and automation code lived on each device, and coordinating and managing it all was a pain.

Enter Home Assistant, which acts as a generalised abstraction layer and centralised event-bus between all the things.

You tell it about your devices (“components” – it has support for nearly a thousand), it provides you with a nice interface for manual control, and powerful but easy-to-write “automations” to hook everything together.

Packaging Django With Docker

I love Docker as a packaging system – almost everything I push to production nowadays is as a Docker image.

Occasionally in the #django IRC channel, the topic of “how to Docker-ise your Django service” comes up. Here’s the Dockerfile I use, taken from My Django Project Template: