# Installing on Canonical OpenStack

Trilio and Canonical have started a partnership to ensure a native deployment of Trilio using JuJu Charms.

Those JuJu Charms are publicly available as Open Source Charms.

{% hint style="warning" %}
Trilio is providing the JuJu Charms to deploy Trilio 4.2 in Canonical OpenStack from Yoga release onwards only.\
JuJu Charms to deploy Trilio 4.2 in Canonical OpenStack up to wallaby release are developed and maintained by Canonical.
{% endhint %}

{% hint style="success" %}
Canonical OpenStack doesn't require the Trilio Cluster. The required services are installed and managed via JuJu Charms.
{% endhint %}

The documentation of the charms can be found here:

{% embed url="<https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-trilio-vault.html>" %}

#### Juju charms for OpenStack Yoga release onwards <a href="#juju-charms-for-yoga-release-onwards" id="juju-charms-for-yoga-release-onwards"></a>

| **Charm names**                                                                                                             | **Channel** | **Supported releases** |
| --------------------------------------------------------------------------------------------------------------------------- | ----------- | ---------------------- |
| [trilio-charmers-trilio-wlm-jammy](https://charmhub.io/trilio-charmers-trilio-wlm-jammy?channel=edge)                       | latest/edge | Jammy (Ubuntu 22.04)   |
| [trilio-charmers-trilio-dm-api-jammy](https://charmhub.io/trilio-charmers-trilio-dm-api-jammy?channel=edge)                 | latest/edge | Jammy (Ubuntu 22.04)   |
| [trilio-charmers-trilio-data-mover-jammy](https://charmhub.io/trilio-charmers-trilio-data-mover-jammy?channel=edge)         | latest/edge | Jammy (Ubuntu 22.04)   |
| [trilio-charmers-trilio-horizon-plugin-jammy](https://charmhub.io/trilio-charmers-trilio-horizon-plugin-jammy?channel=edge) | latest/edge | Jammy (Ubuntu 22.04)   |
| [trilio-charmers-trilio-wlm-focal](https://charmhub.io/trilio-charmers-trilio-wlm-focal?channel=edge)                       | latest/edge | Focal (Ubuntu 20.04)   |
| [trilio-charmers-trilio-dm-api-focal](https://charmhub.io/trilio-charmers-trilio-dm-api-focal?channel=edge)                 | latest/edge | Focal (Ubuntu 20.04)   |
| [trilio-charmers-trilio-data-mover-focal](https://charmhub.io/trilio-charmers-trilio-data-mover-focal?channel=edge)         | latest/edge | Focal (Ubuntu 20.04)   |
| [trilio-charmers-trilio-horizon-plugin-focal](https://charmhub.io/trilio-charmers-trilio-horizon-plugin-focal?channel=edge) | latest/edge | Focal (Ubuntu 20.04)   |

#### Juju charms for other supported OpenStack releases upto wallaby <a href="#juju-charms-for-other-supported-openstack-releases-upto-wallaby" id="juju-charms-for-other-supported-openstack-releases-upto-wallaby"></a>

| **Charm names**                                                                       | **Channel** | **Supported releases**                      |
| ------------------------------------------------------------------------------------- | ----------- | ------------------------------------------- |
| [trilio-wlm](https://charmhub.io/trilio-wlm?channel=4.2/stable)                       | 4.2/stable  | Focal (Ubuntu 20.04), Bionic (Ubuntu 18.04) |
| [trilio-data-mover](https://charmhub.io/trilio-data-mover?channel=4.2/stable)         | 4.2/stable  | Focal (Ubuntu 20.04), Bionic (Ubuntu 18.04) |
| [trilio-dm-api](https://charmhub.io/trilio-dm-api?channel=4.2/stable)                 | 4.2/stable  | Focal (Ubuntu 20.04), Bionic (Ubuntu 18.04) |
| [trilio-horizon-plugin](https://charmhub.io/trilio-horizon-plugin?channel=4.2/stable) | 4.2/stable  | Focal (Ubuntu 20.04), Bionic (Ubuntu 18.04) |

**Prerequisite**

Have a canonical OpenStack base setup deployed for a required release like Jammy Zed/Yoga, Focal yoga/Wallaby/Victoria/Ussuri, or Bionic Ussuri/Queens.

**Steps to install the Trilio charms**

1. Export the OpenStack base bundle

```
juju export-bundle --filename openstack_base_file.yaml
```

2\. Create a Trilio overlay bundle as per the OpenStack setup release using the charms given above.

Some sample Trilio overlay bundles can be found [here](https://github.com/trilioData/triliovault-cfg-scripts/tree/dev-stable/4.2/juju-charms/sample_overlay_bundles).

{% hint style="info" %}
NFS options for Cohesity NFS : nolock,soft,timeo=600,intr,lookupcache=none,nfsvers=3,retrans=10
{% endhint %}

{% hint style="danger" %}
Trilio File Search functionality requires that the Trilio Workload manager (trilio-wlm) be deployed as a virtual machine. File Search *will not* function if the Trilio Workload manager (trilio-wlm) is running as a lxd container(s).
{% endhint %}

3\. If file search functionality is required, provision any additional node(s) that will be required for deploying the Trilio Workload manager (trilio-wlm) as a VM instead of lxd container(s).

4\. Commission the additional node from MAAS UI.

5\. Do a dry run to check if the Trilio bundle is working

{% code fullWidth="true" %}

```
juju deploy --dry-run ./openstack_base_file.yaml --overlay <Trilio bundle path>
```

{% endcode %}

6\. Do the deployment

{% code fullWidth="true" %}

```
juju deploy ./openstack_base_file.yaml --overlay <Trilio bundle path>
```

{% endcode %}

7\. Wait till all the Trilio units are deployed successfully. Check the status via `juju status` command.

8\. Once the deployment is complete, perform the below operations:

1. Create cloud admin trust

{% code title="Juju 2.x" fullWidth="true" %}

```
juju run-action --wait trilio-wlm/leader create-cloud-admin-trust password=<openstack admin password>
```

{% endcode %}

{% code title="Juju 3.x" fullWidth="true" %}

```
juju run --wait trilio-wlm/leader create-cloud-admin-trust password=<openstack admin password>
```

{% endcode %}

2. Add license

{% code fullWidth="true" %}

```
juju attach-resource trilio-wlm license=<Path to trilio license file>
```

{% endcode %}

{% code title="Juju 2.x " fullWidth="true" %}

```
juju run-action --wait trilio-wlm/leader create-license
```

{% endcode %}

{% code title="Juju 3.x" fullWidth="true" %}

```
juju run --wait trilio-wlm/leader create-license
```

{% endcode %}

\
**Note**: Reach out to the Trilio support team for the license file.

**For multipath enabled environments, perform the following actions**

1. log into each nova compute node
2. add uxsock\_timeout with value as 60000 (i.e. 60 sec) in /etc/multipath.conf
3. restart tvault-contego service

**Sample Trilio overlay bundles**

{% hint style="info" %}
For bionic-queens `openstack-origin` parameter value for `trilio-dm-api` charm must be `cloud:bionic-train`
{% endhint %}

{% hint style="info" %}
For the AWS S3 storage backend, we need to use \`[http://s3.amazonaws.com](http://s3.amazonaws.com/)\` as S3 end-point URL.
{% endhint %}

A few Sample overlay bundles for different OpenStack versions can be found [HERE](https://github.com/trilioData/triliovault-cfg-scripts/tree/dev-stable/4.2/juju-charms/sample_overlay_bundles).
