×


Install MAAS on Ubuntu 20.04 - Via a step by step process ?

MAAS is an acronym for Metal As A Service. It is an open-source tool from Canonical that helps you deploy data centers from raw metal servers. This tool is very useful for normal enterprises in managing virtualized infrastructure. MAAS is supported on Ubuntu, CentOS, Windows, and RedHat operating systems. 

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Server Monitoring queries and tasks.

In this context, we shall look into how to install MAAS on Ubuntu 20.04.


Steps to install MAAS as snap package 

1. Perform system update

You can Update packages by using the apt command:

$ sudo apt update


2. Install MAAS

You can install MAAS by running the below command:

$ sudo snap install maas


How to initialize MAAS ?

For production, we need to Initialize MAAS. Firstly, we must check for updates:

$ sudo apt update -y

Then we will install PostgreSQL:

$ sudo apt install -y postgresql

Next, we will create a database for MAAS. Here the database is called maas, user named maasuser, the password is maas123:

$ sudo -u postgres psql

create user maasuser with encrypted password 'maas123';

create database maas;
grant all privileges on database maas to maasuser;
\q

Now, we need to edit the file /etc/postgresql/10/main/pg_hba.conf:

$ sudo nano /etc/postgresql/10/main/pg_hba.conf

Note: Change maas for your maas DB name, and change maaszeljko for your maas DB user. I added line to the bottom of the file. Then add the following line:

host maas maaszeljko 0/0 md5

Save it and exit.

Now we will start initializing MAAS:

$ sudo maas init region+rack --database-uri "postgres://maasuser:maas123@localhost/maas"

Replace maasuser with your username just created, maas123 by your password.

To create the admin account for the web interface, run:

$ sudo maas createadmin

To check MAAS service status, run:

$ sudo maas status


How to Text MAAS connection ?

To do this, simply Open your browser and access your MAAS URL. For example:

http://10.0.0.101:5240/MAAS 


[Need assistance in configuring MAAS on your Linux system ? We can help you. ]


Conclusion

This article covers how to install MAAS on Ubuntu 20.04. In fact, Metal as a Service – MAAS – lets you treat physical servers like virtual machines in the cloud. Rather than having to manage each server individually, MAAS turns your bare metal into an elastic cloud-like resource.