Skip to content
Snippets Groups Projects
Verified Commit faf93653 authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

update readme and docs in templates/nextcloud-onlyoffice-config.yaml

parent 6f29f619
No related branches found
No related tags found
1 merge request!300Resolve "Migrate jobs to postStartCommand"
Pipeline #31344 failed with stages
in 1 hour and 15 seconds
......@@ -28,6 +28,11 @@ secrets variables manually when you run helm install:
- `onlyoffice.database.password`
- `rabbitmq.rabbitmq.password`
**NOTE:** The chart currently includes a ConfigMap with a name that is not
dependent on the release name. This means that the chart cannot be installed
more than once into the same namespace. If you need to install Nextcloud and
Onlyoffice several times into the same cluster, use different namespaces.
### Install from the remote repo
This is the way to go if you want to use the packaged chart as is. If you'd like to make changes before installing, refer to the next section.
......@@ -41,19 +46,9 @@ helm repo add nextcloud-onlyoffice https://open.greenhost.net/api/v4/projects/1/
Then install the chart:
```console
helm install --wait -f values-local.yaml my-nextcloud nextcloud-onlyoffice/nextcloud-onlyoffice
helm install -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.
### Install from a local repo
Start by cloning the nextcloud helm chart repo:
......@@ -78,18 +73,21 @@ helm dependency build
Then install the chart:
```console
helm install --wait -f values-local.yaml my-nextcloud .
helm install -f values-local.yaml my-nextcloud .
```
**The `--wait` is important!** We need that because of how [helm chart
hooks](https://helm.sh/docs/topics/charts_hooks/) work:
## Nextcloud configuration.
> 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.
This chart adds a "postStart" command to the Nextcloud pod, that installs apps
(see below) and applies a custom configuration to set up those apps and
integration with ONLYOFFICE as well as the Stackspin OIDC provider.
The job in this chart needs the Nextcloud pod to be in a ready state before
being executed.
Kubernetes postStart commands do not log to the pod log. Instead, the script
creates its own log in `/var/www/html/data/postStart.log`. This means that even
if you can't `exec` into the pod (because something is failing), you can see the
logs inside the `data` folder in the PVC. Often, if the `postStart` command
fails, you can also see the problem by running `kubectl describe pod <nextcloud
pod>`.
## Apps
......
......@@ -12,8 +12,9 @@ metadata:
data:
setup-apps.sh: |
#!/bin/bash
#
# This script gets executed by a post-install,post-upgrade helm hook, which
# This script gets executed as a postStart command inside the Nextcloud pod.
# The script:
#
# * Installs all apps declared in the `apps` helm values array
# * Installs all apps
......@@ -24,6 +25,7 @@ data:
# * Configures single-sign-on
# * Persists and loads the config.json config file
# * Updates database indices, columns, keys, etc needed after NC upgrade
# * Writes a log to /var/www/html/data/postStart.log
exec 1>/var/www/html/data/postStart.log
# Copied from the NC docker entrypoint to run OCC commands
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment