Ubuntu, Metal as a Service (MaaS) and Juju
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 email@example.com. 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.
- Install Ubuntu LTS 14.04
- Perform Manual network configuration
- IP: 192.168.2.200
- Network Mask: 255.255.255.0
- Gateway: 192.168.2.1
- System Name: Ubuntu
- Domain Name: local
- No http proxy
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get dist-upgrade
- sudo reboot
- sudo add-apt-repository ppa:maas-stable
- sudo apt-get update
- ssh-keygen -t rsa
- sudo apt-get install maas maas-dhcp maas-dns
- configure the ip address of the maas-region-controller to this machine (192.168.2.200)
- create the maas superuser: sudo maas-region-admin createadmin
- start the import of the images.
- copy the ssh key into the preferences for the user (make sure you don’t have any line breaks!)
- configure the cluster
- click edit on the Edit Cluster Interface
- change Management to Managed DHCP and DNS
- The static IP of the interface is set to the MaaS IP: 192.168.2.200
- The subnet mask: 255.255.255.0
- The broadcast IP: 192.168.2.255
- The router IP: 192.168.2.1
- DHCP Low Value: 192.168.2.100
- DHCP High Value: 192.168.2.150
- 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 192.168.2.102. From the region/cluster controller, ssh firstname.lastname@example.org 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 email@example.com unknown host, remember I had put in local in the original Ubuntu install ssh firstname.lastname@example.org 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.