Tips On Maas 2.0

TurnToJPG -->


Based on Ubuntu16.04, install maas via:

$ sudo apt-get install -y maas

After installation, create the default username/password via following command:

$ sudo maas-region createadmin --username=root

Now you could login to the http://YourIP/MAAS via:


Using API to talk

In maas cli, using following steps for generate the API key and use:

# sudo maas-region apikey --username=root
# maas login mymaas

You are now logged in to the MAAS server at with the profile name 'mymaas'.

For help with the available commands, try:

  maas mymaas --help

Later we will use mymaas for talk to MAAS Controller.

Add Boot Source

Click Images, you won’t see anything because the images are not downloaded. you could download it manually via following command:

$ sudo apt-get install simplestreams ubuntu-cloudimage-keyring apache2
$ sudo sstream-mirror --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg \ /var/www/html/maas/images/ephemeral-v2/daily \
'arch=amd64' 'subarch~(generic|hwe-t)' 'release~(trusty|precise|xenial)' --max=1

After downloading, the image content will be available under /var/www/html/.

Or, if you downloaded the html files before, do following steps for using your pre-downloaded packages:

$ tar xJvf html.tar.bz2 -C /var/www/html/
$ sudo maas mymaas boot-sources create url= keyring_filename=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg 

Now there are two boot-sources in maas, delete the default one(Because we are in china, and its goddamned GFW!)

dash@maascontroller:~$ sudo maas mymaas boot-source delete 1
Machine-readable output follows:

dash@maascontroller:~$ sudo maas mymaas boot-sources read
Machine-readable output follows:
        "keyring_data": "<memory at 0x7f4e9478b288>",
        "resource_uri": "/MAAS/api/2.0/boot-sources/2/",
        "id": 2,
        "url": "",
        "keyring_filename": "/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg"

Import boot-sources via:

$ sudo maas mymaas boot-resources import

It will takes a little bit time for importing the boot images.

For adding nodes: