Commit Graph

28 Commits

Author SHA1 Message Date
Michael Hollister
bd027159b1 Added extra systemd service arguments to synapse workers and proxy companion 2024-01-24 13:14:34 -06:00
Charles Wright
1379200e9d Add new worker types to the dynamic workers list 2024-01-16 11:13:51 -06:00
Charles Wright
db70230ae1 Add room-workers as a new preset, with new room workers, sync workers, client readers, and federation readers. Based on https://tcpipuk.github.io/synapse/index.html 2024-01-16 09:17:24 -06:00
Slavi Pantaleev
41a52945d6 Add support for exposing metrics for Synapse workers 2024-01-12 12:16:06 +02:00
Slavi Pantaleev
015acb6d08 Add native Traefik support to matrix-synapse 2024-01-04 19:00:23 +02:00
Slavi Pantaleev
d02f6b8b93 Force-build customized container image for Synapse when its Dockerfile changes 2023-07-06 20:18:18 +03:00
Slavi Pantaleev
b71375fac7 Disable healthcheck for Synapse workers which serve no web traffic
This was mostly affecting the stream writer (events) worker, which was
being reported as unhealthy. It wasn't causing any issues, but it just
looked odd and was confusing people.

As an alternative to hitting the regular `/health` healthcheck route (on
the "client" API which this stream writer does not expose),
we may have went for hitting some "replication" API endpoint instead.

This is more complicated and likely unnecessary.
2023-05-19 18:29:02 +03:00
Slavi Pantaleev
2d051679c0 Ensure instance_map.port is numeric
Fixup related to https://github.com/matrix-org/synapse/pull/15431
2023-04-25 15:26:30 +03:00
Slavi Pantaleev
dddfee16bc Fix all 300+ ansible-lint-reported errors 2023-03-07 17:28:15 +02:00
Slavi Pantaleev
5df89a44b3 Add support for customizing Synapse templates 2023-02-17 19:37:34 +02:00
Slavi Pantaleev
632026513e Add matrix_synapse_uid, matrix_synapse_gid and matrix_synapse_username 2023-02-17 17:16:50 +02:00
Slavi Pantaleev
519b32543c Add matrix_synapse_container_network and matrix_synapse_container_additional_networks 2023-02-17 16:13:38 +02:00
Slavi Pantaleev
424f79df3a Replace synapse.app.pusher and synapse.app.federation_sender with synapse.app.generic_worker
Related to https://github.com/matrix-org/synapse/commit/3479599387164aca2613e88d169719
2023-01-17 15:55:57 +02:00
Slavi Pantaleev
c928148261 Make uninstall tasks for Synapse delete bin/ 2022-11-27 09:43:25 +02:00
Slavi Pantaleev
72744f9db9 /usr/local/bin/matrix-synapse-register-user -> /matrix/synapse/bin/register-user 2022-11-27 09:26:18 +02:00
Slavi Pantaleev
a04f6f4e3d Optimize uninstall tasks a bit
- forego removing Docker images - it's not effective anyway, because it
  only removes the last version.. which is a drop in the bucket, usually

- do not reload systemd - it's none of our business. `--tags=start`,
  etc., handle this

- combine all uninstall tasks under a single block, which only runs if
  we detect traces (a leftover systemd .service file) of the component.
  If no such .service is detected, we skip them all. This may lead to
  incorect cleanup in rare cases, but is good enough for the most part.
2022-11-25 17:28:57 +02:00
Slavi Pantaleev
663a17ea10 Fix ansible-lint-reported errors 2022-11-24 17:39:34 +02:00
Slavi Pantaleev
c37cf42427 Do not delete and re-create Synapse worker configs needlessly
We had checks to avoid stopping/deleting systemd services for workers
that used to exist and will continue to exist, but we were deleting
config files for workers each time.. Only to recreate them again later.

This lead to:

- too many misleading "changed" tasks
- too much unnecessary work
- potential failures during playbook execution possibly leaving the
  system in a bad state (no worker config files)
2022-11-24 17:06:31 +02:00
Slavi Pantaleev
2e7b5c7b02 Untangle the setup import/include mess in matrix-synapse 2022-11-24 16:27:11 +02:00
Slavi Pantaleev
735bacca89 Do not run matrix-nginx-proxy config injection tasks unless necessary
These `init.yml` (now `inject_into_nginx_proxy.yml`) tasks do not need
to `always` run. They only need to run for `setup-all` and
`setup-nginx-proxy`. Unless we're dealing with these 2 tags, we can
spare ourselves a lot of work.

This patch also moves the `when` statement from `init.yml` into
`main.yml` in an effort to further optimize things by potentially
avoiding the extra file include.
2022-11-23 15:52:58 +02:00
Slavi Pantaleev
ccfaefa4d2 Add service groups 2022-11-23 11:45:47 +02:00
Slavi Pantaleev
93d4f8d425 Replace matrix-common-after systemd service management with com.devture.ansible.role.systemd_service_manager 2022-11-23 11:45:46 +02:00
Slavi Pantaleev
360e643f84 Add service priorities - try to stop/start them in an optimal order 2022-11-23 11:45:46 +02:00
Slavi Pantaleev
51674887ff Fix Synapse pusher_instances not being populated correctly
This caused push notifications to be delivered more than once
if multiple `pusher` workers were enabled.
2022-11-08 17:40:44 +02:00
Slavi Pantaleev
d3bd1ca024 matrix_*_retries_{count,delay} -> devture_playbook_help_*_retries_{count,delay} 2022-11-04 16:44:29 +02:00
Slavi Pantaleev
a9a81460ec matrix_host_command_docker -> devture_systemd_docker_base_host_command_docker (via com.devture.ansible.role.systemd_docker_base) 2022-11-04 16:39:35 +02:00
Slavi Pantaleev
835d2e9581 matrix_systemd_path -> devture_systemd_docker_base_systemd_path (via com.devture.ansible.role.systemd_docker_base) 2022-11-04 16:38:38 +02:00
Slavi Pantaleev
410a915a8a Move roles/matrix* to roles/custom/matrix*
This paves the way for installing other roles into `roles/galaxy` using `ansible-galaxy`,
similar to how it's done in:

- https://github.com/spantaleev/gitea-docker-ansible-deploy
- https://github.com/spantaleev/nextcloud-docker-ansible-deploy

In the near future, we'll be removing a lot of the shared role code from here
and using upstream roles for it. Some of the core `matrix-*` roles have
already been extracted out into other reusable roles:

- https://github.com/devture/com.devture.ansible.role.postgres
- https://github.com/devture/com.devture.ansible.role.systemd_docker_base
- https://github.com/devture/com.devture.ansible.role.timesync
- https://github.com/devture/com.devture.ansible.role.vars_preserver
- https://github.com/devture/com.devture.ansible.role.playbook_runtime_messages
- https://github.com/devture/com.devture.ansible.role.playbook_help

We just need to migrate to those.
2022-11-03 09:11:29 +02:00