Cloud (substrate)

See also: How to manage a cloud

To Juju, a cloud (or backing cloud) is any entity that has an API that can provide compute, networking, and optionally storage resources in order for application units to be deployed on them. This includes public clouds such as Amazon Web Services, Google Compute Engine, Microsoft Azure and Kubernetes as well as private OpenStack-based clouds. Juju can also make use of environments which are not clouds per se, but which Juju can nonetheless treat as a cloud. MAAS and LXD fit into this last category. Because of this, in Juju a cloud is sometimes also called, more generally, a substrate.

Contents:

Supported clouds

See: List of supported clouds

Cloud differences

While Juju aims to make all clouds feel the same, some differences still persist depending on whether the cloud is a machine cloud or a Kubernetes cloud or a specific cloud as opposed to another.

Machine clouds vs. Kubernetes clouds

Juju makes a fundamental distinction between ‘machine’ clouds – that is, clouds based on bare metal machines (BMs; e.g., MAAS), virtual machines (VMs; e.g., AWS EC2), or system containers (e.g., LXD) – and ‘Kubernetes’ clouds – that is, based on containers (e.g., AWS EKS).

See more: Machine

While the user experience is still mostly the same – bootstrap a Juju controller into the cloud, add a model, deploy charms, scale, upgrade, etc. – this difference affects the required system requirements (e.g., for a Juju controller, 4GB vs. 6GB memory), the way you connect the cloud to Juju (add-cloud + add-credentials vs. add-k8s), what charms you can deploy (‘machine’ charms vs. ‘Kubernetes’ charms), and – occasionally – what operations you may perform and/or how (e.g., enable-ha is currently supported just for machine controllers; scaling an application is done via add-unit on machines and via scale-application on K8s).

See more: Tutorial, Juju How-to guides

Juju’s vision is to eventually make this distinction irrelevant.

Cloud foo vs. cloud bar

As a Juju user you will sometimes also notice small differences tied to a cloud’s specific identity, beyond the machine-Kubernetes divide.

This usually affects the setup phase (the information you have to supply to Juju to connect Juju to your cloud, and whether Juju can retrieve any of that automatically for you) and, later on, the customisations you can make to your deployment (e.g., small differences in configurations, constraints, placement directives, subnets, spaces, storage, etc., depending on the features available / supported for a given cloud).

See more: List of supported clouds > <cloud name>

Cloud definition

In Juju, cloud definitions can be provided either interactively or via a YAML file or (depending on the cloud) environment variables.

Regardless of the method, they are saved in a file called public-clouds.yaml (for public clouds; on Linux, typically: ~/.local/share/juju/public-clouds.yaml) or clouds.yaml (for user-defined clouds, including Kubernetes; on Linux, the default location is: ~/.local/share/juju/clouds.yaml).

These files both follow the same basic schema.


Expand to view an example 'clouds.yaml' file with a definition for LXD and Amazon EKS
clouds:
  lxd:
    type: lxd
    auth-types:
      - certificate
    endpoint: <endpoint>
    regions:
      default:
        endpoint: <endpoint>
    config:
      apt-http-proxy: <endpoint>
  eks:
    type: kubernetes
    host-cloud-region: ec2/eu-north-1
    auth-types:
      - userpass
      - oauth2
      - clientcertificate
    endpoint: <endpoint>
    regions:
      eu-north-1:
        endpoint: <endpoint>
    config:
      operator-storage: gp2
      workload-storage: gp2
    ca-certificates: <certificates>


The rest of this section gives details about this schema.

Source

tl;dr:

The most important keys are clouds, .<cloud name>, ..type, ..auth-types, and ..endpoint.

clouds

  • Status: Required.
  • Purpose: To define different clouds.
  • Structure: Type: Map. Value: One or more key-value pairs denoting clouds and their associated properties.

clouds.<cloud name>

  • Status: Required.
  • Purpose: To define a cloud.
  • Structure: Name: For built-in clouds and for public clouds, set by Juju; see List of supported clouds > <cloud name>. For user-defined clouds, set by the User. Type: String.

clouds.<cloud name>.auth-types

  • Status: Required.
  • Purpose: To define the authentication modes supported by the clouds.
  • Structure: Type: List of strings. Value: Cloud-specific. See more: List of supported clouds > <cloud name> > Cloud definition. Note: If you wish to restrict the allowed modes to a subset, list just the subset.

clouds.<cloud name>.ca-certificates

  • Status: Optional.
  • Purpose: To define the Certificate Authority certificates to be used to validate certificates of cloud infrastructure components. The contents are Base64 encoded x.509 certs.
  • Structure: Type: List of strings. Value: [TO BE ADDED]

clouds.<cloud name>.config

  • Status: Optional.
  • Purpose: To define a model configuration to use when bootstrapping Juju in the cloud. The configuration will be combined with Juju-generated, and user-supplied values; user-supplied values take precedence.
  • Structure: Type: Map. Value: One or more key-value pairs denoting model configuration keys (either generic or cloud-specific) and their values. See more: List of model configuration keys and/or List of supported clouds > <cloud name>.

clouds.<cloud name>.description

  • Status: Optional.
  • Purpose: To describe the type of cloud.
  • Structure: Type: String.

clouds.<cloud name>.endpoint

  • Status:
  • Purpose: To define the default endpoint for the cloud regions. Note: It may be overridden by a region.
  • Structure: Type: String. Value: The endpoint URL or, for manual clouds, the SSH URI (e.g., ubuntu@1.2.3.4).

clouds.<cloud name>.host-cloud-region

  • Status: [TO BE ADDED]
  • Purpose: To define the the Kubernetes host cloud. The format is <cloudType>/<region>.
  • Structure: Type: String.

clouds.<cloud name>.identity-endpoint

  • Status:
  • Purpose: To define the default identity endpoint for the cloud regions. Note: It may be overridden by a region.
  • Structure: Type: String. Value: The endpoint.

clouds.<cloud name>.region-config

  • Status: Optional.
  • Purpose: To define a cloud-specific configuration to use when bootstrapping Juju in a specific cloud region. The configuration will be combined with Juju-generated and usersupplied values; user supplied values take precedence.
  • Structure:

clouds.<cloud name>.regions

  • Status: Optional.
  • Purpose: To define the regions available in the cloud.
  • Structure: Type: Ordered list of regions. The first region will be used as the default region for the cloud. Value: Cloud-specific. See more: List of supported clouds > <cloud name>.

clouds.<cloud name>.regions.<region name> The name of the region.

clouds.<cloud name>.regions.<region name>.endpoint The region’s primary endpoint URL.

clouds.<cloud name>.regions.<region name>.identity-endpoint The region’s identity endpoint URL. If the cloud/region does not have an identity-specific endpoint URL, this will be empty.

clouds.<cloud name>.regions.<region name>.storage-endpoint The region’s storage endpoint URL. If the cloud/region does not have an storage-specific endpoint URL, this will be empty.

clouds.<cloud name>.storage-endpoint

  • Status: Optional.
  • Purpose: To define the default storage endpoint for the cloud regions. Note: It may be overridden by a region.
  • Structure: Type: String. Value: The endpoint.

clouds.<cloud name>.type

Last updated an hour ago. Help improve this document in the forum.