Commit Graph

123 Commits

Author SHA1 Message Date
e01aa667e7 Fix some comments in worker-labels for Synapse
Related to 929aee3022 and
https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/3154
2024-02-03 18:53:17 +02:00
5ca527066d Fix s3-storage migrate and shell (#3136)
* Fix s3-storage migrate and shell: container needs attachment to postgres network also

* Connect to s3-storage-provider migrate to multiple networks in multiple steps

Multiple `--network` calls lead to:

> docker: Error response from daemon: Container cannot be connected to network endpoints: NETWORK_1 NETWORK_2.

* Connect to s3-storage-provider shell to multiple networks in multiple steps

---------

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2024-01-27 18:03:37 +02:00
bd027159b1 Added extra systemd service arguments to synapse workers and proxy companion 2024-01-24 13:14:34 -06:00
025a7e5c66 Merge branch 'spantaleev:master' into cvwright/room-workers-v2 2024-01-17 08:02:47 -06:00
042c74f90c Remove some useless oidc variables and /_synapse/oidc route handling
After some checking, it seems like there's `/_synapse/client/oidc`,
but no such thing as `/_synapse/oidc`.

I'm not sure why we've been reverse-proxying these paths for so long
(even in as far back as the `matrix-nginx-proxy` days), but it's time we
put a stop to it.

The OIDC docs have been simplified. There's no need to ask people to
expose the useless `/_synapse/oidc` endpoint. OIDC requires
`/_synapse/client/oidc` and `/_synapse/client` is exposed by default
already.
2024-01-17 14:45:19 +02:00
cd06e04497 Make post-start delay for matrix-synapse configurable 2024-01-17 12:25:22 +02:00
3ba0642bcf Increase delay after starting of matrix-synapse
10 seconds is a better default for slower (or overloaded) servers
2024-01-17 12:21:19 +02:00
94378a7729 Make use of matrix_synapse_container_labels_matrix_related_labels_enabled
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/3102
2024-01-17 10:13:15 +02:00
c0afcaa2e3 Replace (almost) all matrix-org/synapse references with element-hq/synapse
Issues and Pull Requests were not migrated to the new
organization/repository, so `matrix-org/synapse/pull` and
`matrix-org/synapse/issues` references were kept as-is.

`matrix-org/synapse-s3-storage-provider` references were also kept,
as that module still continues living under the `matrix-org` organization.

This patch mainly aims to change documentation-related things, not actual
usage in full yet. For polish that, another more comprehensive patch is coming later.
2024-01-17 08:02:47 +02:00
0dbdaf5b9f Enable HTTP resources for new worker types 2024-01-16 16:51:23 -06:00
48a4afb114 Make Traefik labels files look better
This moves the comments from being just in Jinja,
to actually ending up in the generated `labels` file,
which makes inspection of the final result easier.

Also, some new lines were added here and there to make labels
more legible.

The generated file may still include weird new-lines due to
various `if` statements yielding content or not, but that's not so ugly
anymore - now that we have proper start/end sections that are visible in
the final `labels` file.
2024-01-15 10:41:15 +02:00
b2aeb8cde9 Rename label-related variables for homeservers
We'd be adding integration with an internal Traefik entrypoint
(`matrix_playbook_internal_matrix_client_api_traefik_entrypoint`),
so renaming helps disambiguate things.

There's no need for deperecation tasks, because the old names
have only been part of this `bye-bye-nginx-proxy` branch and not used by
anyone publicly.
2024-01-14 10:48:54 +02:00
39bddefd39 Make addons communicate with the homeserver via a new internal Traefik entrypoint
This also adds labels for Synapse. Support for other homeservers and
components will be added later.
2024-01-14 10:48:54 +02:00
74099383cd Adapt external_prometheus.yml.example.j2 to our new metrics exposure setup 2024-01-12 13:01:06 +02:00
c0308307e2 Make homeserver services sleep after startup, instead of all dependencies sleeping separately
This is an attempt at optimizing service startup.

The effect is most pronounced when many services are restarted one by one.
The systemd service manager role sometimes does this - for example when `just install-service synapse` runs.
In such cases, a 5-second delay for each Synapse worker service
(or other bridge/bot service that waits on the homeserver) quickly adds up to a lot.

When services are all stopped fully and then started, the effect is not so pronounced, because
`matrix-synapse.service` starts first and pulls all worker services (defined as `Wants=` for it).
Later on, when the systemd service manager role "starts" these worker services, they're started already.
Even if they had a 5-second wait each, it would have happened in parallel.
2024-01-12 12:45:18 +02:00
41a52945d6 Add support for exposing metrics for Synapse workers 2024-01-12 12:16:06 +02:00
22f5f0ba75 Add support for exposing metrics for Synapse (without workers) 2024-01-12 12:15:57 +02:00
3556dd77ef Use variables instead of hardcoding service port numbers in labels for matrix-synapse 2024-01-12 09:31:31 +02:00
e5130372b9 Switch matrix_synapse_container_additional_volumes from using -v to --mount
Depending on the `options` that people provide, this may break
compatibility.
2024-01-11 12:12:44 +02:00
f257cd9fbe Fix a few incorrect service names in labels for matrix-synapse/matrix-synapse-reverse-proxy-companion 2024-01-11 11:58:20 +02:00
015acb6d08 Add native Traefik support to matrix-synapse 2024-01-04 19:00:23 +02:00
a66a2d2692 Added Synapse connection pool config variables 2023-12-16 19:16:05 -06:00
2511b34a7c Stop containers gracefully, instead of outright killing them 2023-12-06 11:52:23 +02:00
b2dd4bd1a4 Fix matrix_synapse_oidc_providers parsing 2023-10-17 12:09:30 +03:00
c0e56ac1c4 Make OIDC providers if check safer 2023-10-02 19:32:09 +03:00
9167a7734e add matrix_synapse_oidc_enabled and matrix_synapse_oidc_providers vars 2023-10-02 18:40:15 +03:00
217ddad2de Add support for configuring forgotten_room_retention_period
Fixes https://github.com/spantaleev/matrix-docker-ansible-deploy/issues/2918

Related to https://github.com/matrix-org/synapse/pull/15488
2023-09-28 12:54:52 +03:00
e033520ce2 Make Synapse worker systemd service files depend on matrix-synapse.service
Many of these do depend on the Synapse master process (`matrix-synapse.service`),
so it makes sense to do it.

Furthermore, we're doing it so that one can stop the `matrix-synapse.service`
service and have systemd cascade this into stopping all the workers as well.

This is useful for easily stopping all of Synapse, so that Postgres
upgrades (`--tags=upgrade-postgres`) can happen cleanly.
Postgres upgrades currently stop `devture_postgres_systemd_services_to_stop_for_maintenance_list` which
includes Synapse, but stopping just the master process and leaving workers running is not safe enough and sometimes leads to errors like:

> ERROR:  insert or update on table "event_forward_extremities" violates foreign key constraint "event_forward_extremities_event_id"

With this dependency in place, stopping `matrix-synapse.service` will stop all Synapse processes.
2023-09-16 11:37:24 +03:00
d207edb304 Deprecate matrix_synapse_spam_checker in favor of matrix_synapse_modules 2023-08-26 20:09:37 +03:00
ba1d665bd9 make smtp tls configurable / optional 2023-07-27 11:26:15 +02:00
c09c1265e8 Stop using deprecated worker settings (worker_replication_host, worker_replication_http_port)
Related to:
- e4f545c452
- 2481b7dfa4

We've prepared for this by adding the `main` process to the `instance_map` a long time ago,
in 49cb8b7b11.
2023-07-11 17:20:21 +03:00
Zac
f026c7cee1 Apply suggestions from code review
Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2023-06-13 14:48:44 -05:00
0e701bbece add var to make the creds optional 2023-06-13 11:08:14 -05:00
Zac
ceda4c41cc remove the offending lines 2023-06-13 10:22:37 -05:00
5c0279f0c9 Update roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2
Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2023-06-02 23:39:55 -06:00
2f4428bf5b Update roles/custom/matrix-synapse/templates/synapse/homeserver.yaml.j2
Co-authored-by: Slavi Pantaleev <slavi@devture.com>
2023-06-02 23:39:17 -06:00
1f0da9f744 Create hooks for user search ability 2023-06-02 12:50:46 -06:00
c55371e305 Add changelog entry for the forget_rooms_on_leave default change for Synapse
Related to:

- https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2698
- https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/2700
2023-05-25 09:14:09 +03:00
9350eeb9fb update synapse 1.83.0 -> 1.84.0; set forget_rooms_on_leave = true 2023-05-23 17:33:23 +03:00
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
1e1ab70965 Make use of matrix_synapse_container_network in the matrix-synapse role
It's the same as `matrix_docker_network` for now, so this practically
doesn't change anything.
2023-05-02 13:22:31 +03:00
beb40134b7 Add support for backup LDAP servers (#2650)
* Update homeserver.yaml.j2

* Update configuring-playbook-ldap-auth.md

* Update homeserver.yaml.j2
2023-04-19 08:52:03 +03:00
9c75a1e20d Fix recaptcha vars ansible-vault compatibility 2023-04-16 18:52:12 +03:00
44aa0dce7b Add ability to disable password auth (#2612)
* Add ability to disable password auth

* Allow disabling password authentication
2023-03-29 21:11:22 +03:00
643acfcb5b Make synapse-s3-storage-provider periodic migration schedule customizable
Larger deployments may wish to run migration more often.
2023-02-22 16:08:53 +02:00
5df89a44b3 Add support for customizing Synapse templates 2023-02-17 19:37:34 +02:00
9775218850 Add matrix_synapse_email_app_name variable 2023-02-17 18:31:01 +02:00
632026513e Add matrix_synapse_uid, matrix_synapse_gid and matrix_synapse_username 2023-02-17 17:16:50 +02:00
519b32543c Add matrix_synapse_container_network and matrix_synapse_container_additional_networks 2023-02-17 16:13:38 +02:00
d2416365d2 Merge pull request #2220 from xangelix/synapse-s3-sse-c
Add S3 SSE-C config support for synapse-s3-storage-provider
2023-01-10 09:25:11 +02:00