Clouds

Juju supports a wide variety of clouds. In addition, many of these are known to Juju out of the box. They are Amazon AWS, Microsoft Azure, Google GCE, Oracle Compute, Rackspace, Joyent, and LXD.

The remaining supported clouds do need to be added to Juju, and, as will be shown, it is simply done. They are VMware vSphere, OpenStack, MAAS, and Manual. An Oracle trial account also needs to be added.

Once your cloud is known to Juju, whether by default or due to it being added, the next step is to add your cloud credentials to Juju. The exception is LXD; it does not require credentials.

This rest of this page covers general cloud management tasks and an overview of how clouds are added. You can still get started by selecting your cloud here:

General cloud management

To see which clouds Juju is currently aware of use the clouds command:

juju clouds

This will return a list very similar to:

Cloud        Regions  Default          Type        Description
aws               14  us-east-1        ec2         Amazon Web Services
aws-china          1  cn-north-1       ec2         Amazon China
aws-gov            1  us-gov-west-1    ec2         Amazon (USA Government)
azure             24  centralus        azure       Microsoft Azure
azure-china        2  chinaeast        azure       Microsoft Azure China
cloudsigma         5  hnl              cloudsigma  CloudSigma Cloud
google             7  us-east1         gce         Google Cloud Platform
joyent             6  eu-ams-1         joyent      Joyent Cloud
oracle             5  uscom-central-1  oracle      Oracle Cloud
rackspace          6  dfw              rackspace   Rackspace Cloud
localhost          1  localhost        lxd         LXD Container Hypervisor

Each line represents a backing cloud that Juju can interact with. It gives the cloud name, the number of cloud regions Juju is aware of, the default region (for the current Juju client), the type/API used to control it, and a brief description.

Important: The cloud name (e.g. 'aws', 'localhost') is what you will use in any subsequent Juju commands to refer to a cloud.

To see which regions Juju is aware of for any given cloud use the regions command. For the 'aws' cloud then:

juju regions aws

This returns a list like this:

us-east-1
us-east-2
us-west-1
us-west-2
ca-central-1
eu-west-1
eu-west-2
eu-central-1
ap-south-1
ap-southeast-1
ap-southeast-2
ap-northeast-1
ap-northeast-2
sa-east-1

To change the default region for a cloud:

juju set-default-region aws eu-central-1

You can also specify a region to use when Creating a controller.

To get more detail about a particular cloud:

juju show-cloud azure

To learn of any special features a cloud may support the --include-config option can be used with show-cloud. These can then be passed to either of the bootstrap or the add-model commands. See Passing a cloud-specific setting for an example.

To synchronise the Juju client with changes occurring on public clouds (e.g. cloud API changes, new cloud regions) or on Juju's side (e.g. support for a new cloud):

juju update-clouds

Adding clouds

Adding a cloud is done with the add-cloud command, which has both interactive and manual modes.

Adding clouds interactively

Interactive mode is the recommended method for adding a cloud, especially for new users. This mode currently supports the following clouds: MAAS, Manual, OpenStack, Oracle, and vSphere.

Adding clouds manually

As an alternative to the interactive method, more experienced Juju operators can add their clouds manually. This can assist with automation.

The manual method necessitates the use of a YAML-formatted configuration file. It has the following format:

clouds:
  <cloud_name>:
    type: <type_of_cloud>
    auth-types: [<authenticaton_types>]
    regions:
      <region-name>:
        endpoint: <https://xxx.yyy.zzz:35574/v3.0/>

The table below shows the authentication types available for each cloud type. It does not include the interactive type as it does not apply in the context of adding a cloud manually.

cloud type authentication types
azure service-principal-secret
cloudsigma userpass
ec2 access-key
gce jsonfile,oauth2
joyent userpass
lxd n/a, certificate (v.2.5)
maas oauth1
manual n/a
openstack access-key,userpass
oracle userpass
rackspace userpass
vsphere userpass

To add a cloud in this way we simply supply an extra argument to specify the relative path to the file:

juju add-cloud <cloud-name> <cloud-file>

Here are some examples of manually adding a cloud:

© 2018 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.