Deploy machines (deb/2.8/CLI)

2.7 2.8 2.9
Snap CLI ~ UI CLI ~ UI CLI ~ UI
Packages CLI ~ UI CLI ~ UI CLI ~ UI

Once a machine has been commissioned (see Commission machines) the next logical step is to deploy it. Deploying a machine means, effectively, to install an operating system on it.

Two questions you may have:

  1. How and why do I acquire a machine?
  2. How do I deploy a machine?

The agent that triggers deployment may vary. For instance, if the machines are destined to run complex, inter-related services that scale up or down frequently, like a “cloud” resource, then Juju is the recommended deployment agent. Juju will also install and configure services on the deployed machines. If you want to use MAAS to install a base operating system and work on the machines manually, then you can deploy a machine directly with MAAS.

Machines deployed with MAAS will also be ready to accept connections via SSH, to the ‘ubuntu’ user account. This connection assumes that you have imported an SSH key has to your MAAS account. This is explained in SSH keys.

Juju adds SSH keys to machines under its control.

MAAS also supports machine customisation with a process called “preseeding.” For more information about customising machines, see Custom machine setup.

Acquire

Acquiring (“allocating”) a machine reserves the machine for the exclusive use of the acquiring process. The machine is no longer available to any other process, including another MAAS instance, or a process such as Juju.

Before deploying a machine, MAAS must acquire it (status ‘Allocated’). When deploying from the web UI, this action is performed automatically (and invisibly).

The action remains useful in terms of reserving a machine for later use. To acquire a machine explicitly select the machine and apply the ‘Acquire’ action.

To acquire/allocate a random node:

maas $PROFILE machines allocate

To acquire/allocate a specific node:

maas $PROFILE machines allocate system_id=$SYSTEM_ID

To acquire a node, it must have a status of ‘Ready’.

Deploy

To deploy, you must configure the underlying machine to netboot. Such a machine will undergo the following process:

  1. DHCP server is contacted
  2. kernel and initrd are received over TFTP
  3. machine boots
  4. initrd mounts a Squashfs image ephemerally over HTTP
  5. cloud-init triggers deployment process
  6. curtin installation script runs
  7. Squashfs image (same as above) is placed on disk

The curtin installer uses an image-based method and is now the only installer used by MAAS. Although the older debian-installer method has been removed, curtin continues to support preseed files. For more information about customising machines see Custom machine setup.

Before deploying, you should take two key actions:

  1. review and possibly set the Ubuntu kernels and the Kernel boot options that will get used by deployed machines.
  2. ensure any pertinent SSH keys are imported (see SSH keys) to MAAS so it can connect to deployed machines.

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 ‘Acquire a node’ above.


Last updated 11 days ago.