Просмотр исходного кода

Merge branch 'spantaleev:master' into master

pull/4063/head
akdk7 1 год назад
committed by GitHub
Родитель
Сommit
21a65a0841
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: B5690EEEBB952194
15 измененных файлов: 31 добавлений и 51 удалений
  1. +1
    -1
      CHANGELOG.md
  2. +12
    -0
      docs/configuring-playbook-etherpad.md
  3. +1
    -1
      docs/configuring-playbook-matrix-media-repo.md
  4. +5
    -38
      docs/configuring-playbook-postgres-backup.md
  5. +1
    -1
      docs/configuring-playbook.md
  6. +1
    -0
      docs/container-images.md
  7. +1
    -1
      docs/maintenance-postgres.md
  8. +1
    -1
      docs/updating-users-passwords.md
  9. +1
    -1
      i18n/requirements.txt
  10. +1
    -1
      requirements.yml
  11. +1
    -1
      roles/custom/matrix-bot-maubot/templates/config.yaml.j2
  12. +1
    -1
      roles/custom/matrix-bridge-mx-puppet-slack/defaults/main.yml
  13. +2
    -2
      roles/custom/matrix-synapse-auto-compressor/defaults/main.yml
  14. +1
    -1
      roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2
  15. +1
    -1
      roles/custom/matrix_playbook_migration/tasks/validate_config.yml

+ 1
- 1
CHANGELOG.md Просмотреть файл

@@ -2144,7 +2144,7 @@ matrix_coturn_tls_v1_1_enabled: true

