Ubuntu, Metal as a Service (MaaS) and Juju

March 27, 2015|Posted in: JuJu, Linux, MaaS

For the last few weeks I have been looking at solutions for managing physical hardware in a remote data center.  I live several hours from the data center, and although we have people who are responsible for purchasing the hardware and installing it, configuring it for use is another story.  The company is small but growing and often needs to respond quickly to new requirements.  Most of our servers run on Ubuntu, and are web, application or database servers.  The ability to remotely manage and configure them would make it much more efficient, as I investigated options I found MaaS.

MaaS seems to be exactly what we need, it will allow you to push out versions of Ubuntu remotely, then in conjunction with Juju load them with the appropriate software.  The installation of MaaS is pretty straight forward and can be done either when the server is built, or added via apt-get later.  In it’s smallest configuration MaaS requires a single server to act as both the Region Controller and the Cluster Controller.  According to the documentation, the best practice is for this MaaS to also control DHCP and DNS.

Armed with this basic knowledge, I added a subnet to my home network, configured a new instance of Ubuntu I chose to configure and install a new MaaS server from the distribution ISO.  After several tries at various settings I had a working MaaS server, and was able to follow the rest of the configuration instructions via the Web GUI.  It was time to deploy my first server instance to my new MaaS cluster, other than a few issues with the old hardware not being able to handle the Wake on Lan signals properly, things went off without a hitch and I had a working server.

Time to log in, according to the documentation my SSH keys that were entered into the GUI would let me in by using SSH to connect to the new machine like this ubuntu@  Of course that didn’t work, after several iterations of installing the MaaS server and building the client it suddenly did start working.  I was finally able to narrow it down to the cut and paste from a terminal window adding line breaks to the key.  Once I joined the lines together into a single line everything was good.

That leaves me with just the last item which is the DNS lookups.  I could ssh by ip from the MaaS server to the generated clients, and vice versa, I could ssh from the clients to the MaaS server by using the server name, what I can’t get working is any form of lookup of a client machine by it’s name in any way shape or form.

I talked to the folks over in the IRC channel for MaaS and they suggested that it was an issue with version 1.5 and suggested installing 1.7 from the PPA.  That is where this story picks up, below are the steps I have taken so far.

  1. Install Ubuntu LTS 14.04
    1. Perform Manual network configuration
    2. IP:
    3. Network Mask:
    4. Gateway:
    5. System Name: Ubuntu
    6. Domain Name: local
    7. No http proxy
  2. sudo apt-get update
  3. sudo apt-get upgrade
  4. sudo apt-get dist-upgrade
  5. sudo reboot
  6. sudo add-apt-repository ppa:maas-stable
  7. sudo apt-get update
  8. ssh-keygen -t rsa
  9. sudo apt-get install maas maas-dhcp maas-dns
  10. configure the ip address of the maas-region-controller to this machine (
  11. create the maas superuser: sudo maas-region-admin createadmin
  12. start the import of the images.
  13. copy the ssh key into the preferences for the user (make sure you don’t have any line breaks!)
  14. configure the cluster
  15. click edit on the Edit Cluster Interface
    1. change Management to  Managed DHCP and DNS
    2. The static IP of the interface is set to the MaaS IP:
    3. The subnet mask:
    4. The broadcast IP:
    5. The router IP:
    6. DHCP Low Value:
    7. DHCP High Value:
    8. Click Save Interface.

Finally with my MaaS server all configured, I enlist my first node, this is a fairly straight forward process and doesn’t require much intervention on my part.  The node is assigned the name of wagon-wheel and the ip address of  From the region/cluster controller, ssh ubuntu@ and I am logged in. Going back to the region/cluster controller, ssh ubuntu@wagon-wheel, unknown host, look at the the node list and try ssh ubuntu@wagon-wheel.maas unknown host, remember I had put in local in the original Ubuntu install ssh ubuntu@wagon-wheel.maas.local and again unknown host.

Admitting defeat, I powered down and called it a night.  I am hoping that someone in the maas freenode chat channel can help.

General purpose computer geek.