Post

MAAS | Metal as a Service

MaaS: Metal as a Service

In the realm of technology and infrastructure management, there’s a revolutionary concept that’s transforming the way we approach server deployment and management: Metal as a Service, or MaaS. Far from a heavy metal concert (though it’s just as thrilling for tech enthusiasts), MaaS represents a cutting-edge approach to server provisioning and administration. In this article, we’ll delve into what MaaS is all about and how you can harness its power for your own infrastructure needs.

What is MaaS?

MaaS, or Metal as a Service, is a provisioning solution that automates the deployment and management of physical servers, also known as bare-metal servers. Traditionally, setting up and maintaining physical servers involved manual processes, from racking and stacking hardware to installing and configuring operating systems. MaaS streamlines this entire workflow by abstracting the hardware layer and treating servers as “metal” resources that can be dynamically provisioned and managed through software.

How Does MaaS Work?

At its core, MaaS operates as a centralized orchestration platform that abstracts the complexities of hardware management. Here’s a simplified overview of how MaaS works:

  1. Inventory Management: MaaS maintains a comprehensive inventory of physical servers within a data center or infrastructure environment. Each server is identified and categorized based on its specifications and capabilities.

  2. Dynamic Provisioning: With MaaS, administrators can provision servers on-demand, without the need for manual intervention. Using a centralized management interface or API, administrators can specify the desired configuration and deploy servers automatically.

  3. Operating System Deployment: Once provisioned, MaaS facilitates the automated installation of operating systems on bare-metal servers. Administrators can choose from a variety of operating system images and configurations, ensuring consistency and efficiency across deployments.

Installation

Before we start with MaaS installation, we will check for updates on our Ubuntu install.

1
2
sudo apt update
sudo apt upgrade

We will install MAAS as a snap package.

1
sudo snap install maas

Database

MAAS can be initialized for a test environment or for a production environment. We will be doing production initialization here.

Instructions for test environments can be found on links I posted earlier in this guide.

We will be initializing MAAS in region + rack mode. MAAS can operate in region, rack, region + rack mode, or none.

First, we will again check for updates, and then install PostgreSQL.

1
2
sudo apt update -y
sudo apt install -y postgresql

We now need to create a database for MAAS and a user for that DB.

My database will be called maas, the user is called maaszeljko, and the password is Pass. Make sure to change those to fit your scenario.

1
2
3
4
sudo -u postgres psql
create user maasuser with encrypted password 'Pass';
create database maas;
grant all privileges on database maas to maasuser;

Replace maasuser with your MAAS DB username, replace Pass with your password

Initialization

Now, we will start MAAS initialization.

Replace maasuser with your MAAS DB username, replace Pass with your password for the MAAS DB user. localhost is used if the PostgreSQL is on the same machine as MAAS is. maas AT THE END OF COMMAND is the name of the database we created.

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

I left the default URL for the MAAS.

Create Admin

I’m now going to create an admin account for the MAAS web interface.

1
sudo maas createadmin

Server Status

Let’s just now check MAAS service status.

1
sudo maas status

Connect to Web UI

And now, the last test. I’m going to open http://YOUR_SERVER_IP:5240/MAAS in the browser of the machine that is in the same network as the MAAS controller is.

Replace YOUR_SERVER_IP with the IP address of your MAAS server.

This post is licensed under CC BY 4.0 by the author.