Thanks to [foxcris](https://github.com/foxcris), the playbook can now make automated local Postgres backups on a fixed schedule using [docker-postgres-backup-local](https://github.com/prodrigestivill/docker-postgres-backup-local).

Additional details are available in [Setting up postgres backup](docs/configuring-playbook-postgres-backup.md).
Additional details are available in [Setting up Postgres backup](docs/configuring-playbook-postgres-backup.md).


# 2021-04-03


+ 12
- 0
docs/configuring-playbook-etherpad.md Просмотреть файл

@@ -1,3 +1,15 @@
<!--
SPDX-FileCopyrightText: 2021 Béla Becker
SPDX-FileCopyrightText: 2021 - 2024 Slavi Pantaleev
SPDX-FileCopyrightText: 2021 pushytoxin
SPDX-FileCopyrightText: 2022 Jim Myhrberg
SPDX-FileCopyrightText: 2022 Nikita Chernyi
SPDX-FileCopyrightText: 2022 felixx9
SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara

SPDX-License-Identifier: AGPL-3.0-or-later
-->

# Setting up Etherpad (optional)

The playbook can install and configure [Etherpad](https://etherpad.org) for you.


+ 1
- 1
docs/configuring-playbook-matrix-media-repo.md Просмотреть файл

@@ -66,7 +66,7 @@ Take a look at:
Here is a list of additional common configuration options:

```yaml
# The postgres database pooling options
# The Postgres database pooling options

# The maximum number of connects to hold open. More of these allow for more concurrent
# processes to happen.


+ 5
- 38
docs/configuring-playbook-postgres-backup.md Просмотреть файл

@@ -6,45 +6,12 @@ SPDX-FileCopyrightText: 2024 - 2025 Suguru Hirahara
SPDX-License-Identifier: AGPL-3.0-or-later
-->

# Setting up postgres backup (optional)
# Setting up Postgres backup (optional)

The playbook can install and configure [docker-postgres-backup-local](https://github.com/prodrigestivill/docker-postgres-backup-local) for you via the [ansible-role-postgres-backup](https://github.com/mother-of-all-self-hosting/ansible-role-postgres-backup) Ansible role.

For a more complete backup solution (one that includes not only Postgres, but also other configuration/data files), you may wish to look into [BorgBackup](configuring-playbook-backup-borg.md) instead.
For details about configuring and installing it, you can check them via:
- [the role's document on the MASH (mother-of-all-self-hosting) project](https://github.com/mother-of-all-self-hosting/ansible-role-postgres-backup/blob/main/docs/configuring-postgres-backup.md)
- `roles/galaxy/postgres_backup/docs/configuring-postgres-backup.md` locally, if you have fetched the Ansible roles

## Adjusting the playbook configuration

To enable Postgres backup, add the following configuration to your `inventory/host_vars/matrix.example.com/vars.yml` file:

```yaml
postgres_backup_enabled: true
```

Refer to the table below for additional configuration variables and their default values.

| Name | Default value | Description |
| :-------------------------------- | :--------------------------- | :--------------------------------------------------------------- |
|`postgres_backup_enabled`|`false`|Set to true to use [docker-postgres-backup-local](https://github.com/prodrigestivill/docker-postgres-backup-local) to create automatic database backups|
|`postgres_backup_schedule`| `'@daily'` |Cron-schedule specifying the interval between postgres backups.|
|`postgres_backup_keep_days`|`7`|Number of daily backups to keep|
|`postgres_backup_keep_weeks`|`4`|Number of weekly backups to keep|
|`postgres_backup_keep_months`|`12`|Number of monthly backups to keep|
|`postgres_backup_base_path` | `"{{ matrix_base_data_path }}/postgres-backup"` | Base path for postgres-backup. Also see `postgres_backup_data_path` |
|`postgres_backup_data_path` | `"{{ postgres_backup_base_path }}/data"` | Storage path for postgres-backup database backups |

## Installing

After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below:

<!-- NOTE: let this conservative command run (instead of install-all) to make it clear that failure of the command means something is clearly broken. -->
```sh
ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start
```

The shortcut commands with the [`just` program](just.md) are also available: `just install-all` or `just setup-all`

`just install-all` is useful for maintaining your setup quickly ([2x-5x faster](../CHANGELOG.md#2x-5x-performance-improvements-in-playbook-runtime) than `just setup-all`) when its components remain unchanged. If you adjust your `vars.yml` to remove other components, you'd need to run `just setup-all`, or these components will still remain installed. Note these shortcuts run the `ensure-matrix-users-created` tag too.

## Troubleshooting

As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-postgres-backup`.
**Note**: for a more complete backup solution (one that includes not only Postgres, but also other configuration/data files), you may wish to look into [BorgBackup](configuring-playbook-backup-borg.md) instead.

+ 1
- 1
docs/configuring-playbook.md Просмотреть файл

@@ -206,7 +206,7 @@ Services that help you in administrating and monitoring your Matrix installation
- Backups:
- [Setting up BorgBackup](configuring-playbook-backup-borg.md) — a full Matrix server backup solution, including the Postgres database

- [Setting up postgres backup](configuring-playbook-postgres-backup.md) — a Postgres-database backup solution (note: does not include other files)
- [Setting up Postgres backup](configuring-playbook-postgres-backup.md) — a Postgres-database backup solution (note: does not include other files)

### Other specialized services



+ 1
- 0
docs/container-images.md Просмотреть файл

@@ -125,6 +125,7 @@ Services that help you in administrating and monitoring your Matrix installation
| [Metrics and Graphs](configuring-playbook-prometheus-grafana.md) | [grafana/grafana](https://hub.docker.com/r/grafana/grafana/) | ❌ | Graphing tool that works well with the above two images. Our playbook also adds two dashboards for [Synapse](https://github.com/element-hq/synapse/tree/master/contrib/grafana) and [Node Exporter](https://github.com/rfrail3/grafana-dashboards) |
| [Metrics and Graphs](configuring-playbook-prometheus-grafana.md#enable-metrics-and-graphs-for-nginx-logs-optional) | [martin-helmich/prometheus-nginxlog-exporter/exporter](https://ghcr.io/martin-helmich/prometheus-nginxlog-exporter/exporter) | ❌ | Addon for Prometheus that gathers access logs from various nginx reverse-proxies |
| [Borg](configuring-playbook-backup-borg.md) | (N/A) | ❌ | Backups |
| [postgres-backup-local](configuring-playbook-postgres-backup.md) | [prodrigestivill/postgres-backup-local](https://hub.docker.com/r/prodrigestivill/postgres-backup-local) | ❌ | Create automatic database backups |
| [rageshake](configuring-playbook-rageshake.md) | [matrix-org/rageshake](https://ghcr.io/matrix-org/rageshake) | ❌ | Bug report server |
| [synapse-usage-exporter](configuring-playbook-synapse-usage-exporter.md) | Self-building | ❌ | Export the usage statistics of a Synapse homeserver to be scraped by Prometheus. |



+ 1
- 1
docs/maintenance-postgres.md Просмотреть файл

@@ -47,7 +47,7 @@ Example playbook invocations:

## Backing up PostgreSQL

To automatically make Postgres database backups on a fixed schedule, see [Setting up postgres backup](configuring-playbook-postgres-backup.md).
To automatically make Postgres database backups on a fixed schedule, see [Setting up Postgres backup](configuring-playbook-postgres-backup.md).

To make a one off back up of the current PostgreSQL database, make sure it's running and then execute a command like this on the server:



+ 1
- 1
docs/updating-users-passwords.md Просмотреть файл

@@ -22,7 +22,7 @@ You can manually generate the password hash by using the command-line after **SS
docker exec -it matrix-synapse /usr/local/bin/hash_password -c /data/homeserver.yaml
```

and then connecting to the postgres server and executing:
and then connecting to the Postgres server and executing:

```sql
UPDATE users SET password_hash = '<password-hash>' WHERE name = '@alice:example.com';


+ 1
- 1
i18n/requirements.txt Просмотреть файл

@@ -12,7 +12,7 @@ markdown-it-py==3.0.0
MarkupSafe==3.0.2
mdit-py-plugins==0.4.2
mdurl==0.1.2
myst-parser==4.0.0
myst-parser==4.0.1
packaging==24.2
Pygments==2.19.1
PyYAML==6.0.2


+ 1
- 1
requirements.yml Просмотреть файл

@@ -28,7 +28,7 @@
version: v10008-0
name: jitsi
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-ntfy.git
version: v2.11.0-0
version: v2.11.0-1
name: ntfy
- src: git+https://github.com/devture/com.devture.ansible.role.playbook_help.git
version: 201c939eed363de269a83ba29784fc3244846048


+ 1
- 1
roles/custom/matrix-bot-maubot/templates/config.yaml.j2 Просмотреть файл

@@ -28,7 +28,7 @@ plugin_directories:
# Configuration for storing plugin databases
plugin_databases:
# Some plugins still require sqlite, so configure a path here.
# postgres will be used if supported.
# Postgres will be used if supported.
sqlite: /data/dbs
postgres: default



+ 1
- 1
roles/custom/matrix-bridge-mx-puppet-slack/defaults/main.yml Просмотреть файл

@@ -108,7 +108,7 @@ matrix_mx_puppet_slack_login_shared_secret: ''
matrix_mx_puppet_slack_presence_enabled: true
matrix_mx_puppet_slack_presence_interval: 5000

# Database configuration, role uses 'sqlite' per default but playbook sets up postgres by default
# Database configuration, role uses 'sqlite' per default but playbook sets up Postgres by default
matrix_mx_puppet_slack_database_engine: sqlite

matrix_mx_puppet_slack_sqlite_database_path_local: "{{ matrix_mx_puppet_slack_data_path }}/database.db"


+ 2
- 2
roles/custom/matrix-synapse-auto-compressor/defaults/main.yml Просмотреть файл

@@ -8,11 +8,11 @@ matrix_synapse_auto_compressor_enabled: true
# renovate: datasource=docker depName=registry.gitlab.com/etke.cc/rust-synapse-compress-state
matrix_synapse_auto_compressor_version: v0.1.4

# note: UID/GID better to match the UID/GID of the postgres container, but it doesn't really matter, as volumes are not used here
# note: UID/GID better to match the UID/GID of the Postgres container, but it doesn't really matter, as volumes are not used here
matrix_synapse_auto_compressor_uid: ''
matrix_synapse_auto_compressor_gid: ''

# note: the postgres image version doesn't matter, as it is used for a SQL script that doesn't use any specific features
# note: the Postgres image version doesn't matter, as it is used for a SQL script that doesn't use any specific features
matrix_synapse_auto_compressor_postgres_image: "postgres"

matrix_synapse_auto_compressor_base_path: "{{ matrix_base_data_path }}/synapse-auto-compressor"


+ 1
- 1
roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2 Просмотреть файл

@@ -837,7 +837,7 @@ caches:
# before reconnecting. Defaults to 0, which means no limit.
#
# 'allow_unsafe_locale' is an option specific to Postgres. Under the default behavior, Synapse will refuse to
# start if the postgres db is set to a non-C locale. You can override this behavior (which is *not* recommended)
# start if the Postgres db is set to a non-C locale. You can override this behavior (which is *not* recommended)
# by setting 'allow_unsafe_locale' to true. Note that doing so may corrupt your database. You can find more information
# here: https://matrix-org.github.io/synapse/latest/postgres.html#fixing-incorrect-collate-or-ctype and here:
# https://wiki.postgresql.org/wiki/Locale_data_changes


+ 1
- 1
roles/custom/matrix_playbook_migration/tasks/validate_config.yml Просмотреть файл

@@ -423,7 +423,7 @@
- name: (Deprecation) Catch and report devture_postgres variables
ansible.builtin.fail:
msg: |-
The postgres role in the playbook now lives under the MASH organization (https://github.com/mother-of-all-self-hosting/ansible-role-postgres).
The Postgres role in the playbook now lives under the MASH organization (https://github.com/mother-of-all-self-hosting/ansible-role-postgres).
The new role is pretty much the same, but uses differently named variables.

Please change your configuration (vars.yml) to rename all `devture_postgres_`-prefixed variables (`devture_postgres_*` -> `postgres_*`).


Загрузка…
Отмена
Сохранить