By this stage, you should have:
- maas power installed and running on your control server
- a network with your RPi(s) & control server connected to it
- RPis configured with UEFI on their SD cards, and a USB stick attached
- a router with internet access on the network, and with DHCP server disabled on it’s LAN port
- MAAS installed and configured on your control server
This means you’re ready to try commissioning and deploying Ubuntu to the RPIs using MAAS!
Restart your RPi(s). It might pay to watch them boot using a screen. You should see output similar to the below photos:
After awhile, you should see your RPi show up in MAAS as a new machine:
Configure the power driver
For MAAS to control the power status of the RPi, we need to configure it with a webhook driver that will use the maas power service we created earlier. Click on the machine, then configuration and edit beside the power configuration:
Select webhook, and then fill in the details which should match the maas power configuration we setup earlier (note, in the example below we are using rpi2 in the path, as this is the second RPi being added). Save the changes when finished:
Check if the power control is working by returning to the machines screen and under the power column clicking check power:
The power status should change to either On or Off.
Now set the power to off. Then select the RPi (tick box), and click take action and commission.
After this, you should see the RPi turn on, and MAAS will report that it has started commissioning:
You should see a similar boot process on the screen for your RPi.
After awhile, under the machine details screen → commissioning tab, you should see the following:
Do not proceed until removing the SD card configuration from MAAS!
It is VERY IMPORTANT that you remove the SD card partitions and the physical drive itself from the storage section for the RPi, otherwise, MAAS will try to overwrite the UEFI that we installed earlier.
If you accidentally deploy without doing this, you will have to rebuild UEFI on the SD card and reconfigure it.
This next part is a little bit tricky, but our goal is to make MAAS forget about the SD card.
Remove the partitions:
Once they are removed the screen should look like this:
Under available disks and partitions, remove the sd card:
Now click change storage layout, set it to flat, and you should see your USB drive under file systems. Note, there should be no mention of the sd card anymore on this screen.
Now the RPi is ready to deploy, return to the machine listing page, select the RPi, and click deploy under Take action:
Exciting times ahead - we’re almost done deploying our first RPi with MAAS! Ensure that the focal hwe kernel is selected and click Start deployment for machine:
While it’s deploying (which may take awhile), you should see status changes on the machine listing page:
When the deployment is finished, the RPi will restart. You should also see that it successfully deployed from the machine details page:
You should now be able to ssh to the RPi from your control server where you generated your ssh keys (you can always see the IP address assigned from the MAAS machine listing page):
Congratulations! You have your first RPi now under the control of MAAS!
Repeat this process for each RPi. Once they are all commissioned and you have edited the storage configuration (in particular, removing the SD card configuration), you are able to re-deploy them whenever you want using MAAS!
You’re now ready to install anything you want on your RPi cluster.