Snaps are containerised software packages. To install MAAS from a snap simply enter the following:
sudo snap install maas --channel=2.7
After entering your password, the snap will download and install from the 2.7 channel. However, MAAS needs initialising before it’s ready to go.
Initialisation
The next step involves initialising MAAS with a run mode. Selecting one of the following modes dictates what services will run on the local system:
Mode | Region | Rack | Database | Description |
---|---|---|---|---|
all * |
X | X | X | All services (see warning below) |
region |
X | Region API server only | ||
rack |
X | Rack controller only | ||
region+rack |
X | X | Region API server and rack controller | |
none |
Reinitialises MAAS and stops services |
all mode being deprecated: Configuring the MAAS snap in “all” mode will be deprecated in MAAS version 2.8.0 and removed in MAAS version 2.9.0.
To initialise MAAS and select a run mode, use the maas init
command with the –mode argument.
Example
The following demonstrates the all
mode, a popular initialisation choice for MAAS:
sudo maas init --mode all
A dialog will appear that will gather some basic information:
MAAS URL [default=http://10.55.60.1:5240/MAAS]: http://192.168.122.1:5240/MAAS
Create first admin account:
Username: admin
Password: ******
Again: ******
Email: admin@example.com
Import SSH keys [] (lp:user-id or gh:user-id): lp:petermatulis
You will use the username and password to access the web UI. If you enter a Launchpad or GitHub account name with associated SSH key, MAAS will import them automatically.
MAAS URL
All run modes (except none
) prompt for a MAAS URL, interpreted differently depending on the mode:
-
all
,region+rack
: Used to create a new region controller as well as to tell the rack controller how to find the region controller. -
region
: Used to create a new region controller. -
rack
: Used to locate the region controller.
Shared secret
The ‘rack’ and ‘region+rack’ modes will additionally ask for a shared secret that will allow the new rack controller to register with the region controller.
Reinitialising MAAS
To re-initialise MAAS, for example, to switch from rack
to region
:
sudo maas init --mode region
Additional init
options
The init
command can take a number of optional arguments. To list them all as well as read a brief description of each:
sudo maas init --help
Configuration verification
After a snap installation of MAAS, you can verify the currently-running configuration with:
sudo maas config
Sample output (for mode ‘all’):
Mode: all
Settings:
maas_url=http://192.168.122.1:5240/MAAS
Service statuses
You can check the status of running services with:
sudo maas status
Sample output (for mode ‘all’):
bind9 RUNNING pid 7999, uptime 0:09:17
dhcpd STOPPED Not started
dhcpd6 STOPPED Not started
ntp RUNNING pid 8598, uptime 0:05:42
postgresql RUNNING pid 8001, uptime 0:09:17
proxy STOPPED Not started
rackd RUNNING pid 8000, uptime 0:09:17
regiond:regiond-0 RUNNING pid 8003, uptime 0:09:17
regiond:regiond-1 RUNNING pid 8008, uptime 0:09:17
regiond:regiond-2 RUNNING pid 8005, uptime 0:09:17
regiond:regiond-3 RUNNING pid 8015, uptime 0:09:17
tgt RUNNING pid 8040, uptime 0:09:15
With MAAS installed and initialised, you can now open the web UI in your browser and begin your Configuration journey.