MAAS installation (deb/2.9/UI)

2.7 2.8 2.9 3.0
Snap CLI ~ UI CLI ~ UI CLI ~ UI CLI ~ UI
Packages CLI ~ UI CLI ~ UI CLI ~ UI CLI ~ UI

This article will show you how to:

  1. Determine the minimum hardware requirements for MAAS
  2. Install MAAS in various configurations and verify your work
  3. Configure your MAAS installation and get it running

All of the headings in this page are anchored and linked, so that you can bookmark them. Feel free to use these headings to customize your own bookmark folder on your browser toolbar: this may save you time working with MAAS later.

MAAS hardware requirements

The minimum requirements for the machines that run MAAS vary widely depending on local implementation and usage. Below, you will find resource estimates based on MAAS components and operating system (Ubuntu Server). We consider both a test configuration (for proof of concept) and a production environment.

Two questions you might have about hardware requirements:

  1. What are the requirements for a test environment?
  2. What are the requirements for a production environment?

Requirements for a test environment

Here is a proof-of-concept scenario, with all MAAS components installed on a single host. This scenario assumes two complete sets of images (latest two Ubuntu LTS releases) for a single architecture (amd64).

Memory (MB) CPU (GHz) Disk (GB)
Region controller (minus PostgreSQL) 512 0.5 5
PostgreSQL 512 0.5 5
Rack controller 512 0.5 5
Ubuntu Server (including logs) 512 0.5 5

Based on this table, the approximate requirements for this scenario are 2 GB memory, 2 GHz CPU, and 20 GB of disk space.

Requirements for a production environment

Here is a production scenario designed to handle a high number of sustained client connections. This scenario implements both high availability (region and rack) and load balancing (region). MAAS reserves extra space for images (database and rack controller), while some images, such as those for Microsoft Windows, may require a lot more – so plan accordingly.

Memory (MB) CPU (GHz) Disk (GB)
Region controller (minus PostgreSQL) 2048 2.0 5
PostgreSQL 2048 2.0 20
Rack controller 2048 2.0 20
Ubuntu Server (including logs) 512 0.5 5

So, based on the above, the approximate requirements for this scenario are:

  1. A region controller (including PostgreSQL) installed on one host, with 4.5 GB memory, 4.5 GHz CPU, and 45 GB of disk space.
  2. A duplicate region controller (including PostgreSQL) on a second host, also with 4.5 GB memory, 4.5 GHz CPU, and 45 GB of disk space.
  3. A rack controller installed on a third host, with 2.5 GB memory, 2.5 GHz CPU, and 40 GB of disk space.
  4. A duplicate rack controller on a fourth host, also with 2.5 GB memory, 2.5 GHz CPU, and 40 GB of disk space.

The tables above refer to MAAS infrastructure only. They do not cover the resources needed by subsequently-added nodes. Note that machines should have IPMI-based BMC controllers for power cycling, see Power management for more details.

Some examples of factors that influence hardware specifications include:

  1. the number of connecting clients (client activity)
  2. how you decide to distribute services
  3. whether or not you use high availability/load balancing.
  4. the number of images that you choose to store (disk space affecting PostgreSQL and the rack controller)

Also, this discussion does not take into account a possible local image mirror, which would be a large consumer of disk space.

One rack controller should only service 1000 machines or less, regardless of how you distribute them across subnets. There is no load balancing at the rack level, so you will need additional, independent rack controllers. Each controller must service its own subnet(s).

How to install MAAS

Upgrade MAAS 2.8 to MAAS 2.9

MAAS 2.8 is the last supported version for Ubuntu 18.04 LTS. Newer versions of MAAS will not be back-portable, and consequently, to upgrade to MAAS 2.9 and all future versions, you will also need to upgrade the base operating system to Ubuntu 20.04. You do these two operations all at once, with the following procedure:

sudo add-apt-repository ppa:maas/2.9

