MAAS server selection

For each MAAS order, Cloud Management Platform (CMP) either asks MAAS to allocate a physical machine that meets the order’s requirements or creates a virtual machine on a MAAS VM host

This is determined by the MaaS Virtual parameter. Physical allocation is the default; virtual machines are available only when MAAS has at least one VM host. Parameters are described in MAAS parameters.

How a physical machine is chosen

CMP sends MAAS the order’s requirements as minimums, and MAAS allocates a machine in the Ready state that meets all of them. The machine can exceed any requirement, and MAAS decides which of the qualifying machines to use.

From the order The machine must
CPUs and memory Have at least the number of CPUs and amount of memory ordered.
Networks Have an interface on each requested network. The order of the interfaces is not preserved.
Required Tags Have at least every selected tag.
MaaS Resource Pool Be in the selected pool. With no pool selected, a machine in any pool qualifies.
Location Be in the environment’s availability zone.

Disk size is not a requirement for a physical machine, so MAAS can allocate a machine with whatever disks it has. If no machine qualifies, the order fails with the message “Server matching criteria could not be allocated by MaaS”.

When the build finishes, CMP records the machine’s actual CPU, memory, and disk resources, which may exceed what was ordered. The built-in MaaS Rate Hook does not set a hardware rate for MAAS servers, so CPUs, memory, and disk are not charged unless you change the hook. See Rates.

To configure a machine after allocation and before deployment, for example, to set a custom disk layout, add an orchestration action at the During Resource Provisioning trigger point.

Customize the allocation process

Reserve machines for a project

An order with no resource pool can be allocated any Ready machine in the zone. To reserve a set of machines:

  1. In MAAS, place reserved machines in their own resource pool and leave general-purpose machines in the default pool.
  2. In CMP, go to Admin > Parameters and make MaaS Resource Pool required.
  3. On each environment’s MAAS Parameters tab, limit the MaaS Resource Pool options to the pools that environment’s users may order from. To set the options per user or group instead, use generated parameter options.

Alternatively, place the reserved machines in their own availability zone and import it as a separate environment.

Allocate machines with GPUs or other add-on hardware

  1. In MAAS, tag the machines that have the hardware.
  2. Offer the tag under Required Tags, so that users can select it on the order form.

Combine tags for more specific configurations. Tags apply only to physical machines.

Offer hardware classes

If your machines fall into well-defined classes, give each class a unique tag in MAAS, for example g3-small, g3-medium, and g3-xlarge-gpu. Then limit which classes each set of users can order with environment-level parameters or generated parameter options.

To manage the classes from CMP instead, define each as a preconfiguration of CPUs, memory, and tags.

How a VM host is chosen

When MaaS Virtual is True, CMP works through the MAAS VM hosts and creates the virtual machine on the first one that meets all of these conditions:

  • It is in the environment’s availability zone.
  • It is in the selected MaaS Resource Pool, if one is set.
  • It has enough free cores and memory for the order, according to MAAS.
  • It has the selected MaaS Storage Pool, if one is set.

CMP does not check networks when choosing a host. The virtual machine is then created with the ordered disk sizes, and the requested networks become its interfaces. If no VM host qualifies, the order fails with the message “CloudBolt could not find a MaaS pod suitable to fulfil the requirements”.

  • MAAS parameters: what each MAAS parameter does and where its options come from.
  • MAAS: add the resource handler and import zones, images, and networks.