2. Installing and Configuring Ubuntu

Once you’ve assembled the basic hardware for your MAAS server system, you can begin preparing it. The initial steps involve installing Ubuntu and setting up its most basic network settings.

This guide assumes the use of Ubuntu Server 22.04 and MAAS 3.4.1. Although other versions of Ubuntu and MAAS may work, some details will differ.

2.1. Install Ubuntu Server

  1. Download the Ubuntu Server 22.04 image from https://cdimage.ubuntu.com/ubuntu-server/daily-live/current/.

    Be sure to download the live server version. Any version within the 22.04 series should work, but 22.04.1 was used in developing this document. Using the latest available point release is recommended.

  2. Install Ubuntu 22.04 (Jammy Jellyfish) to the server system.

    Ubuntu may need access to several network sites in order to function properly. These include repositories at archive.ubuntu.com (or a regional mirror), Ubuntu’s PPA site at ppa.launchpad.net, and Ubuntu’s key server at keyserver.ubuntu.com. (You may instead use local mirrors of the archive and PPA sites.) If your site implements strict outgoing firewall rules, you may need to open access to these sites on ports 80 and/or 443.

    1. When you boot the installation medium, you should select the “Try or Install Ubuntu Server” option, not any other option.

    2. On the Network connections screen, configure your network ports:

      • Configure your external network port:

        • If your MAAS server’s network devices vary in speed or reliability, use the slower or less reliable device as the external port. This guide assumes this port will be called eth1, but in practice it’s likely to be something else.

        • Use DHCP or a static IP address, as required by your environment.

        • If you use a static configuration, provide a gateway and DNS server, if possible.

        • In most cases, no explicit configuration of the external port is necessary because the Ubuntu Server installer will have set it up to use DHCP, which is appropriate. You can adjust it if necessary, though.

      • Configure your internal network port:

        • If your MAAS server’s network devices vary in speed or reliability, use the faster or more reliable device as the internal port. This guide assumes this port will be called eth0, but in practice it’s likely to be something else.

        • This guide assumes use of a static IP address of 172.24.124.1/22 on this port; however, you can use a different network address, if desired or necessary.

        • Using a /22 or wider network is advisable for the internal network, for reasons described in Appendix C: MAAS Network Ranges.

        • If your MAAS server will move from one external network to another, be sure to consider all its likely external addresses when deciding on its internal address and netmask.

        • Avoid the 10.0.3.0/24 address range, because Ubuntu server uses this address range for its LXC container tool.

        • Do not set a gateway or DNS server on the internal network port.

      • If you can’t easily differentiate the two ports during installation, you can configure one or both of them after completing the Ubuntu installation. Ubuntu uses NetPlan for network configuration; see https://wiki.ubuntu.com/Netplan/Design and https://netplan.io for details.

      • The network configuration screen resembles Figure 2. In this example, enp0s3 is the internal port (eth0) and enp0s8 is the external port (eth1).

        The network can be configured during installation.

        Figure 2: The network can be configured during installation.

    3. Configure the disk storage and other options as you see fit.

    4. If you plan to mirror the Ubuntu archives locally, ensure you have enough space in the /srv directory to hold your mirrors. As a general rule of thumb, you should set aside about 200 GiB per release. In most cases, a 1 TB disk dedicated to this task works well. If necessary, mount an extra disk at /srv to hold your repository mirror. (You can do this after installing Ubuntu, if you like.)

  3. When the installation is complete, reboot the computer and log in.

2.2. Configure network

  1. In a terminal, run ip address to verify your network configuration.

    A typical configuration should look something like this, although likely with different network device names (eth0 and eth1 here), possibly different IP addresses, and perhaps with more or fewer options:

    network:
      ethernets:
        eth0:
          match:
            macaddress: 24:8a:07:a3:18:fc
          addresses:
          - 172.24.124.1/22
          nameservers:
            addresses: []
            search: []
          mtu: 9000
        eth1:
          dhcp4: true
      version: 2
    
  2. If either network port is not properly configured, edit the configuration file in /etc/netplan/. This file may be called 00-installer-config.yaml, 01-netcfg.yaml, or something else; the name depends on the installation method.

  3. If your network includes any high-speed network devices (above 10 Gbps), you may need to add mtu: 9000 to that device’s configuration, and possibly tie the definition to a specific MAC address, as shown in the eth0 definition.

    Additional information on testing with such devices is in Appendix D - Network Performance Tuning.

  4. If you need to change the network configuration, type sudo netplan apply or reboot the computer to apply the changes.

2.3. Update system software

Update the software on your system to the latest versions available:

$ sudo apt update
$ sudo apt dist-upgrade

2.4. Install desktop (optional)

  1. If desired, install X11 and your preferred desktop environment. This will enable you to use the MAAS computer itself to access the MAAS web UI. You can skip this step if your MAAS server will be accessed remotely. If in doubt, don’t install X11 and a desktop environment. You can always install it later if you discover it’s necessary. In most cases, you can install X11 and the desktop environment with a single command, such as the following to install GNOME desktop for Ubuntu 22.04:

    $ sudo apt install vanilla-gnome-desktop
    
  2. Reboot the computer. This enables you to begin using your updated kernel (if it was updated) and ensures that your network settings will survive a reboot.