You will get a message similar to this:

 For stable releases of 2.9.x
 More info: https://launchpad.net/~maas/+archive/ubuntu/2.9
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://ppa.launchpad.net/maas/2.8/ubuntu bionic InRelease          
Hit:3 http://archive.ubuntu.com/ubuntu bionic InRelease                  
Hit:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease                                     
Ign:5 http://ppa.launchpad.net/maas/2.9/ubuntu bionic InRelease          
Hit:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease        
Err:7 http://ppa.launchpad.net/maas/2.9/ubuntu bionic Release                 
  404  Not Found [IP: 91.189.95.85 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/maas/2.9/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

This message seems to indicate that nothing happened, but, in fact, this command still creates the file:

/etc/apt/sources.list.d/maas-ubuntu-2_9-bionic.list

This file identifies the path to the 2.9 PPA, even though it incorrectly implies there’s a Bionic release there:

deb http://ppa.launchpad.net/maas/2.9/ubuntu bionic main

Still, that’s enough for do-release-upgrade to figure out that there is a 2.9 PPA, and when it checks, it will find a Focal version of MAAS, which it will bring over and install in place of 2.8. It isn’t necessary to stop MAAS or do anything else, except go ahead and run the upgrade:

sudo do-release-upgrade --allow-third-parties

This command will produce a lot of output, ask you a few questions (for which the defaults are usually fine), and eventually ask you to reboot. Once your machine has come back up, you can check whether your upgrade has been successful by entering:

lsb_release -a

If the ugprade was successful, this command should yield output similar to the following:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

You have now upgraded to the Ubuntu 20.04 LTS base, and if you check your running MAAS install, you should see that the version has been updated to the latest stable 2.9 release.

Installing MAAS 2.9 fresh

The recommended way to set up an initial MAAS environment is to put everything on one machine:

sudo apt-get -y install maas

Executing this command leads you to a list of dependent packages to be installed, and a summary prompt that lets you choose whether to continue with the install:

Choosing “Y” proceeds with a standard apt package install.

Distributed environment

For a more distributed environment, you can place the region controller on one machine:

sudo apt install maas-region-controller

and the rack controller (see Rack controller for details) on another:

sudo apt install maas-rack-controller
sudo maas-rack register

These two steps will lead you through two similar apt install sequences.

Creating a MAAS user

Finally, you will need to create a MAAS administrator user to access the web UI:

sudo maas createadmin --username=$PROFILE --email=$EMAIL_ADDRESS

For example, the process might go like this:

The username can be anything. You will also be prompted to supply a password for the user. The command option --password=$PASSWORD can be used to specify one but, depending on your environment, this may pose a security risk.

At this time, MAAS does not make use of the email address. However, it may do so in the future.

Finally, the createadmin option asks for an SSH key:

If you have an SSH key associated with your launchpad or github accounts, you can enter the username here to include the key. For launchpad, just enter lp:username, and for github, enter gh:username at the prompt. In both cases, the actual username has to be supplied after the lp: or gh: prefix.

If you don't have a key associated with either of these services, you will have an opportunity to paste your public key into the MAAS SSH key list, after you've started MAAS for the first time as part of the welcome screens.

Next steps

Once you have installed your MAAS environment (region + rack controller) and any possible extra rack controllers(s), you are ready to begin your Configuration journey.

How to configure MAAS

Once you’ve successfully installed MAAS (regardless of method), you can now login here:

http://${API_HOST}:5240/MAAS

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.

Configuration

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., 8.8.8.8, 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:

lp:<username>

Likewise, if you want to upload your github public SSH key, you would enter:

gh:<username>

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.

Enabling DHCP

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.”

Networking

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.

Network discovery can be disabled at any time from the button on the Dashboard view. Also note that you can get back to the dashboard at any time by clicking the MAAS logo.

Spaces, fabrics, zones and subnets

Networks in large data centres can be very complex. MAAS offers comprehensive control over networking so that you have the flexibility to reconfigure racks and deploy machines as you see fit. You can isolate machine deployment not only with DNS domains, but also via subnets, spaces, zones, and fabrics. The links provide more details, but these are all basically collections:

  • subnet has the traditional meaning: a range of IP addresses covering a subset of IP addresses. Generally speaking , a subnet is a collection of IP addresses which includes at least two addresses.
  • a space is a collection of subnets that you can create with MAAS, understanding that each subnet can belong to only one space. Spaces allow multiple subnets to communicate without requiring a direct network path between them.
  • a zone is also an ad-hoc collection, but one which groups individual nodes, rather than subnets. MAAS allows you to create and edit zones at will.
  • a fabric is essentially a collection of trunked switches, allowing you to access a group of VLANs.

Here is a diagram that helps to illustrate these concepts:

Be aware that these network settings are spread across several web UI configuration pages. The Zones page, for example, enables you to see how many machines, devices and controllers are using a zone, and allows you to add and edit zones. The Subnets page, shown below, provides access to fabric, VLAN, subnet and spaces configuration.

Deployment

MAAS-managed machines are listed – and operated on – from the Machines page, making it one of the most important screens in the MAAS web UI:

If you are testing MAAS using virtual machines, the machines appear here as soon as they boot. New machines are added automatically when they first connect to your network. Alternatively, the ‘Add hardware’ menu lets you add machines manually, via their MAC address.

After you configure power and interfaces, MAAS must commission machines to retrieve CPU, memory and storage information. From this point, you can command MAAS to acquire, test, deploy and release these machines as you work with your MAAS cloud.

While you are testing MAAS, be sure to check out filters, which can narrow your view based on both tags and hardware characteristics. You can select and manage machines in either filtered or full views.

Images

When it comes to running applications, MAAS can easily deploy any supported variant of Ubuntu, including LTS and non-LTR versions for x86, ARM, PPC and s390x systems. You can also deploy several other operating systems to your machines, including CentOS 7, CentOS 6, Windows, RHEL, and ESXi images, via Ubuntu Advantage^.

VM hosts

VM hosts can give you greater control over your hardware. A VM host is a collection of individual virtual machines. You can use a VM host to compose machines into an abstraction of resources that functions like a physical machine – without building one!

It’s easy to add a virsh VM host: click the “Add KVM” button on the “KVM” page of the web UI, give the VM host a name, and select virsh or lxd as the VM host type. You will also need to enter the address for the KVM host: in the case of virsh, this address looks something like qemu+ssh://<yourusername>@10.249.0.2/system, with password equal to the password for <yourusername>; if you’re using lxd, this address will be the IP of the LXD bridge gateway (.1), with the password being the trust password you entered when initializing LXD.

After you create a VM host, you compose hardware by selecting the VM host, and then selecting “Compose” from the Action menu. You can configure composed hardware as desired, including the number of cores, CPU speed, RAM and combined storage. Then just click “Compose machine”, and MAAS will combine resources to create a new, single entity that can be used just like any other machine. VM hosts abstract multiple resources:

into pools of composable hardware:

There you have it: A quick tour of MAAS and its capabilities. Read on through the documentation to learn more.