Introduction (DRAFT)

This page aims to help someone set up MAAS in a standalone virtual machine using libvirt and has been tested on 12.04 LTS. MAAS should be accessible to other virtual machines in the libvirt network (ie, the one that the MAAS vm is on). Other machines on the libvirt network should be able to use juju or the maas cli tool to interface with the MAAS vm. Note, this is not intended to by a guide for a production deployment of MAAS.

The basic idea is this:

The MAAS server runs in a VM within libvirt

The MAAS server is configured as a DNS, DHCP and TFTP server

4 nodes are added and enlisted via the MAAS web interface

Users and their ssh public keys are added via the MAAS web interface

Users interface with MAAS via juju or the MAAS cli tool to start nodes (understanding that the user must create/start these nodes with PXE booting via virt-manager to simulate wake on lan, etc

VM host configuration

Created a VM with enough memory and disk space. The VM should have (at least) the following characteristics):

1024M RAM

20G disk

Add a few firewall rules to make sure that the host's dnsmasq does not interfere with the MAAS server's dnsmasq (e assume the following MAC addresses for the 4 nodes throughout: AA:BB:CC:DD:EE:F0 AA:BB:CC:DD:EE:F1 AA:BB:CC:DD:EE:F2 AA:BB:CC:DD:EE:F3):

Users

Add non-admin users to MAAS via the web interface. These should match the usernames of the users running juju or the MAAS cli client

Add the user's ssh key to MAAS via the web interface:

Login as the user

Click on the username in the upper left and select Preferences

Add the ssh key

Nodes

We need to add the nodes to MAAS before using them. For each of our predefined MAC addresses (the ones we added ebtables rules for above. Ie, AA:BB:CC:DD:EE:F0, AA:BB:CC:DD:EE:F1, AA:BB:CC:DD:EE:F2, AA:BB:CC:DD:EE:F3):

Click 'Add node' on the front page of the web interface. NOTE: if adding a node with a non-admin user, you will have to login as an admin user and accept the enlistment for each added node.

Add the node using the MAC address, but for now specify the hostname to be 'node-<mac address without colons>' (eg node-aabbccddeef0). MAAS by default creates hostnames in this manner, but adds '.local'. We want to strip .local off of the hostname since dnsmasq does not seem to be working with avahi properly (FIXME)

Choose the architecture to use

Use defaults for everything else

IMPORTANT: do not start the nodes in virt-manager yet or via MAAS. You will need to use juju or the MAAS cli client first, then start the node manually in virt-manager.

add several nodes through the MAAS web interface, and accept them as enlisted, but don't start them yet.

Since these are all virtual machines and do not respond to wake-on-lan, we need to simulate that. So after each juju command that starts an instance, we first run the command, then go into virt-manager to start it. Eg:

If you get errors here, check that you added your nodes to MAAS already.

In virt-manager, create and PXE boot a machine with MAC aa:bb:cc:dd:ee:f0. You should see it get an IP address in our range and get its image (viewing the squid-deb-proxy should show it is fetching packages)