Manually adding MAAS clouds

A MAAS cloud may be registered with Juju using the interactive add-cloud command (see Using MAAS with Juju) but it is also possible to do so using a YAML file. All that varies is the endpoint and the name, since they use the same authentication method. Here is an example:

      type: maas
      auth-types: [oauth1]
      endpoint: http://devmaas/MAAS
      type: maas
      auth-types: [oauth1]
      type: maas
      auth-types: [oauth1]
      endpoint: http://prodmaas/MAAS

This example YAML defines three MAAS (region) controllers. To add a MAAS cloud from this definition to Juju, run the command in the form:

juju add-cloud <cloudname> <YAML file>

To add two MAAS clouds from the above example we would run:

juju add-cloud devmaas maas-clouds.yaml
juju add-cloud prodmaas maas-clouds.yaml

Where the supplied cloud names refer to those in the YAML file.

This will add both the 'prodmaas' and 'devmaas' clouds, which you can confirm by running:

juju list-clouds

This will list the newly added clouds:

Cloud        Regions  Default        Type        Description
aws               11  us-east-1      ec2         Amazon Web Services
devmaas            0                 maas        Metal As A Service
prodmaas           0                 maas        Metal As A Service
testmaas           0                 maas        Metal As A Service

It is necessary to add credentials for these clouds before bootstrapping them. See the Documentation on MAAS credentials here.