383 lines
15 KiB
Markdown
383 lines
15 KiB
Markdown
Loop Enterprise Stack
|
||
====================================================
|
||
## ⚠️ **Version 2.0.0 of the loop-enterprise-stack chart, removes Bitnami Postgresql and Minio Helm charts and Bitnami image dependencies. The old chart can still be used.
|
||
---
|
||
## ⚠️ **This chart is not compatible with the previous loop chart 1.x.x and should not be used to upgrade the previous chart. All data can be lost. The migration procedure will provided in due course.**
|
||
|
||
## ⚠️ **The default values for minio and postgres are specified in the chart, they must be changed by you.
|
||
|
||
## ⚠️ **Этот chart несовместим с предыдущим loop chart 1.x.x, и не должн использоваться для обновления предыдущей версии loop chart. Все данные могут быть потеряны
|
||
|
||
## ⚠️ **В chart указаны значения для minio и postgres по умолчанию, они должны быть изменены вами
|
||
---
|
||
|
||
This chart deploys Loop Enterprise Edition, Postgresql and Minio. It is subject to changes. To use external Postgresql and S3 resources deploy the Loop Enterprise Edition chart.
|
||
|
||
# 1. Prerequisites
|
||
|
||
## 1.1 Kubernetes Cluster
|
||
|
||
You need a running Kubernetes cluster v1.8+. If you do not have one, find options and installation instructions here:
|
||
|
||
https://kubernetes.io/docs/setup/pick-right-solution/
|
||
|
||
## 1.2 Helm
|
||
|
||
See: https://docs.helm.sh/using_helm/#quickstart
|
||
|
||
We recommend installing Helm v2.13.1 or later.
|
||
|
||
Once Helm is installed and initialized, run the following:
|
||
|
||
```bash
|
||
helm repo add loop https://artifacts.wilix.dev/repository/helm-loop
|
||
```
|
||
|
||
## 1.3 Ingress
|
||
|
||
To expose the application outside of your network, configure an ingress if your Kubernetes cluster doesn't already have one.
|
||
|
||
We suggest using [nginx-ingress](https://github.com/kubernetes/ingress-nginx), which we use internally at Loop.
|
||
|
||
To install nginx-ingress in your Kubernetes cluster, follow [the official installation documentation](https://kubernetes.github.io/ingress-nginx/deploy/). You may also use the [helm charts](https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx) directly.
|
||
|
||
To get the nginx cache to work, adjust the ConfigMap and Deployment from the above instructions.
|
||
|
||
## 1.4 Certificate Manager
|
||
|
||
If you do not want to manually add SSL/TLS certificates, install [cert-manager](https://github.com/jetstack/cert-manager). You can follow [this documentation](https://cert-manager.io/docs/) or install the [helm charts](https://artifacthub.io/packages/helm/cert-manager/cert-manager).
|
||
|
||
To run with HTTPS you will need to add a Kubernetes secret for your SSL/TLS certificate, whether you use cert-manager or not.
|
||
|
||
# 2. Configuration
|
||
|
||
## 2.1 Required Settings
|
||
|
||
At minimum the following settings must be updated:
|
||
|
||
* `MM_SERVICESETTINGS_SITEURL:` - set this to the URL your users will use to access Loop, e.g. `https://loop.example.com`
|
||
* Database Configuration
|
||
* Object Storage Configuration
|
||
|
||
Without these settings, Loop will not run correctly.
|
||
|
||
## 2.2 Application Version
|
||
|
||
To set the Loop application version, update:
|
||
|
||
* `image.tag` - set this to the Loop server version you wish to install (e.g. `2025-06-10-1`)
|
||
|
||
## 2.3 Ingress
|
||
|
||
If you are using nginx-ingress, set the following:
|
||
|
||
```yaml
|
||
ingress:
|
||
enabled: true
|
||
hosts:
|
||
- loop.example.com
|
||
```
|
||
|
||
where `loop.example.com` is your domain name and matches `MM_SERVICESETTINGS_SITEURL:`.
|
||
|
||
### 2.3.1 HTTPS
|
||
|
||
To run with HTTPS, add an SSL/TLS certificate as a secret to your Kubernetes cluster, either manually or [using cert-manager](#14-certificate-manager).
|
||
|
||
Set the following to enable HTTPS:
|
||
|
||
```yaml
|
||
ingress:
|
||
enabled: true
|
||
hosts:
|
||
- loop.example.com
|
||
tls:
|
||
- secretName: your-tls-secret-name
|
||
hosts:
|
||
- loop.example.com
|
||
```
|
||
|
||
### 2.3.2 DNS
|
||
|
||
To route users from your domain name to your Loop installation, point your domain name at the external IP or domain that your ingress exposes.
|
||
|
||
Depending on the DNS service and Ingress you're using, the steps can vary. If you are using nginx-ingress, you would do something like this:
|
||
|
||
1. Run `kubectl describe svc your-nginx-ingress-controller`
|
||
* Replace `your-nginx-ingress-controller` with the name of your ingress controller service
|
||
2. Copy the domain name beside `LoadBalancer Ingress:`
|
||
3. On your DNS service, create a CNAME record pointing from the domain you'd like to use to the domain name you just copied
|
||
4. Save, and wait 10-15 minutes for the DNS change to propagate
|
||
|
||
## 2.4 Database and Object Storage
|
||
|
||
### 2.4.1 Database
|
||
|
||
We recommend updating the following settings:
|
||
|
||
Loop:
|
||
|
||
* Set `MM_SQLSETTINGS_DRIVERNAME:` to `postgres`
|
||
* Set `MM_SQLSETTINGS_DATASOURCE:`, in secret-values.yaml, to your master DB connection string
|
||
* (Optional) Set `MM_SQLSETTINGS_DATASOURCEREPLICAS:` to an array of read replica connection strings
|
||
|
||
Postgresql:
|
||
|
||
* `postgresql.userDatabase.name`
|
||
* `postgresql.userDatabase.user`
|
||
* `postgresql.userDatabase.password`
|
||
|
||
### 2.4.2 Storage
|
||
|
||
We use Minio for file storage.
|
||
|
||
We recommend updating the following settings:
|
||
|
||
Loop:
|
||
* `MM_FILESETTINGS_AMAZONS3ACCESSKEYID:`
|
||
* `MM_FILESETTINGS_AMAZONS3SECRETACCESSKEY:`
|
||
* `MM_FILESETTINGS_AMAZONS3BUCKET:`
|
||
* `MM_FILESETTINGS_AMAZONS3ENDPOINT:`
|
||
|
||
Minio:
|
||
* `rootUser:`
|
||
* `rootPassword:`
|
||
```yaml
|
||
users:
|
||
- accessKey:
|
||
secretKey:
|
||
```
|
||
|
||
## 2.5 Push Notifications
|
||
|
||
By default push notifications are enabled using HPNS.
|
||
|
||
### 2.5.1
|
||
|
||
#### Settings for pushproxy
|
||
|
||
# 3. Install
|
||
|
||
After adding the Loop repo (see section 1.2) you can install a version of the preferred chart by running:
|
||
|
||
```bash
|
||
$ helm repo add loop https://artifacts.wilix.dev/repository/helm-loop
|
||
$ helm install <name> loop/loop-enterprise-stack --version <version_number>
|
||
```
|
||
|
||
For example:
|
||
```bash
|
||
$ helm repo add loop https://artifacts.wilix.dev/repository/helm-loop
|
||
$ helm install <name> loop/loop-enterprise-stack --version 2.0.0
|
||
```
|
||
|
||
If no Helm Chart version is specified the latest version will be installed.
|
||
|
||
To run with your custom `config.yaml`, install using:
|
||
```bash
|
||
$ helm install -f config.yaml loop/loop-enterprise-stack
|
||
```
|
||
|
||
To upgrade an existing release, modify the `config.yaml` with your desired changes and then use:
|
||
```bash
|
||
$ helm upgrade -f config.yaml <your-release-name> loop/loop-enterprise-stack
|
||
```
|
||
|
||
## 3.1 Uninstalling Loop Enterprise Helm Chart
|
||
|
||
If you are done with your deployment and want to delete it, use `helm delete <your-release-name>`. If you don't know the name of your release, use `helm ls` to find it.
|
||
|
||
---
|
||
**[RU Русская версия]**
|
||
---
|
||
|
||
# Loop Enterprise Stack
|
||
|
||
Данный чарт разворачивает Loop Enterprise Edition, Postgresql и Minio.
|
||
# 1. Предварительные требования
|
||
|
||
## 1.1 Кластер Kubernetes
|
||
|
||
Необходим работающий кластер Kubernetes версии v1.8+. Если у вас его нет, ознакомьтесь с доступными вариантами и инструкцией по установке здесь:
|
||
|
||
[https://kubernetes.io/docs/setup/pick-right-solution/](https://kubernetes.io/docs/setup/pick-right-solution/)
|
||
|
||
## 1.2 Helm
|
||
|
||
См.: [https://docs.helm.sh/using\_helm/#quickstart](https://docs.helm.sh/using_helm/#quickstart)
|
||
|
||
Рекомендуется установить Helm версии v2.13.1 или новее.
|
||
|
||
После установки и инициализации Helm выполните следующую команду:
|
||
|
||
```bash
|
||
helm repo add loop https://artifacts.wilix.dev/repository/helm-loop
|
||
```
|
||
|
||
## 1.3 Ingress
|
||
|
||
Чтобы опубликовать приложение вне вашей локальной сети, настройте ingress, если в вашем кластере Kubernetes он ещё не настроен.
|
||
|
||
Рекомендуем использовать [nginx-ingress](https://github.com/kubernetes/ingress-nginx), который мы используем внутри Loop.
|
||
|
||
Чтобы установить nginx-ingress в кластер Kubernetes, следуйте [официальной документации по установке](https://kubernetes.github.io/ingress-nginx/deploy/). Также можно использовать [чарты Helm](https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx).
|
||
|
||
Чтобы nginx-кеш работал корректно, отредактируйте ConfigMap и Deployment согласно вышеуказанной инструкции.
|
||
|
||
## 1.4 Менеджер сертификатов
|
||
|
||
Если вы не хотите вручную добавлять SSL/TLS сертификаты, установите [cert-manager](https://github.com/jetstack/cert-manager). Вы можете следовать [этой документации](https://cert-manager.io/docs/) или установить [чарты Helm](https://artifacthub.io/packages/helm/cert-manager/cert-manager).
|
||
|
||
Для запуска через HTTPS потребуется добавить Kubernetes-секрет с SSL/TLS сертификатом, независимо от того, используете ли вы cert-manager или нет.
|
||
|
||
# 2. Конфигурация
|
||
|
||
## 2.1 Обязательные настройки
|
||
|
||
**Минимально необходимые настройки:**
|
||
|
||
-- `MM_SERVICESETTINGS_SITEURL:` — установите в адрес, по которому пользователи будут получать доступ к Loop, например:
|
||
`https://loop.example.com`
|
||
|
||
- **Конфигурация базы данных (раздел 2.4.1)** — необходимо настроить подключение к PostgreSQL.
|
||
Это может быть внешний сервер или встроенный через Helm-чарт.
|
||
|
||
- **Конфигурация объектного хранилища (раздел 2.6.1)** — нужно подключить MinIO или другое совместимое S3-хранилище.
|
||
|
||
Без этих параметров Loop **не будет работать корректно** — сервис не сможет ни загрузить данные, ни сохранить файлы.
|
||
|
||
## 2.2 Версия приложения
|
||
|
||
Укажите тег образа Loop:
|
||
```yaml
|
||
image:
|
||
tag: "2025-06-10-1" # Например, 2025-06-10-1
|
||
```
|
||
|
||
## 2.3 Настройка Ingress
|
||
|
||
### **2.3.1 Ingress с nginx ingress controller**
|
||
|
||
Если вы используете `nginx-ingress-controller`, добавьте следующее:
|
||
|
||
```yaml
|
||
ingress:
|
||
enabled: true
|
||
hosts:
|
||
- loop.example.com
|
||
```
|
||
|
||
Здесь `loop.example.com` — это ваш домен, и он **должен совпадать с `MM_SERVICESETTINGS_SITEURL:`** (например, `https://loop.example.com`).
|
||
|
||
### **2.3.2 HTTPS (SSL/TLS)**
|
||
|
||
Чтобы использовать HTTPS:
|
||
|
||
1. Создайте TLS-секрет в Kubernetes **вручную** или с помощью **cert-manager**.
|
||
2. Укажите его в `values.yaml` Helm-чарта:
|
||
|
||
```yaml
|
||
ingress:
|
||
enabled: true
|
||
hosts:
|
||
- loop.example.com
|
||
tls:
|
||
- secretName: your-tls-secret-name
|
||
hosts:
|
||
- loop.example.com
|
||
```
|
||
|
||
`secretName` — это имя созданного TLS-секрета с ключом и сертификатом (например, от Let's Encrypt или корпоративного CA).
|
||
|
||
### 2.3.2 DNS
|
||
|
||
Чтобы направить пользователей с вашего домена на установку Loop, укажите домен на внешний IP или имя хоста, которое предоставляет ваш ingress.
|
||
|
||
В зависимости от используемого DNS-сервиса и Ingress-контроллера шаги могут отличаться. Если вы используете nginx-ingress, выполните следующее:
|
||
|
||
1. Выполните `kubectl describe svc your-nginx-ingress-controller`
|
||
|
||
* Замените `your-nginx-ingress-controller` на имя сервиса вашего ingress-контроллера
|
||
2. Скопируйте имя хоста, указанное рядом с `LoadBalancer Ingress:`
|
||
3. В DNS-сервисе создайте CNAME-запись, указывающую с вашего домена на скопированное имя хоста
|
||
4. Сохраните изменения и подождите 10–15 минут, пока DNS-изменения вступят в силу
|
||
|
||
## 2.4 База данных и хранилище объектов
|
||
|
||
### 2.4.1 База данных
|
||
|
||
Мы используем чарт Postgresql.
|
||
|
||
Рекомендуется обновить следующие параметры:
|
||
|
||
Loop:
|
||
|
||
* Установите `MM_SQLSETTINGS_DRIVERNAME:` в значение postgres
|
||
* Настройте `MM_SQLSETTINGS_DATASOURCE:` в файле secret-values.yaml, указав строку подключения к основной базе данных
|
||
* (Опционально) Настройте `MM_SQLSETTINGS_DATASOURCEREPLICAS:` как массив строк подключения к репликам для чтения
|
||
|
||
Postgresql:
|
||
|
||
* `postgresql.userDatabase.name`
|
||
* `postgresql.userDatabase.user`
|
||
* `postgresql.userDatabase.password`
|
||
|
||
### 2.4.2 Хранилище
|
||
|
||
Для хранения файлов используется Minio.
|
||
|
||
Рекомендуется обновить следующие параметры:
|
||
|
||
Loop:
|
||
* `MM_FILESETTINGS_AMAZONS3ACCESSKEYID:`
|
||
* `MM_FILESETTINGS_AMAZONS3SECRETACCESSKEY:`
|
||
* `MM_FILESETTINGS_AMAZONS3BUCKET:`
|
||
* `MM_FILESETTINGS_AMAZONS3ENDPOINT:`
|
||
|
||
Minio:
|
||
* `rootUser:`
|
||
* `rootPassword:`
|
||
```yaml
|
||
users:
|
||
- accessKey:
|
||
secretKey:
|
||
```
|
||
|
||
## 2.5 Push-уведомления
|
||
|
||
По умолчанию push-уведомления включены и используют HPNS.
|
||
|
||
# 3. Установка
|
||
|
||
После добавления репозитория Loop (см. раздел 1.2), установите нужную версию чарта с помощью команды:
|
||
|
||
```bash
|
||
$ helm repo add loop https://artifacts.wilix.dev/repository/helm-loop
|
||
$ helm install <name> loop/loop-enterprise-stack --version <version_number>
|
||
```
|
||
|
||
Пример:
|
||
|
||
```bash
|
||
$ helm repo add loop https://artifacts.wilix.dev/repository/helm-loop
|
||
$ helm install <name> loop/loop-enterprise-stack --version 2.0.0
|
||
```
|
||
|
||
Если версия чарта не указана, будет установлена последняя доступная.
|
||
|
||
Чтобы установить с пользовательским `config.yaml`, выполните:
|
||
|
||
```bash
|
||
$ helm install -f config.yaml loop/loop-enterprise-stack
|
||
```
|
||
|
||
Для обновления существующего релиза измените `config.yaml` и выполните:
|
||
|
||
```bash
|
||
$ helm upgrade -f config.yaml <your-release-name> loop/loop-enterprise-stack
|
||
```
|
||
|
||
## 3.1 Удаление Helm-чарта Loop Enterprise
|
||
|
||
Если вы завершили работу с loop и хотите удалить инстанс, выполните `helm delete <your-release-name>`. Если вы не знаете имя релиза, используйте `helm ls` для его поиска.
|