This article will show you how to:
Note that all headings are hyperlinks that can be bookmarked.
You should take the following steps before installing MAAS for the first time on a new system:
Make sure that the target system meets the minimum hardware requirements.
Make sure you understand how support works currently, for MAAS 2.7.
- Make sure you uninstall bind9, if it’s running on your system:
a. Check to see if
bind9 is running:
ps aux | grep named
b. If bind9 is running, remove it with the following command:
sudo apt-get remove --auto-remove bind9
This section explains how to:
The following command will give you a clean install of MAAS 2.7:
sudo snap install maas --channel=2.7
MAAS must be initialised prior to use.
To initialise MAAS with a run mode:
- use the
maas initcommand with the specified –mode argument
sudo maas init --mode region+rack
- Answer the prompts in the dialog that appears:
MAAS URL [default=http://10.55.60.1:5240/MAAS]: http://192.168.122.1:5240/MAAS Create first admin account: Username: admin Password: ****** Again: ****** Email: firstname.lastname@example.org Import SSH keys  (lp:user-id or gh:user-id): lp:petermatulis
The MAAS URL sets the API address of one or more controllers. You will use the username and password to access the web UI.
Some modes will additionally ask for a shared secret that will allow the new rack controller to register with the region controller.
To re-initialise MAAS, use the following command:
sudo maas init --mode region+rack
After a snap installation of MAAS, you can verify that the installation was successful with the following command:
sudo maas config
This command should return a sequence similar to the following if MAAS is operating propery:
Mode: region+rack Settings: maas_url=http://192.168.122.1:5240/MAAS
You can check the status of running services with:
sudo maas status
Sample output should look something like this:
bind9 RUNNING pid 7999, uptime 0:09:17 dhcpd STOPPED Not started dhcpd6 STOPPED Not started ntp RUNNING pid 8598, uptime 0:05:42 postgresql RUNNING pid 8001, uptime 0:09:17 proxy STOPPED Not started rackd RUNNING pid 8000, uptime 0:09:17 regiond:regiond-0 RUNNING pid 8003, uptime 0:09:17 regiond:regiond-1 RUNNING pid 8008, uptime 0:09:17 regiond:regiond-2 RUNNING pid 8005, uptime 0:09:17 regiond:regiond-3 RUNNING pid 8015, uptime 0:09:17 tgt RUNNING pid 8040, uptime 0:09:15
It is also possible to re-initialise MAAS to switch modes. For example, to switch from
sudo maas init region
The MAAS command takes additional
init options; see the MAAS installation technical reference for details.
snap-3-0-ui snap-3-0-cli -->
Once you’ve successfully installed MAAS (regardless of method), you can now login here:
where $API_HOST is the hostname or IP address of the region API server, which was set during installation. You will see a screen like this:
Log in at the prompts, with the login information you created when initialising MAAS.
After a fresh MAAS installation, the web UI presents a couple of welcome screens. From these screens, you can set many system-wide options, including connectivity, image downloads, and authentication keys.
Your main concerns for this experiment are the DNS forwarder, the Ubuntu image import section, and the SSH public key, though you might want to set the region name to something memorable, since this text will appear at the bottom of every MAAS screen in this install domain. Set the DNS forwarder to something obvious, e.g.,
220.127.116.11, Google’s DNS server. Set this to your own internal DNS server if you know the IP address.
Select an Ubuntu image to import, noting that you may be required to select at least one LTS version, depending upon the version of MAAS that snap installed. In this example, we’ve already chosen an image, and downloading is partially complete.
When you click on “Continue,” the screen will shift to a screen labelled, “SSH keys for admin:”
In the source drop-down, select “Launchpad,” “Github,” or “Upload.” If you choose one of the first two, you will need to enter your username for that service. For example, if you want to upload your SSH public key from Launchpad, you would enter:
Likewise, if you want to upload your github public SSH key, you would enter:
If you want to use your existing public key from your home directory, you can select “Upload”and then copy your entire public key from
.ssh/id_rsa.pub (or wherever you may have stored the key):
and paste it into the block labelled “Public key.” Finally, press the “Import” button to import this key:
With this complete, you’ll see that MAAS has been successfully set up. Click ‘Go to the Dashboard’ to proceed.
Note that you may have to wait a few moments for your selected images to sync locally.
Before moving forward with MAAS, you’ll want to enable DHCP. You can do this very easily from the web UI by selecting “Subnets” from the top menu, choosing the VLAN on which you want to enable DHCP, and select the button marked, “Enable DHCP.”
The Dashboard landing page lists non-registered devices that MAAS detected automatically on the network. This network discovery process allows you to easily add or map devices already connected to your network – devices that you may not necessarily want to manage with MAAS.