<a id="cloud-oci"></a>

# The Oracle OCI cloud and Juju

This document describes details specific to using your existing Oracle OCI cloud with Juju.

> See more: [Oracle OCI](https://docs.oracle.com/en-us/iaas/Content/home.htm)

When using this cloud with Juju, it is important to keep in mind that it is a (1) machine cloud and (2) not some other cloud.

> See more: [Cloud differences](https://documentation.ubuntu.com/juju/2.9/reference/cloud.md#cloud-differences)

As the differences related to (1) are already documented generically in the rest of the docs, here we record just those that follow from (2).

## Notes on `juju add-cloud`

Type in Juju: `oci`

Name in Juju: `oracle`

## Notes on `juju add-credential`

### Authentication types

#### `httpsig`

Attributes:

- user: Username OCID (required)
- tenancy: Tenancy OCID (required)
- key: PEM encoded private key (required)
- pass-phrase: Passphrase used to unlock the key (required)
- fingerprint: Private key fingerprint (required)
- region: DEPRECATED: Region to log into (required)

## Notes on `juju bootstrap`

|You have to specify the compartment OCID via the cloud-specific `compartment-id` model configuration key (see below). <br> Example: `juju bootstrap --config compartment-id=<compartment OCID> oracle oracle-controller`.

## Cloud-specific model configuration keys

### `address-space`

The CIDR block to use when creating default subnets. The subnet must have at least a /16 size.

|               |               |
|---------------|---------------|
| type          | string        |
| default value | “10.0.0.0/16” |
| immutable     | false         |
| mandatory     | false         |

### `compartment-id`

The OCID of the compartment in which juju has access to create resources.

|               |        |
|---------------|--------|
| type          | string |
| default value | “”     |
| immutable     | false  |
| mandatory     | false  |

## Supported constraints

| [CONSTRAINT](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint)                              |                                        |
|---------------------------------------------------------------------------------------------------|----------------------------------------|
| conflicting:                                                                                      |                                        |
| supported?                                                                                        |                                        |
| - [allocate-public-ip](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-allocate-public-ip) | TBA                                    |
| - [arch](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-arch)                             | ☑ <br> Valid values: `[amd64, arm64]`. |
| - [container](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-container)                   | ✕                                      |
| - [cores](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-cores)                           | ✓                                      |
| - [cpu-power](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-cpu-power)                   | ✓                                      |
| - [image-id](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-image-id)                     | ✕                                      |
| - [instance-role](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-instance-role)           | ✕                                      |
| - [instance-type](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-instance-type)           | ✓                                      |
| - [mem](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-mem)                               | ✓                                      |
| - [root-disk](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-root-disk)                   | ✓                                      |
| - [root-disk-source](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-root-disk-source)     | ✕                                      |
| - [spaces](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-spaces)                         | ✕                                      |
| - [tags](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-tags)                             | ✕                                      |
| - [virt-type](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-virt-type)                   | ✕                                      |
| - [zones](https://documentation.ubuntu.com/juju/2.9/reference/constraint.md#constraint-zones)                           | ✓                                      |

## Supported placement directives

| [PLACEMENT DIRECTIVE](https://documentation.ubuntu.com/juju/2.9/reference/placement-directive.md#placement-directive)               |     |
|------------------------------------------------------------------------------------------------------|-----|
| - [<machine>](https://documentation.ubuntu.com/juju/2.9/reference/placement-directive.md#placement-directive-machine)               | TBA |
| - [subnet=<subnet>](https://documentation.ubuntu.com/juju/2.9/reference/placement-directive.md#placement-directive-subnet)          | ✕   |
| - [system-id=<system ID>](https://documentation.ubuntu.com/juju/2.9/reference/placement-directive.md#placement-directive-system-id) | ✕   |
| - [zone=<zone>](https://documentation.ubuntu.com/juju/2.9/reference/placement-directive.md#placement-directive-zone)                | TBA |
