New Install Failed

Fresh installed Ubuntu Server 23.04 then MAAS.

root@lw:~# snap install --channel=latest/edge maas
snap "maas" is already installed, see 'snap help refresh'
root@lw:~# maas status
MAAS is not configured

Document is blank for “how to configure MAAS”
https://maas.io/docs/how-to-do-a-fresh-install-of-maas#heading--configure-maas

Not sure what to do, my output for maas status is blank. Doc’s requirements does not specifiy what version of Ubuntu Server is required either.

I also did not see anything about installing MAAS itself, on a virtual machine (KVM) for example. Is this possible?

Uh, thats not good. Thanks for spotting this!

Once you’ve installed MAAS, the next step is to initialise it with sudo maas init

Thank you, little progress but still stuck. IP changed here to - only for privacy reasons.

root@host:~# maas init rack
MAAS URL [default=http://----------:5240/MAAS]: 
Secret: xxxx
root@host:~# maas status
Service  Startup   Current   Since
agent    disabled  inactive  -
bind9    disabled  inactive  -
dhcpd    disabled  inactive  -
dhcpd6   disabled  inactive  -
http     disabled  inactive  -
ntp      disabled  inactive  -
proxy    disabled  inactive  -
rackd    enabled   inactive  -
syslog   disabled  inactive  -

Was there a reason to set up only Rack controller and not Region + Rack?
Region controller hosts API + UI and acts as a control plane.

I’m new to MAAS and definitely want the web GUI.

Still won’t work?

root@lw:~#  maas init
usage: maas init [-h] {region+rack,region,rack} ...

Initialise MAAS in the specified run mode.

options:
  -h, --help            show this help message and exit

run modes:
  {region+rack,region,rack}
    region+rack         Both region and rack controllers
    region              Region controller only
    rack                Rack controller only

When installing region or rack+region modes, MAAS needs a
PostgreSQL database to connect to.

If you want to set up PostgreSQL for a non-production deployment on
this machine, and configure it for use with MAAS, you can install
the maas-test-db snap before running 'maas init':

    sudo snap install maas-test-db
    sudo maas init region+rack --database-uri maas-test-db:///

the following arguments are required: run_mode
root@lw:~# maas init region+rack
Controller has already been initialized.
Are you sure you want to initialize again (yes/no) [default=no]? 
root@lw:~#

You need sudo maas init region+rack (thats the most basic case)

However you can have rack and region on different machines if needed.

Thanks, but what is “database URI”?

root@lw:~# maas init region+rack
Controller has already been initialized.
Are you sure you want to initialize again (yes/no) [default=no]? yes
Database URI:

Hey @bashedroot !

You can find all the information about how to start with MAAS - and how to configure the database - in the official doc

Some progress I suppose (please keep in mind, first time using / installing MAAS).

Ran: maas init region+rack --database-uri maas-test-db:///

Result:

  File "/snap/maas/30029/usr/lib/python3/dist-packages/django/utils/asyncio.py", line 33, in inner
return func(*args, **kwargs)

File “/snap/maas/30029/usr/lib/python3/dist-packages/django/db/backends/postgresql/base.py”, line 187, in get_new_connection
connection = Database.connect(**conn_params)
File “/snap/maas/30029/usr/lib/python3/dist-packages/psycopg2/init.py”, line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: connection to server on socket “/var/snap/maas/common/test-db-socket/.s.PGSQL.5432” failed: No such file or directory
Is the server running locally and accepting connections on that socket?

No worries!
Thats also a sign for us that we need to improve our documentation for a Quickstart.

So maas-test-db is a snap that will setup test PostgreSQL instance that can be used for dev/testing and not recommended for production setup.

There is a thing in snap that is called Interface and to make things working for you, you need to follow a certain order, so one snap can discover another and connect to proper interfaces.

# just to ensure we start with in a clean state
sudo snap remove maas
# install maas-test-db
sudo snap install maas-test-db
# install maas
sudo snap install maas
# init maas, you can just follow interactive installed
# it will auto-discover and suggest maas-test-db
# then simply setup admin login, password and email
sudo maas init region+rack

@troyanov - Thanks for the reply. Being a firtime user of MAAS I am able to set up POC setup very quickly with your instructions.

Need similar instructions in setting up a production environment. I was just following the article https://maas.io/docs/how-to-do-a-fresh-install-of-maas#heading--configure-maas and little confused on how to setup the production setup using maas 3.4 snap.

When I select 3.2 snap, I can see following section " How to initialise MAAS for production" where I can see steps to setup postgresql. But for 3.4 snap I dont see the same (I am using latest firefox).

Any help here would be great.

It is indeed seems to be missing and that might be because 3.4 is not officially released yet.
For production setup I’d recommend using MAAS versions that do stable channel.

Current latest stable version is 3.3 that can be installed with:
sudo snap install maas --channel=3.3/stable

ok let me try with 3.3 then