Skip to content
Snippets Groups Projects
README.md 9.71 KiB
Newer Older
# What is this?

Installs Nextcloud and ONLYOFFICE and configures Nextcloud to use ONLYOFFICE as
its document editor. Depends on the
[Nextcloud](https://github.com/helm/charts/tree/master/stable/nextcloud)
`@stable` chart. For configuration details on Nextcloud, refer to their
documentation.

Parts of this chart are based on a copy of the [COLLABORA code helm
chart](https://github.com/helm/charts/tree/master/stable/collabora-code)


## Installation

**NOTE:** The `onlyoffice.server_name` variable needs to be
overwritten with an URL that points to your onlyoffice for this to work
correctly. See `values-local.yaml.example` for an example of domain
configurations you might want to do. These instructions assume you copy
`values-local.yaml.example` to `values-local.yaml` and edit it.

**NOTE:** It is very important that you overwrite the following password and
secrets variables manually when you run helm install:
- `nextcloud.nextcloud.password`
- `nextcloud.mariadb.db.password`
- `nextcloud.mariadb.rootUser.password`
- `onlyoffice.jwtSecret`
- `onlyoffice.database.password`
- `rabbitmq.rabbitmq.password`

helm repo add nextcloud-onlyoffice https://open.greenhost.net/api/v4/projects/1/packages/helm/stable
```

Then install the chart:

```
helm install --wait -f values-local.yaml my-nextcloud nextcloud-onlyoffice/nextcloud-onlyoffice
```

**The `--wait` is important!** We need that because of how [helm chart
hooks](https://helm.sh/docs/topics/charts_hooks/) work:
> Note that if the --wait flag is set, the library will wait until all resources
> are in a ready state and will not run the post-install hook until they are
> ready.

The job in this chart needs the Nextcloud pod to be in a ready state before
being executed.

## Apps

The Nextcloud app store allows admin users to install applications, many of
which have not undergone security testing. For that reason we disabled
downloading new apps via the app store. As the person installing Nextcloud it is
possible to specify which applications from the app store are available for
installation. It is also possible to enable them by default. Apps that are not
enabled by default can be enabled through the Apps screen in Nextcloud.

To install apps, edit the values.yaml file:

```yaml
apps:
  - name: sociallogin  # Installs sociallogin app
    enabled: false     # Disables sociallogin by default
```

## Values

The included `values.yaml` file configures Nextcloud to use a Mariadb database,
otherwise the Job cannot access the database for plugin installation.

It also configures NextCloud to use a persistent volume, because this is
necessary for the integration job to work. Be sure to change the size of the
persistent disk (default: 2 GB) if you need more.

| Parameter                                                    | Description                                                                             | Default                                  |
| ------------------------------------------------------------ | --------------------------------------------------------------------------------------- | ---------------------------------------- |
| `nextcloud.*`                                                | See [NextCloud helm chart](https://github.com/helm/charts/tree/master/stable/nextcloud) |                                          |
| `onlyoffice.replicaCount`                                    | Number of provisioner instances to deployed                                             | `1`                                      |
| `onlyoffice.strategy`                                        | Specifies the strategy used to replace old Pods by new ones                             | `Recreate`                               |
| `onlyoffice.jwtSecret`                                       | Used to set the JWT shared secret between ONLYOFFICE and NC                             | `secret`                                 |
| `onlyoffice.image.repository`                                | Provisioner image                                                                       | `onlyoffice/documentserver`              |
| `onlyoffice.image.tag`                                       | Version of provisioner image                                                            | `5.3.1.26`                               |
| `onlyoffice.image.pullPolicy`                                | Image pull policy                                                                       | `IfNotPresent`                           |
| `onlyoffice.server_name`                                     | Onlyoffice server URL                                                                   | `onlyoffice.domain`                      |
| `onlyoffice.ingress.enabled`                                 |                                                                                         | `false`                                  |
| `onlyoffice.ingress.annotations`                             |                                                                                         | `{}`                                     |
| `onlyoffice.ingress.paths`                                   |                                                                                         | `[]`                                     |
| `onlyoffice.ingress.hosts`                                   |                                                                                         | `[]`                                     |
| `onlyoffice.ingress.tls`                                     |                                                                                         | `[]`                                     |
| `onlyoffice.livenessProbe.enabled`                           | Turn on and off liveness probe                                                          | `true`                                   |
| `onlyoffice.livenessProbe.initialDelaySeconds`               | Delay before liveness probe is initiated                                                | `30`                                     |
| `onlyoffice.livenessProbe.periodSeconds`                     | How often to perform the probe                                                          | `10`                                     |
| `onlyoffice.livenessProbe.timeoutSeconds`                    | When the probe times out                                                                | `2`                                      |
| `onlyoffice.livenessProbe.successThreshold`                  | Minimum consecutive successes for the probe                                             | `1`                                      |
| `onlyoffice.livenessProbe.failureThreshold`                  | Minimum consecutive failures for the probe                                              | `3`                                      |
| `onlyoffice.readinessProbe.enabled`                          | Turn on and off readiness probe                                                         | `true`                                   |
| `onlyoffice.readinessProbe.initialDelaySeconds`              | Delay before readiness probe is initiated                                               | `30`                                     |
| `onlyoffice.readinessProbe.periodSeconds`                    | How often to perform the probe                                                          | `10`                                     |
| `onlyoffice.readinessProbe.timeoutSeconds`                   | When the probe times out                                                                | `2`                                      |
| `onlyoffice.readinessProbe.successThreshold`                 | Minimum consecutive successes for the probe                                             | `1`                                      |
| `onlyoffice.readinessProbe.failureThreshold`                 | Minimum consecutive failures for the probe                                              | `3`                                      |
| `onlyoffice.securityContext`                                 | Change pod security contenxt                                                            | `{}`                                     |
| `onlyoffice.resources`                                       | Resources required (e.g. CPU, memory)                                                   | `{}`                                     |
| `onlyoffice.nodeSelector`                                    | Node labels for pod assignment                                                          | `{}`                                     |
| `onlyoffice.affinity`                                        | Affinity settings                                                                       | `{}`                                     |
| `onlyoffice.tolerations`                                     | List of node taints to tolerate                                                         | `[]`                                     |
Maarten de Waard's avatar
Maarten de Waard committed
## Running tests

This chart comes with [Taiko tests](https://gauge.org/gauge-taiko/) that you can
run by running `helm test <release name>`. Add the `--logs` parameter if you
want to immediately see the console output from the Taiko test.

### Running the tests locally

If the tests fail, you'll want to observe the steps Taiko executes in the
browser. To do so, install Taiko with `npm`. Then you can run the following:

```
# Set environment variables to use with Taiko. Read the script to see the
# possible values and adjust them if necessary.
source get-taiko-vars.sh <release_name>
# Start Taiko and observe its steps in a browser
taiko --observe taiko-tests/test.js
```

[^1]: If you want to test a version that is not on the `main` branch yet, use `https://open.greenhost.net/api/v4/projects/1/packages/helm/unstable`