Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic Helm chart releasing #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release Charts

on:
push:
branches:
- main

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"

- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.7.1

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Note: When installing to an OpenShift cluster, you must apply the `SecurityConte

To do this, run the following commands:
```
$ oc apply -f ./sources/scc/helm-components.yaml
$ oc apply -f ./charts/documentserver/sources/scc/helm-components.yaml
$ oc adm policy add-scc-to-group scc-helm-components system:authenticated
```

Expand Down Expand Up @@ -194,15 +194,15 @@ Note: When installing to an OpenShift cluster, you must apply the `SecurityConte

To do this, run the following commands:
```
$ oc apply -f ./sources/scc/docs-components.yaml
$ oc apply -f ./charts/documentserver/sources/scc/docs-components.yaml
$ oc adm policy add-scc-to-group scc-docs-components system:authenticated
```
Also, in all `yaml` files in the `deployments` directory, you must uncomment the following fields:
```
spec.template.spec.securityContext.runAsUser=101
spec.template.spec.securityContext.runAsGroup=101
```
In the `./templates/pods/example.yaml` file, you need to uncomment the following fields:
In the `./charts/documentserver/templates/pods/example.yaml` file, you need to uncomment the following fields:
```
spec.securityContext.runAsUser=1001
spec.securityContext.runAsGroup=1001
Expand All @@ -222,7 +222,7 @@ To deploy DocumentServer with the release name `documentserver`:

```bash

$ helm install documentserver ./
$ helm install documentserver ./charts/documentserver/
```

The command deploys DocumentServer on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Expand Down Expand Up @@ -289,18 +289,18 @@ The command removes all the Kubernetes components associated with the chart and
Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

```bash
$ helm install documentserver ./ --set ingress.enabled=true,ingress.ssl.enabled=true,ingress.ssl.host=example.com
$ helm install documentserver ./charts/documentserver/ --set ingress.enabled=true,ingress.ssl.enabled=true,ingress.ssl.host=example.com
```

This command gives expose documentServer via HTTPS.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```bash
$ helm install documentserver -f values.yaml ./
$ helm install documentserver -f values.yaml ./charts/documentserver/
```

> **Tip**: You can use the default [values.yaml](values.yaml)
> **Tip**: You can use the default [values.yaml](/charts/documentserver/values.yaml)

### 5. Configuration and installation details

Expand All @@ -309,19 +309,19 @@ $ helm install documentserver -f values.yaml ./
To deploy the example, set the `example.enabled` parameter to true:

```bash
$ helm install documentserver ./ --set example.enabled=true
$ helm install documentserver ./charts/documentserver/ --set example.enabled=true
```

### 5.2 Metrics deployment (optional)
To deploy metrics, set `metrics.enabled` to true:

```bash
$ helm install documentserver ./ --set metrics.enabled=true
$ helm install documentserver ./charts/documentserver/ --set metrics.enabled=true
```
If you want to use nginx ingress, set `grafana_ingress.enabled` to true:

```bash
$ helm install documentserver ./ --set grafana_ingress.enabled=true
$ helm install documentserver ./charts/documentserver/ --set grafana_ingress.enabled=true
```

### 5.3 Expose DocumentServer
Expand All @@ -335,7 +335,7 @@ Use this type of exposure if you use external TLS termination, and don't have an
To expose DocumentServer via service, set the `service.type` parameter to LoadBalancer:

```bash
$ helm install documentserver ./ --set service.type=LoadBalancer,service.port=80
$ helm install documentserver ./charts/documentserver/ --set service.type=LoadBalancer,service.port=80

```

Expand Down Expand Up @@ -370,7 +370,7 @@ $ helm install nginx-ingress ingress-nginx/ingress-nginx --set controller.publis
Note: To install Nginx Ingress with the same parameters and to enable exposing ingress-nginx metrics to be gathered by Prometheus, run the following command:

```bash
$ helm install nginx-ingress -f ./sources/ingress_values.yaml ingress-nginx/ingress-nginx
$ helm install nginx-ingress -f ./charts/documentserver/sources/ingress_values.yaml ingress-nginx/ingress-nginx
```

See more detail about installing Nginx Ingress via Helm [here](https://github.com/kubernetes/ingress-nginx/tree/master/charts/ingress-nginx).
Expand All @@ -385,7 +385,7 @@ Use this type if you use external TLS termination and when you have several WEB
To expose DocumentServer via ingress HTTP, set the `ingress.enabled` parameter to true:

```bash
$ helm install documentserver ./ --set ingress.enabled=true
$ helm install documentserver ./charts/documentserver/ --set ingress.enabled=true

```

Expand Down Expand Up @@ -420,7 +420,7 @@ $ kubectl create secret generic tls \
```

```bash
$ helm install documentserver ./ --set ingress.enabled=true,ingress.ssl.enabled=true,ingress.ssl.host=example.com
$ helm install documentserver ./charts/documentserver/ --set ingress.enabled=true,ingress.ssl.enabled=true,ingress.ssl.host=example.com

```

Expand Down Expand Up @@ -466,23 +466,23 @@ $ kubectl scale -n default deployment converter --replicas=POD_COUNT
To perform the update, run the following script:

```bash
$ ./sources/scripts/update-ds.sh -dv [DOCUMENTSERVER_VERSION]
$ ./charts/documentserver/sources/scripts/update-ds.sh -dv [DOCUMENTSERVER_VERSION]
```

Where:
- `dv` - new version of docker images for ONLYOFFICE Docs.

For example:
```bash
$ ./sources/scripts/update-ds.sh -dv 6.4.2.6
$ ./charts/documentserver/sources/scripts/update-ds.sh -dv 6.4.2.6
```

