MAAS parameters

MAAS parameters set where a Cloud Management Platform (CMP) order is placed in MAAS, which machines qualify for it, and whether it becomes a physical machine or a virtual machine

CMP creates these parameters when a MAAS resource handler is saved. Orders also use the standard CPU, memory, disk size, and network parameters; how each one affects the machine MAAS chooses is covered in MAAS server selection.

Environment parameters

These parameters appear on each MAAS environment’s MAAS Parameters tab. CMP imports their options from MAAS when the environment is created. To refresh one parameter’s options, select the import icon in its row. Import parameters from refreshes all of them at once, replacing any options you have edited.

Parameter Description
Location Required. The MAAS availability zone the environment provisions into. CMP sets it when you import the zone.
Key pair name Required. The SSH key CMP uses to run scripts on the server. The options are the public keys on the MAAS account for CMP. Selecting a key does not change which keys MAAS installs on the machine.
MaaS Virtual Whether the order creates a virtual machine on a MAAS VM host (True) or allocates a physical machine (False). CMP always imports False, and adds True only when MAAS has at least one VM host. When both options are present, the user chooses on the order form.
Required Tags One or more MAAS tags that a physical machine must have. Not used for virtual machines.
MaaS Resource Pool The MAAS resource pool from which to allocate a physical machine. For a virtual machine, CMP uses it to choose a VM host in that pool. Optional by default; to make every order choose a pool, see Reserve machines for a project.
MaaS Storage Pool Virtual machines only. The VM host storage pool where the virtual machine’s disks are created. The options are the storage pools on VM hosts in the environment’s zone. When not set, CMP uses the VM host’s default storage pool.

MaaS User Data

MaaS User Data passes a cloud-init user data script to MAAS, which runs it when the machine is deployed. It applies to physical and virtual machines. Add it to a blueprint, group, or environment like any other parameter.

CMP treats the script as a template, so it can include server values in double curly braces, such as {{ server.hostname }}. See Setting up user-data parameters.

For example, this script imports a Launchpad user’s public SSH keys with ssh-import-id and logs the output:

#!/bin/bash
(
echo "=== $(date) ==="
ssh-import-id foobar_user
) | tee /ssh-key-import.log
  • MAAS: add the resource handler and import zones, images, and networks.
  • MAAS server selection: how these parameters narrow the choice of machine or VM host.