# Getting started with Trilio 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="success" %}
Canonical OpenStack doesn't require the Trilio Cluster. The required services are installed and managed via JuJu Charms.
{% endhint %}

## Juju charms for OpenStack Antelope & Bobcat release

| **Charm names**                                                                                    | **Channel**   | **Supported releases** |
| -------------------------------------------------------------------------------------------------- | ------------- | ---------------------- |
| [trilio-charmers-trilio-wlm](https://charmhub.io/trilio-charmers-trilio-wlm)                       | latest/stable | Jammy (Ubuntu 22.04)   |
| [trilio-charmers-trilio-dm-api](https://charmhub.io/trilio-charmers-trilio-dm-api)                 | latest/stable | Jammy (Ubuntu 22.04)   |
| [trilio-charmers-trilio-data-mover](https://charmhub.io/trilio-charmers-trilio-data-mover)         | latest/stable | Jammy (Ubuntu 22.04)   |
| [trilio-charmers-trilio-horizon-plugin](https://charmhub.io/trilio-charmers-trilio-horizon-plugin) | latest/stable | Jammy (Ubuntu 22.04)   |

## Prerequisite

A Canonical OpenStack base setup deployed for a required release like Jammy Antelope/Bobcat. Refer [Compatibility Matrix](/openstack/t4o-5.x/about-trilio-for-openstack/support-matrix.md)

## 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.

{% 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 %}

{% hint style="danger" %}
If trilio-wlm service is assigned to any nova-compute node then wlm mysql router service fails to start. Hence, please ensure to assign trilio-wlm service to some other node.
{% endhint %}

Sample Trilio overlay bundles (*T4O release wise*) can be found at [LINK](https://github.com/trilioData/triliovault-cfg-scripts/tree/maint/5.2/juju-charms/sample_overlay_bundles)

Alternatively, `triliovault-cfg-scripts` repository can be cloned to get the sample overlay bundles.

{% hint style="info" %}
Value of `trilio_branch` can be taken from release specific [Resources](/openstack/t4o-5.x/about-trilio-for-openstack/artifacts.md)
{% endhint %}

{% code fullWidth="true" %}

```
git clone https://github.com/trilioData/triliovault-cfg-scripts.git
cd triliovault-cfg-scripts
git checkout {{ trilio_branch }}
cd juju-charms/sample_overlay_bundles
```

{% endcode %}

Following table provides the details of various values to be updated in overlay bundle.

| **Parameters**              | **Summary**                                                                                                                                                                                                          |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| triliovault-pkg-source      | Trilio debian package repo url; Refer release specific [Resources](/openstack/t4o-5.x/about-trilio-for-openstack/artifacts.md) page                                                                                  |
| machines                    | List of Machines available on canonical openstack setup                                                                                                                                                              |
| channel                     | Channel name as provided in release specific [Resources](/openstack/t4o-5.x/about-trilio-for-openstack/artifacts.md) page                                                                                            |
| revision                    | Latest values as provided by Trilio. Refer release specific [Resources](/openstack/t4o-5.x/about-trilio-for-openstack/artifacts.md) page                                                                             |
| **If Backup Target is NFS** |                                                                                                                                                                                                                      |
| nfs-shares                  | NFS server IP and share path                                                                                                                                                                                         |
| nfs-options                 | Options as per respective NFS server                                                                                                                                                                                 |
| **If Backup Target is S3**  |                                                                                                                                                                                                                      |
| tv-s3-endpoint-url          | S3 Endpoint URL                                                                                                                                                                                                      |
| tv-s3-secret-key            | S3 Secret Key                                                                                                                                                                                                        |
| tv-s3-access-key            | S3 Access Key                                                                                                                                                                                                        |
| tv-s3-region-name           | S3 Region                                                                                                                                                                                                            |
| tv-s3-bucket                | S3 bucket                                                                                                                                                                                                            |
| tv-s3-ssl                   | Set true for SSL enabled S3 endpoint URL                                                                                                                                                                             |
| tv-s3-ssl-verify            | Set true for SSL enabled S3 endpoint URL                                                                                                                                                                             |
| tv-s3-ssl-cert              | Required if S3 SSL/TLS certificates are self signed, else the parameter to be omitted. Provide path of the respective certificate file (.pem) from S3 in format `tv-s3-ssl-cert: include-base64://<path_to_ca_cert>` |

{% hint style="info" %}
For the AWS S3 storage backend, S3 end-point URL should be left blank.
{% endhint %}

#### 3. T4O Deployment

3.1] 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 %}

3.2] Trigger deployment

{% code fullWidth="true" %}

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

{% endcode %}

3.3] Wait until all the Trilio units are deployed successfully. Check the status via `juju status` command.

#### 4. Post Deployment Steps

4.1] Once the deployment is complete, perform the below operations:

