How to install maas on ubuntu 20. 04

How to Install MAAS on Ubuntu 20.04

Introduction

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.

MAAS is supported on Ubuntu, CentOS, Windows, and RedHat operating systems. This tool is very useful for normal enterprises in managing virtualized infrastructure. This tutorial will guide you on how to install MAAS on Ubuntu 20.04 as you go through below.

Installing MAAS as snap package

Step 1 – Update packages by apt command:

$ sudo apt update

How to install maas on ubuntu 20. 04 1

Sponsored

Step 2 – Let’s install MAAS:

$ sudo snap install maas

Output:

How to install maas on ubuntu 20. 04 2

Initializing MAAS

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

See also  UbuntuDDE 23.04 Lunar Lobster llega con meses de retraso con Linux 6.2 y Deepin 23
$ sudo apt update -y

Output:

How to install maas on ubuntu 20. 04 3

Then we will install PostgreSQL:

$ sudo apt install -y postgresql

Output:

How to install maas on ubuntu 20. 04 4

Secondly, 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

How to install maas on ubuntu 20. 04 5

Sponsored

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

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

Then add the following line:

host maas maaszeljko 0/0 md5

How to install maas on ubuntu 20. 04 6

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.

How to install maas on ubuntu 20. 04 7

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

$ sudo maas createadmin

How to install maas on ubuntu 20. 04 8

To check MAAS service status, run:

$ sudo maas status

Output:

How to install maas on ubuntu 20. 04 9

Testing connection

Open your browser and access your MAAS URL How to install maas on ubuntu 20. 04 10

Conclusion

In this article, we guided you on how to install MAAS on Ubuntu 20.04.

Thanks for referring!


Discover more from Ubuntu-Server.com

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply