How to deploy machines with MAAS

Errors or typos? Topics missing? Hard to read? Let us know!

It’s important to understand how images get deployed: machines must first be enlisted or commissioned, then allocated, then deployed.

Deploy machines

To deploy directly from MAAS, select one or more machine(s) and press the ‘Deploy’ button.

You then have the option of deviating from the default OS, release, and kernel. When ready, press ‘Deploy X machine(s)’ (where ‘X’ is the number of machines selected).

While a machine is deploying its status will change to Deploying to ‘OS’, where ‘OS’ is the name of the OS being deployed (e.g. ‘Deploying to Ubuntu 16.04 LTS’).

Once a machine has finished deploying its status will change to just the name of the OS (e.g. ‘Ubuntu 18.04 LTS’).

To deploy a node:

maas $PROFILE machine deploy $SYSTEM_ID

To deploy a node as a KVM host:

maas $PROFILE machine deploy $SYSTEM_ID install_kvm=True

To deploy with the CLI, the node must have a status of ‘Allocated’. See ‘Allocate a node’ above.

Set deployment timeout

This feature is only available via the MAAS CLI.

By default, when you deploy a machine, MAAS will consider the deployment a failure if it doesn’t complete within 30 minutes. You can configure this timeout, if you wish, with the command:

maas $PROFILE maas set-config name=node-timeout value=$NUMBER_OF_MINUTES

Add running machines

This feature is only available via the MAAS CLI or on the running machine.

In order to add machine that’s already running a workload, there are currently two options. You can use the MAAS CLI, or run provided scripts on the machine itself.

Using the MAAS CLI

Via the API/CLI, you can create a machine, passing the deployed flag:

$ maas $profile machines create deployed=true hostname=mymachine \   
architecture=amd64 mac_addresses=00:16:3e:df:35:bb power_type=manual

Using the running machine

On the machine itself (the recommended way, if the machine is running Ubuntu), you can download a helper script from MAAS and create the machine that way:

$ wget http://$MAAS_IP:5240/MAAS/maas-run-scripts
$ chmod 755 maas-run-scripts
$ ./maas-run-scripts register-machine --hostname mymachine \
 > http://$MAAS_IP:5240/MAAS $MAAS_API_TOKEN

Now you have a machine in MAAS that’s in the deployed state, with no hardware information yet.

Last updated 10 days ago.