Installation and Configuration of MAAS (Metal as a Service) on Ubuntu 22.04 LTS
06/12/2023 - 3 phút
Step 1: Install postgresql 14, create database and user for MAAS
You can refer to this post: Install and configure PostgreSQL 14 on Ubuntu 22.04 LTS
Step 3: Install MAAS
sudo snap install --channel=3.4 maas
When installing MAAS on Ubuntu, there may be conflicts between the current NTP client, systemd-timesyncd
, and the NTP client/server provided by MAAS, chrony. This can lead to time synchronization issues, especially if MAAS is configured with different upstream NTP servers than those used by systemd-timesyncd
. To avoid conflicts, users can manually disable and stop systemd-timesyncd
with the following command:
sudo systemctl stop systemd-timesyncd
sudo systemctl disable systemd-timesyncd
Step 4: Initialize MAAS
$MAAS_DBUSER = "myuser"
$MAAS_DBPASS = "mypassword"
$MAAS_DBNAME = "mydatabase"
$HOSTNAME = "localhost"
sudo maas init --mode all --database-uri "postgres://$MAAS_DBUSER:$MAAS_DBPASS@$HOSTNAME/$MAAS_DBNAME"
--mode all
will initialize MAAS with all services, including DHCP and DNS.--database-uri
will declare the path to the MAAS database. This path is in the formpostgres://<username>:<password>@<hostname>/<database_name>
Use the command to check the status of MAAS
sudo maas status
Step 6: Create a user account for MAAS
sudo maas createadmin --username admin --password admin --email akitect.io@gmail.com
--username
will declare the username for MAAS--password
will declare the password for MAAS--email
will declare the email for MAAS
Step 7: Log in to MAAS
Access the address http://10.86.140.147/MAAS
to log in to MAAS
MAAS welcome screen
Region name
: Name of the MAAS server (default ismaas
)DNS Forwarding: IP address of the external DNS server that MAAS will use to query domain names
Ubuntu archive
: IP address of the Ubuntu archive mirror that MAAS will use to install software packagesUbuntu extra archive
: IP address of the Ubuntu extra archive mirror that MAAS will use to install software packagesAPT & HTTP proxy
: IP address of the proxy server that MAAS will use to access the Ubuntu archive mirror and Ubuntu extra archive mirror
Step 8: Select the Ubuntu image to install
Ubuntu release
: The version of Ubuntu you want to installArchitecture
: The architecture of the server you want to installSub-architecture
: The sub-architecture of the server you want to installRelease
: The version of Ubuntu you want to installImage
: The image of Ubuntu you want to installSync now
: Synchronize the image of Ubuntu you want to installDownload
: Download the image of Ubuntu you want to installDelete
: Delete the image of Ubuntu you want to installEdit
: Edit the image of Ubuntu you want to installAdd
: Add the image of Ubuntu you want to installSave
: Save the image of Ubuntu you want to installCancel
: Cancel the image of Ubuntu you want to installUpdate selection
: Update the image of Ubuntu you want to install
Step 9: Complete the MAAS installation
Select Finish Setup
to complete the MAAS installation
So, you have successfully installed and configured MAAS on Ubuntu 22.04 LTS.