mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-08-25 16:21:31 +02:00
Compare commits
13 Commits
56cf263eb2
...
50813c600d
Author | SHA1 | Date | |
---|---|---|---|
|
50813c600d | ||
|
17b109d9f6 | ||
|
42c036c920 | ||
|
23dda314ef | ||
|
661f8c7121 | ||
|
0e05a332db | ||
|
d0fd25dcda | ||
|
9a8c9850aa | ||
|
a34ab87782 | ||
|
b5ec8f83b1 | ||
|
ffd5829476 | ||
|
859f4ca26b | ||
|
0b4309c8ef |
26
CHANGELOG.md
26
CHANGELOG.md
@@ -1,3 +1,29 @@
|
||||
# 2024-03-26
|
||||
|
||||
## (Backward Compatibility Break) The playbook now defaults to KeyDB, instead of Redis
|
||||
|
||||
**TLDR**: if the playbook used installed Redis as a dependency for you before, it will now replace it with [KeyDB](https://docs.keydb.dev/) (a drop-in alternative) due to [Redis having changed its license](https://redis.com/blog/redis-adopts-dual-source-available-licensing/).
|
||||
|
||||
Thanks to [Aine](https://gitlab.com/etke.cc) of [etke.cc](https://etke.cc/), the playbook now uses [KeyDB](https://docs.keydb.dev/) (a drop-in alternative for Redis), instead of [Redis](https://redis.io/).
|
||||
|
||||
The playbook used to install Redis (and now installs KeyDB in its place) if services have a need for it ([enabling worker support for Synapse](docs/configuring-playbook-synapse.md#load-balancing-with-workers), [enabling Hookshot encryption](docs/configuring-playbook-bridge-hookshot.md#end-to-bridge-encryption), etc.) or if you explicitly enabled the service (`redis_enabled: true` or `keydb_enabled: true`).
|
||||
|
||||
This change is provoked by the fact that [Redis is now "source available"](https://redis.com/blog/redis-adopts-dual-source-available-licensing/). According to the Limitations of [the new license](https://redis.com/legal/rsalv2-agreement/) (as best as we understand them, given that we're not lawyers), using Redis in the playbook (even in a commercial FOSS service like [etke.cc](https://etke.cc/)) does not violate the new Redis license. That said, we'd rather neither risk it, nor endorse shady licenses and products that pretend to be free-software. Another high-quality alternative to Redis seems to be [Dragonfly](https://www.dragonflydb.io/), but the [Dragonfly license](https://github.com/dragonflydb/dragonfly?tab=License-1-ov-file#readme) is no better than Redis's.
|
||||
|
||||
Next time your run the playbook (via the `setup-all` tag), **Redis will be automatically uninstalled and replaced with KeyDB**. Some Synapse downtime may occur while the switch happens.
|
||||
|
||||
Users on `arm32` should be aware that there's **neither a prebuilt `arm32` container image for KeyDB**, nor the KeyDB role supports self-building yet. Users on this architecture likely don't run Synapse with workers, etc., so they're likely in no need of KeyDB (or Redis). If Redis is necessary in an `arm32` deployment, disabling KeyDB and making the playbook fall back to Redis is possible (see below).
|
||||
|
||||
**The playbook still supports Redis** and you can keep using Redis (for now) if you'd like, by adding this additional configuration to your `vars.yml` file:
|
||||
|
||||
```yml
|
||||
# Explicitly disable KeyDB, which will auto-enable Redis
|
||||
# if the playbook requires it as a dependency for its operation.
|
||||
keydb_enabled: false
|
||||
```
|
||||
|
||||
|
||||
|
||||
# 2024-03-24
|
||||
|
||||
## Initial work on IPv6 support
|
||||
|
@@ -2,8 +2,8 @@
|
||||
# If you'd rather use a local IP here, make sure to set up `matrix_coturn_turn_external_ip_address`.
|
||||
#
|
||||
# To connect using a non-root user (and elevate to root with sudo later),
|
||||
# replace `ansible_ssh_user=root` with something like this: `ansible_ssh_user=username ansible_become=true ansible_become_user=root`.
|
||||
# If sudo requires a password, either add `ansible_become_password=PASSWORD_HERE` to the host line
|
||||
# replace `ansible_ssh_user=root` with something like this: `ansible_ssh_user=username become=true become_user=root`.
|
||||
# If sudo requires a password, either add `become_password=PASSWORD_HERE` to the host line
|
||||
# or tell Ansible to ask you for the password interactively by adding a `--ask-become-pass` (`-K`) flag to all `ansible-playbook` (or `just`) commands.
|
||||
#
|
||||
# For improved Ansible performance, SSH pipelining is enabled by default in `ansible.cfg`.
|
||||
|
@@ -402,6 +402,8 @@ devture_systemd_service_manager_services_list_auto: |
|
||||
+
|
||||
([{'name': (redis_identifier + '.service'), 'priority': 750, 'groups': ['matrix', 'redis']}] if redis_enabled else [])
|
||||
+
|
||||
([{'name': (keydb_identifier + '.service'), 'priority': 750, 'groups': ['matrix', 'keydb']}] if keydb_enabled else [])
|
||||
+
|
||||
([{'name': 'matrix-pantalaimon.service', 'priority': 4000, 'groups': ['matrix', 'pantalaimon']}] if matrix_pantalaimon_enabled else [])
|
||||
+
|
||||
([{'name': 'matrix-registration.service', 'priority': 4000, 'groups': ['matrix', 'registration', 'matrix-registration']}] if matrix_registration_enabled else [])
|
||||
@@ -1862,12 +1864,14 @@ matrix_hookshot_systemd_wanted_services_list: |
|
||||
matrix_addons_homeserver_systemd_services_list
|
||||
+
|
||||
([(redis_identifier + '.service')] if redis_enabled and matrix_hookshot_queue_host == redis_identifier else [])
|
||||
+
|
||||
([(keydb_identifier + '.service')] if keydb_enabled and matrix_hookshot_queue_host == keydb_identifier else [])
|
||||
}}
|
||||
|
||||
# Hookshot's experimental encryption feature (and possibly others) may benefit from Redis, if available.
|
||||
# We only connect to Redis if encryption is enabled (not for everyone who has Redis enabled),
|
||||
# because connectivity is still potentially troublesome and is to be investigated.
|
||||
matrix_hookshot_queue_host: "{{ redis_identifier if redis_enabled and matrix_hookshot_experimental_encryption_enabled else '' }}"
|
||||
matrix_hookshot_queue_host: "{{ redis_identifier if redis_enabled and matrix_hookshot_experimental_encryption_enabled else (keydb_identifier if keydb_enabled and matrix_hookshot_experimental_encryption_enabled else '') }}"
|
||||
|
||||
matrix_hookshot_container_network: "{{ matrix_addons_container_network }}"
|
||||
|
||||
@@ -1878,6 +1882,8 @@ matrix_hookshot_container_additional_networks_auto: |
|
||||
+
|
||||
([redis_container_network] if redis_enabled and matrix_hookshot_queue_host == redis_identifier else [])
|
||||
+
|
||||
([keydb_container_network] if keydb_enabled and matrix_hookshot_queue_host == keydb_identifier else [])
|
||||
+
|
||||
([matrix_playbook_reverse_proxyable_services_additional_network] if matrix_playbook_reverse_proxyable_services_additional_network and matrix_hookshot_container_labels_traefik_enabled else [])
|
||||
) | unique
|
||||
}}
|
||||
@@ -3956,7 +3962,7 @@ ntfy_visitor_request_limit_exempt_hosts_hostnames_auto: |
|
||||
#
|
||||
######################################################################
|
||||
|
||||
redis_enabled: "{{ matrix_synapse_workers_enabled or (matrix_hookshot_enabled and matrix_hookshot_experimental_encryption_enabled) }}"
|
||||
redis_enabled: "{{ not keydb_enabled and (matrix_synapse_workers_enabled or (matrix_hookshot_enabled and matrix_hookshot_experimental_encryption_enabled)) }}"
|
||||
|
||||
redis_identifier: matrix-redis
|
||||
|
||||
@@ -3967,7 +3973,37 @@ redis_base_path: "{{ matrix_base_data_path }}/redis"
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# /etle/redis
|
||||
# /etke/redis
|
||||
#
|
||||
######################################################################
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# keydb
|
||||
#
|
||||
######################################################################
|
||||
|
||||
keydb_enabled: "{{ matrix_synapse_workers_enabled or (matrix_hookshot_enabled and matrix_hookshot_experimental_encryption_enabled) }}"
|
||||
|
||||
keydb_identifier: matrix-keydb
|
||||
|
||||
keydb_uid: "{{ matrix_user_uid }}"
|
||||
keydb_gid: "{{ matrix_user_gid }}"
|
||||
|
||||
keydb_base_path: "{{ matrix_base_data_path }}/keydb"
|
||||
|
||||
keydb_arch: |-
|
||||
{{
|
||||
({
|
||||
'amd64': 'x86_64',
|
||||
'arm32': 'arm32',
|
||||
'arm64': 'arm64',
|
||||
})[matrix_architecture]
|
||||
}}
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# keydb
|
||||
#
|
||||
######################################################################
|
||||
|
||||
@@ -4174,6 +4210,8 @@ matrix_synapse_container_additional_networks_auto: |
|
||||
+
|
||||
([redis_container_network] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == redis_identifier else [])
|
||||
+
|
||||
([keydb_container_network] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == keydb_identifier else [])
|
||||
+
|
||||
([exim_relay_container_network] if (exim_relay_enabled and matrix_synapse_email_enabled and matrix_synapse_email_smtp_host == exim_relay_identifier and matrix_synapse_container_network != exim_relay_container_network) else [])
|
||||
+
|
||||
([matrix_ma1sd_container_network] if (matrix_ma1sd_enabled and matrix_synapse_account_threepid_delegates_msisdn == matrix_synapse_account_threepid_delegates_msisdn_mas1sd_url and matrix_synapse_container_network != matrix_ma1sd_container_network) else [])
|
||||
@@ -4256,6 +4294,8 @@ matrix_synapse_systemd_required_services_list_auto: |
|
||||
+
|
||||
([redis_identifier ~ '.service'] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == redis_identifier else [])
|
||||
+
|
||||
([keydb_identifier ~ '.service'] if matrix_synapse_redis_enabled and matrix_synapse_redis_host == keydb_identifier else [])
|
||||
+
|
||||
(['matrix-goofys.service'] if matrix_s3_media_store_enabled else [])
|
||||
}}
|
||||
|
||||
@@ -4267,9 +4307,9 @@ matrix_synapse_systemd_wanted_services_list_auto: |
|
||||
}}
|
||||
|
||||
# Synapse workers (used for parallel load-scaling) need Redis for IPC.
|
||||
matrix_synapse_redis_enabled: "{{ redis_enabled }}"
|
||||
matrix_synapse_redis_host: "{{ redis_identifier if redis_enabled else '' }}"
|
||||
matrix_synapse_redis_password: "{{ redis_connection_password if redis_enabled else '' }}"
|
||||
matrix_synapse_redis_enabled: "{{ redis_enabled or keydb_enabled }}"
|
||||
matrix_synapse_redis_host: "{{ redis_identifier if redis_enabled else (keydb_identifier if keydb_enabled else '') }}"
|
||||
matrix_synapse_redis_password: "{{ redis_connection_password if redis_enabled else (keydb_connection_password if keydb_enabled else '') }}"
|
||||
|
||||
matrix_synapse_container_extra_arguments_auto: "{{ matrix_homeserver_container_extra_arguments_auto }}"
|
||||
matrix_synapse_app_service_config_files_auto: "{{ matrix_homeserver_app_service_config_files_auto }}"
|
||||
|
@@ -27,6 +27,9 @@
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-jitsi.git
|
||||
version: v9364-1
|
||||
name: jitsi
|
||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-keydb.git
|
||||
version: v6.3.4-1
|
||||
name: keydb
|
||||
- src: git+https://gitlab.com/etke.cc/roles/ntfy.git
|
||||
version: v2.10.0-0
|
||||
name: ntfy
|
||||
@@ -55,7 +58,7 @@
|
||||
version: v0.14.0-4
|
||||
name: prometheus_postgres_exporter
|
||||
- src: git+https://gitlab.com/etke.cc/roles/redis.git
|
||||
version: v7.2.3-2
|
||||
version: v7.2.4-0
|
||||
name: redis
|
||||
- src: git+https://github.com/devture/com.devture.ansible.role.systemd_docker_base.git
|
||||
version: v1.1.0-0
|
||||
|
@@ -6,7 +6,7 @@
|
||||
block:
|
||||
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
|
||||
|
||||
- when: ansible_os_family == 'Debian' and matrix_playbook_migration_debian_signedby_migration_enabled | bool
|
||||
- when: ansible_os_family == 'Debian' and matrix_playbook_docker_installation_enabled | bool and matrix_playbook_migration_debian_signedby_migration_enabled | bool
|
||||
tags:
|
||||
- setup-all
|
||||
- install-all
|
||||
|
Reference in New Issue
Block a user