a. Create cloud admin trust & add licence

{% tabs %}
{% tab title="Juju 3.x" %}
{% code overflow="wrap" %}

```
juju run --wait trilio-wlm/leader create-cloud-admin-trust password=<openstack admin password>
juju attach-resource trilio-wlm license=<Path to trilio license file>
juju run --wait trilio-wlm/leader create-license
```

{% endcode %}
{% endtab %}

{% tab title="Juju 2.x" %}
{% code overflow="wrap" %}

```
juju run --wait trilio-wlm/leader create-cloud-admin-trust password=<openstack admin password>
juju attach-resource trilio-wlm license=<Path to trilio license file>
juju run-action --wait trilio-wlm/leader create-license
```

{% endcode %}
{% endtab %}
{% endtabs %}

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

#### 5. Verify the T4O Deployment

5.1] After T4O deployment steps are over, it can take sometime for all units to get deployed successfully. Deployment is considered successful when all the units show `Unit is Ready` in the message column.

To verify the same, following command (*& sample output*) can be used to fetch the Trilio units/applications.

{% code overflow="wrap" %}

```
juju status | grep -i trilio

trilio-data-mover               5.2.8.14  active      3  trilio-charmers-trilio-data-mover      latest/candidate   22  no       Unit is ready
trilio-data-mover-mysql-router  8.0.39    active      3  mysql-router                           8.0/stable        200  no       Unit is ready
trilio-dm-api                   5.2.8     active      1  trilio-charmers-trilio-dm-api          latest/candidate   17  no       Unit is ready
trilio-dm-api-mysql-router      8.0.39    active      1  mysql-router                           8.0/stable        200  no       Unit is ready
trilio-horizon-plugin           5.2.8.8   active      1  trilio-charmers-trilio-horizon-plugin  latest/candidate   10  no       Unit is ready
trilio-wlm                      5.2.8.15  active      1  trilio-charmers-trilio-wlm             latest/candidate   18  no       Unit is ready
trilio-wlm-mysql-router         8.0.39    active      1  mysql-router                           8.0/stable        200  no       Unit is ready
  trilio-data-mover-mysql-router/2   active    idle            172.20.1.5                          Unit is ready
  trilio-data-mover/1                active    idle            172.20.1.5                          Unit is ready
  trilio-data-mover-mysql-router/0*  active    idle            172.20.1.7                          Unit is ready
  trilio-data-mover/2                active    idle            172.20.1.7                          Unit is ready
  trilio-data-mover-mysql-router/1   active    idle            172.20.1.8                          Unit is ready
  trilio-data-mover/0*               active    idle            172.20.1.8                          Unit is ready
  trilio-horizon-plugin/0*           active    idle            172.20.1.27                         Unit is ready
trilio-dm-api/0*                     active    idle   1/lxd/2  172.20.1.29     8784/tcp            Unit is ready
  trilio-dm-api-mysql-router/0*      active    idle            172.20.1.29                         Unit is ready
trilio-wlm/0*                        active    idle   1        172.20.1.4      8780/tcp            Unit is ready
  trilio-wlm-mysql-router/0*         active    idle            172.20.1.4                          Unit is ready
```

{% endcode %}

#### 6. Troubleshooting T4O Deployment

6.1] To debug any specific unit : juju debug-log --include \<UNIT\_NAME\_IN\_ERROR>

Eg. If trilio-wlm/6 unit is in 'error' state, it's logs can be fetched using following command. Specific correct unit number from respective deployment using `juju status` command.

`juju debug log --include trilio-wlm/6`

**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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trilio.io/openstack/t4o-5.x/deployment/installing-on-canonical.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
