Offline docs (switch to live docs)                          UI-only  CLI-only

How to use availability zones

Make your MAAS instance fault tolerant

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

Availability zones in MAAS serve as logical partitions that let you group and isolate resources. Think of them as a way to organise your physical and virtual machines for optimal efficiency and fault tolerance.

Pro tip: You can find more theory about availability zones elsewhere in this documentation set.

Availability zones via the UI, MAAS version 3.4

How to list availability zones

To see a list of availability zones, select AZs from the top tab bar.

How to add an availability zone

To create a zone:

  1. Select AZs.

  2. Select Add AZ.

  3. Enter a Name for the zone.

  4. Optionally enter a Description for the zone.

  5. Select Add AZ to register your changes.

How to edit an existing availability zone

To edit a zone:

  1. Select AZs.

  2. Select an AZ by clicking on its name.

  3. Select Edit on the far right.

  4. Update the Name for the zone, if desired.

  5. Optionally update the Description for the zone, if desired.

  6. Select Update AZ to register your changes.

How to delete an existing availability zone

To delete a zone:

  1. Select AZs.

  2. Select an AZ by clicking on its name.

  3. Select Delete AZ in the top right corner.

  4. Update the Name for the zone, if desired.

  5. Confirm by selecting the red Delete AZ button which appears. Once you make this selection, the AZ will be deleted and no undo is possible.

How to assign a machine to an availability zone

To assign a machine to a zone:

  1. Select Machines.

  2. Select one or more machines by clicking their checkboxes.

  3. Select Categorise >> Set zone*.

  4. In the pop-up dialogue, choose the Zone from the drop-down.

  5. Select Set zone for machine to register your changes.

How to allocate a machine in a particular zone

Allocating a machine in a particular zone can only be done via the MAAS CLI.

Availability zones via the UI, MAAS version 3.3 and below

How to list availability zones

To see a list of availability zones, select AZs from the top tab bar.

How to add an availability zone

To create a zone:

  1. Select AZs.

  2. Select Add AZ.

  3. Enter a Name for the zone.

  4. Optionally enter a Description for the zone.

  5. Select Add AZ to register your changes.

How to edit an existing availability zone

To edit a zone:

  1. Select AZs.

  2. Select an AZ by clicking on its name.

  3. Select Edit on the far right.

  4. Update the Name for the zone, if desired.

  5. Optionally update the Description for the zone, if desired.

  6. Select Update AZ to register your changes.

How to delete an existing availability zone

To delete a zone:

  1. Select AZs.

  2. Select an AZ by clicking on its name.

  3. Select Delete AZ in the top right corner.

  4. Update the Name for the zone, if desired.

  5. Confirm by selecting the red Delete AZ button which appears. Once you make this selection, the AZ will be deleted and no undo is possible.

How to assign a machine to an availability zone

To assign a machine to a zone:

  1. Select Machines.

  2. Select one or more machines by clicking their checkboxes.

  3. Select Take action >> Set zone*.

  4. In the pop-up dialogue, choose the Zone from the drop-down.

  5. Select Set zone for machine to register your changes.

You can also change the zone for a machine under Machines >> "machine-name" >> Configuration >> Edit.

How to allocate a machine in a particular zone

Allocating a machine in a particular zone can only be done via the MAAS CLI.

Availability zones with the MAAS CLI, all versions

How to list availability zones

To see a list of availability zones, enter the following command:

maas $PROFILE zones read \
| jq -r '(["ZONE","NAME","DESCRIPTION"]
| (., map(length*"-"))), (.[] | [.id, .name, .description])
| @tsv' | column -t

which produces output similar to:

ZONE  NAME         DESCRIPTION
----  ----         -----------
5     BizOffice
1     default
4     Inventory
2     Medications
3     Payroll
6     ProServ

How to add an availability zone

To create a zone, enter the following command:

maas $PROFILE zones create name=$ZONE_NAME description=$ZONE_DESCRIPTION

How to edit an existing availability zone

To edit a zone, enter a command similar to the following:

maas $PROFILE zone update $OLD_ZONE_NAME name=$NEW_ZONE_NAME \
description=$ZONE_DESCRIPTION

How to delete an existing availability zone

To delete a zone, enter a command like this:

maas $PROFILE zone delete $ZONE_NAME

How to assign a machine to an availability zone

To assign a machine to a zone, first retrieve the machine's system ID like this:

maas PROFILE machines read | jq '.[] | .hostname, .system_id'

Then enter the following command, using the system ID you just retrieved:

maas admin machine update $SYSTEM_ID zone=$ZONE_NAME

How to deploy a machine in a particular zone

To deploy in a particular zone:

  1. First acquire the machine, assigning it to the particular zone:
maas $PROFILE machines allocate zone=$ZONE_NAME system_id=$SYSTEM_ID 
  1. Then deploy the machine as normal:
maas $PROFILE machine deploy system_id=$SYSTEM_ID