Type driven configuration management with Propellor

Presented by Joey Hess
Wednesday 2:15 p.m.–3 p.m.
Target audience: User

Abstract

The configuration of Linux hosts has become increasingly declarative, managed by tools like Puppet and Ansible, and by the composition of containers. But if a server is a collection of declarative properties, how do you make sure that changes to that configuration make sense? You can test them, but eventually it's 3 AM and you have an emergency fix that needs to go live immediately.

Data types to the rescue! While data types are usually used to prevent eg, combining an Int and a Bool, they can be used at a much more abstract level, for example to prevent combining a property that needs a Debian system with a property that needs a Red Hat system.

Propellor leverages Haskell's type system to prove the consistency a host's configuration before deploying it. I'll show how Propellor started with a simple type for its properties, and increasingly refined the types as Propellor was developed, with the goal of catching as many configuration problems as possible, before the configuration gets deployed to the hosts. All the way up to type level detection of port conflicts!

Propellor doesn't stop at configuring the top level of a host. It can reach inside containers on the host, and configure them using the same properties that can be used at the top level. It can create and manage chroots, docker containers, and systemd machines. A container defined in Propellor can be added to the multiple hosts, or moved between hosts by cutting and pasting a line in the config file. Propellor applies the same type-level checks to the properties of containers as to the properties of hosts.

Going further, Propellor can create bootable disk images for a host. This unifies initial installation with ongoing configuration of a host. This is particularly useful for managing the configuration of embedded Linux systems, which are often painful to install interactively.

This talk is full of examples of Propellor configuration in Haskell, but no knowledge of Haskell is required.

Presented by

Joey Hess

Joey has been developing Free Software for 20 years. He is best known for his long involvement in the Debian project, where he led the development of the Debian Installer, and created Debian tools like alien, debhelper, debconf, and pristine-tar. Outside the Debian project, Joey's best known free software projects include git-annex, ikiwiki, and etckeeper. He lately uses Haskell for most projects.

Joey lives deep in the woods in the Appalachian mountains of Tennessee, subsisting on solar power and communicating largely through git pull and push over a dialup modem line.

©2016 Linux Australia and linux.conf.au 2017. Linux is a registered trademark of Linus Torvalds. Site design by Takeflight. Image credits can be found on our Colophon.