### 8. Shutdown ONLYOFFICE Docs (optional)

To perform the shutdown, run the following script:

```bash
$ ./sources/scripts/shutdown-ds.sh
$ ./charts/documentserver/sources/scripts/shutdown-ds.sh
```

### 9. Update ONLYOFFICE Docs license (optional)
Expand Down Expand Up @@ -531,7 +531,7 @@ If you have completed step [6](#6-deploy-statsd-exporter), then update the prome

```bash
helm upgrade prometheus prometheus-community/prometheus \
--set-file extraScrapeConfigs=./sources/extraScrapeConfigs.yaml
--set-file extraScrapeConfigs=./charts/documentserver/sources/extraScrapeConfigs.yaml
```

To install Grafana to your cluster, run the following command:
Expand All @@ -550,7 +550,7 @@ Run the `./sources/metrics/get_dashboard.sh` script, which will download ready-m
make the necessary edits to them and create a configmap from them. A dashboard will also be added to visualize metrics coming from the DocumentServer (it is assumed that step [#6](#6-deploy-statsd-exporter) has already been completed).

```
$ ./sources/metrics/get_dashboard.sh
$ ./charts/documentserver/sources/metrics/get_dashboard.sh
```

To install Grafana to your cluster, run the following command:
Expand Down
File renamed without changes.
74 changes: 74 additions & 0 deletions charts/documentserver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# documentserver

![Version: 7.0.0](https://img.shields.io/badge/Version-7.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 7.0.0](https://img.shields.io/badge/AppVersion-7.0.0-informational?style=flat-square)

Helm chart for installing ONLYOFFICE Docs in Kubernetes

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| connections.amqpHost | string | `"rabbitmq"` | |
| connections.amqpProto | string | `"amqp"` | |
| connections.amqpUser | string | `"user"` | |
| connections.dbHost | string | `"postgresql"` | |
| connections.dbPort | string | `"5432"` | |
| connections.dbUser | string | `"postgres"` | |
| connections.redisHost | string | `"redis-master"` | |
| converter.containerImage | string | `"onlyoffice/docs-converter-de:7.0.0.132"` | |
| converter.replicas | int | `2` | |
| converter.resources.limits | object | `{}` | |
| converter.resources.requests | object | `{}` | |
| docservice.containerImage | string | `"onlyoffice/docs-docservice-de:7.0.0.132"` | |
| docservice.livenessProbe.failureThreshold | int | `5` | |
| docservice.livenessProbe.httpGet.path | string | `"/index.html"` | |
| docservice.livenessProbe.httpGet.port | int | `8000` | |
| docservice.livenessProbe.periodSeconds | int | `10` | |
| docservice.livenessProbe.successThreshold | int | `1` | |
| docservice.livenessProbe.timeoutSeconds | int | `3` | |
| docservice.livenessProbeEnabled | bool | `true` | |
| docservice.readinessProbe.failureThreshold | int | `2` | |
| docservice.readinessProbe.httpGet.path | string | `"/index.html"` | |
| docservice.readinessProbe.httpGet.port | int | `8000` | |
| docservice.readinessProbe.periodSeconds | int | `10` | |
| docservice.readinessProbe.successThreshold | int | `1` | |
| docservice.readinessProbe.timeoutSeconds | int | `3` | |
| docservice.readinessProbeEnabled | bool | `true` | |
| docservice.replicas | int | `2` | |
| docservice.resources.limits | object | `{}` | |
| docservice.resources.requests | object | `{}` | |
| docservice.startupProbe.failureThreshold | int | `30` | |
| docservice.startupProbe.httpGet.path | string | `"/index.html"` | |
| docservice.startupProbe.httpGet.port | int | `8000` | |
| docservice.startupProbe.periodSeconds | int | `10` | |
| docservice.startupProbeEnabled | bool | `true` | |
| example.containerImage | string | `"onlyoffice/docs-example:7.0.0.132"` | |
| example.enabled | bool | `false` | |
| grafana_ingress.enabled | bool | `false` | |
| ingress.enabled | bool | `false` | |
| ingress.ssl.enabled | bool | `false` | |
| ingress.ssl.host | string | `"example.com"` | |
| ingress.ssl.secret | string | `"tls"` | |
| jwt.enabled | bool | `true` | |
| jwt.secret | string | `"MYSECRET"` | |
| metrics.enabled | bool | `false` | |
| persistence.size | string | `"8Gi"` | |
| persistence.storageClass | string | `"nfs"` | |
| product.name | string | `"onlyoffice"` | |
| proxy.livenessProbe.failureThreshold | int | `3` | |
| proxy.livenessProbe.httpGet.path | string | `"/index.html"` | |
| proxy.livenessProbe.httpGet.port | int | `8888` | |
| proxy.livenessProbe.periodSeconds | int | `10` | |
| proxy.livenessProbe.successThreshold | int | `1` | |
| proxy.livenessProbe.timeoutSeconds | int | `3` | |
| proxy.livenessProbeEnabled | bool | `true` | |
| proxy.proxyContainerImage | string | `"onlyoffice/docs-proxy-de:7.0.0.132"` | |
| proxy.resources.limits | object | `{}` | |
| proxy.resources.requests | object | `{}` | |
| proxy.startupProbe.failureThreshold | int | `30` | |
| proxy.startupProbe.httpGet.path | string | `"/index.html"` | |
| proxy.startupProbe.httpGet.port | int | `8888` | |
| proxy.startupProbe.periodSeconds | int | `10` | |
| proxy.startupProbeEnabled | bool | `true` | |
| service.port | int | `8888` | |
| service.type | string | `"ClusterIP"` | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.