Portrait of Martijn

Metal as a Service

25 Apr 2012

There was some hype around Canonical's "Metal as a Service" (MAAS) a few weeks back. Coverage:

But what actually is it?

Datacenter system administrators have for years used PXE to do remote automated installs of machines. See Debian's "Setting up a server for PXE network booting", Ubuntu's "PXE Install Server", Redhat's "Kickstarting a Machine" and Solaris "JumpStart".

The way that works is that when a server boots:

  • its BIOS looks for a DHCP server, and gets some parameters like IP address and the address of a TFTP server
  • gets a config file from the TFTP server with a boot menu
  • executes a chosen selection from the menu (or a default) which then downloads the OS installer and installs it on the machine
  • then the machine reboots, and starts into its own OS
  • you can also preconfigure different configs for specific machine ethernet MAC addresses

Which is all great, but fiddly to setup and painful to maintain.

PXE itself doesn't address OS configuration or package installation, but you can script that in various ways. Traditionally it involves making a custom installer, configuring package selection mechanisms like Debian Preseed, and executing scripts at first boot from /etc/init.d or cloudinit or similar.

Newer tools help here. From Redhat pedigree comes Cobbler (see Start Here and Cobbler: How to set up a network boot server in 10 minutes) which lets you define profiles for different types of machines or roles, and then use kickstart templates to do appropriate installs (example) to perform custom installation in the target. Ubuntu 11.10 introduced Orchestra (See Dustin Kirkland's "Getting Started with Ubuntu Orchestra"), the predecessor of MAAS.

So, MAAS is basically a Web interface that does the PXE/DHCP server config for you, manages the install ISOs, and integrates with Juju (Docs) for role based package management on the nodes. Juju is more analogous to Chef: you can define "Nodes", which run "charms" defining services, but it also deals with "relations" dependencies between nodes, somewhat like AWS CloudFormation. I wonder how that deals with staged provisioning and metadata sharing.

Some interesting aspects are the use of "wake on LAN" to remotely switch machines on, and the ability to use this for LXC. If you just want to test, TestingMAAS explains a VM-based setup.

I don't support any large scale hardware deployments currently, so I'm not really in the target market for MAAS. For my EC2 customer deployments I don't think MAAS is particularly useful; though Juju may be. For my office lab I can imagine MAAS being convenient: I could run the MAAS server in a KVM VM, then use it to install my physical lab servers for specific test projects. Definitely something for the list of weekend projects.

Ubuntu 12.04 "Precise Pangolin" has the latest support for the above and should be available form April 26th.