Errors or typos? Topics missing? Hard to read? Let us know.
Install MAAS (snap or packages)
-
Install from snap:
sudo snap install --channel=<version> maas
Replace
<version>
with the desired MAAS version. -
Install from packages:
sudo apt-add-repository ppa:maas/<version> sudo apt update sudo apt-get -y install maas
Set up a proof of concept (POC)
There is a proof-of-concept configuration defined for the MAAS snap version only. To initialise the MAAS snap in this POC configuration, use the --help
flag with maas init
and follow the instructions. This POC uses the maas-test-db
.
Set up MAAS for production
-
Disable conflicting NTP:
sudo systemctl disable --now systemd-timesyncd
-
Configure PostgreSQL for production:
sudo apt install -y postgresql sudo -i -u postgres psql -c "CREATE USER \"$DBUSER\" WITH ENCRYPTED PASSWORD '$DBPASS'" sudo -i -u postgres createdb -O "$DBUSER" "$DBNAME"
-
Edit
/etc/postgresql/14/main/pg_hba.conf
, adding a line for the newly created database:host $MAAS_DBNAME $MAAS_DBUSER 0/0 md5
-
Initialize MAAS with the database:
sudo maas init region+rack --database-uri "postgres://$DBUSER:$DBPASS@$HOSTNAME/$DBNAME"
-
Create an admin user:
sudo maas create admin --username=$PROFILE --email=$EMAIL_ADDRESS
Notes
- For PostgreSQL 12 users, upgrade to PostgreSQL 14 before installing MAAS 3.5+.
- Review the new PostgreSQL requirements in the installation requirements document before installing MAAS.
- For Ubuntu 20.04 LTS users, upgrade to Ubuntu 22.04 before moving to MAAS 3.5+.
- Always back up your MAAS server before upgrading.
Configure and start MAAS
Check MAAS status
To check the status of MAAS services, use:
sudo maas status
Output example:
bind9 RUNNING pid 7999, uptime 0:09:17
dhcpd STOPPED Not started
postgresql RUNNING pid 8001, uptime 0:09:17
...
Configure MAAS
UI
- Access the UI:
http://$API_HOST:5240/MAAS
Log in with the credentials created during installation. - DNS forwarder: Set to a suitable value (e.g., 8.8.8.8).
- Image import: Select at least one Ubuntu LTS image.
- SSH key import: Choose between Launchpad, GitHub, or upload a key from
.ssh/id_rsa.pub
.
CLI
- Login:
maas login $PROFILE $MAAS_URL $(cat api-key-file)
- Configure DNS:
maas $PROFILE maas set-config name=upstream_dns value="8.8.8.8"
- Add SSH key:
maas $PROFILE sshkeys create "key=$SSH_KEY"
Enable DHCP
See Enable MAAS DHCP for instructions.
Last updated 10 hours ago.