Commit Graph

7215 Commits

Author SHA1 Message Date
Slavi Pantaleev
aeb1bde4ab Remove matrix-nginx-proxy reference from matrix-bridge-hookshot 2024-01-14 12:06:05 +02:00
Slavi Pantaleev
69ca30d1b1 Add support for the internal Traefik entrypoint to matrix-media-repo 2024-01-14 11:57:51 +02:00
Slavi Pantaleev
6b5f42fa81 Indirectly make use of matrix_homeserver_federation_enabled in matrix-media-repo and add some comments around Traefik labels 2024-01-14 11:54:02 +02:00
Slavi Pantaleev
c238978ac8 Add new global variable for controlling federation regardless of homeserver implementation
The old variables still work. The global lets us avoid
auto-detection logic like we're currently doing for
`matrix_nginx_proxy_proxy_matrix_federation_api_enabled`.

In the future, we'd just be able to reference
`matrix_homeserver_federation_enabled` and know the up-to-date value
regardless of homeserver.
2024-01-14 11:52:40 +02:00
Slavi Pantaleev
df5d8bfc04 Remove matrix-homeserver-proxy role in favor of the new internal Traefik entrypoint
This was meant to serve as an intermediary for services needing to reach
the homeserver. It was used like that for a while in this
`bye-bye-nginx-proxy` branch, but was never actually public.

It has recently been superseded by homeserver-like services injecting
themselves into a new internal Traefik entrypoint
(see `matrix_playbook_internal_matrix_client_api_traefik_entrypoint_*`),
so `matrix-homeserver-proxy` is no longer necessary.

---

This is probably a good moment to share some benchmarks and reasons
for going with the internal Traefik entrypoint as opposed to this nginx
service.

1. (1400 rps) Directly to Synapse (`ab -n 1000 -c 100 http://matrix-synapse:8008/_matrix/client/versions`
2. (~900 rps) Via `matrix-homeserver-proxy` (nginx) proxying to Synapse (`ab -n 1000 -c 100 http://matrix-homeserver-proxy:8008/_matrix/client/versions`)
3. (~1200 rps) Via the new internal entrypoint of Traefik (`matrix-internal-matrix-client-api`) proxying to Synapse (`ab -n 1000 -c 100 http://matrix-traefik:8008/_matrix/client/versions`)

Besides Traefik being quicker for some reason, there are also other
benefits to not having this `matrix-homeserver-proxy` component:

- we can reuse what we have in terms of labels. Services can register a few extra labels on the new Traefik entrypoint
- we don't need services (like `matrix-media-repo`) to inject custom nginx configs into `matrix-homeserver-proxy`. They just need to register labels, like they do already.
- Traefik seems faster than nginx on this benchmark for some reason, which is a nice bonus
- no need to run one extra container (`matrix-homeserver-proxy`) and execute one extra Ansible role
- no need to maintain a setup where some people run the `matrix-homeserver-proxy` component (because they have route-stealing services like `matrix-media-repo` enabled) and others run an optimized setup without this component and everything needs to be rewired to talk to the homeserver directly. Now, everyone can go through Traefik and we can all run an identical setup

Downsides of the new Traefik entrypoint setup are that:

- all addon services that need to talk to the homeserver now depend on Traefik
- people running their own Traefik setup will be inconvenienced - they
  need to manage one additional entrypoint
2024-01-14 10:53:14 +02:00
Slavi Pantaleev
17c9e3f168 Add support for the internal Traefik entrypoint to synapse-reverse-proxy-companion 2024-01-14 10:48:55 +02:00
Slavi Pantaleev
4d66c14fd5 Add support for the internal Traefik entrypoint to Conduit 2024-01-14 10:48:55 +02:00
Slavi Pantaleev
ee0eb59dc6 Add support for the internal Traefik entrypoint to Dendrite 2024-01-14 10:48:54 +02:00
Slavi Pantaleev
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
Slavi Pantaleev
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
Slavi Pantaleev
533dc711ad Merge branch 'master' into bye-bye-nginx-proxy 2024-01-14 09:23:43 +02:00
Slavi Pantaleev
95e5a5c62e Deprecate direct usage of devture_traefik_additional_entrypoints_auto 2024-01-14 09:23:36 +02:00
Slavi Pantaleev
f3dfd5e063 Improve "Traefik managed by you" documentation section with entrypoint name details 2024-01-14 09:22:02 +02:00
Slavi Pantaleev
bfd93adb20 Fix variable name typo 2024-01-13 20:11:43 +02:00
Slavi Pantaleev
d7b5b65b0c Connect postgres-backup directly to Postgres network, if integrated Postgres is used
This saves us one container network in the ideal case.
2024-01-13 20:10:41 +02:00
Slavi Pantaleev
d48a70b052 Connect matrix-synapse-auto-compressor directly to Postgres network, if integrated Postgres is used
This saves us one container network in the ideal case.
2024-01-13 20:01:06 +02:00
Slavi Pantaleev
130f9ad0a3 Move prometheus to matrix_monitoring_container_network 2024-01-13 19:55:27 +02:00
Slavi Pantaleev
10777218e8 Fix yamllint-reported errors in matrix-email2matrix 2024-01-13 19:47:04 +02:00
Slavi Pantaleev
62c4e76634 Ensure matrix-nginx-proxy container network is created 2024-01-13 19:44:26 +02:00
Slavi Pantaleev
bc54e514d1 Merge branch 'master' into bye-bye-nginx-proxy 2024-01-13 19:43:07 +02:00
Slavi Pantaleev
ca63fa4f9e Upgrade postgres-backup 2024-01-13 19:43:03 +02:00
Slavi Pantaleev
f6fa395c88 Adjust email2matrix docs with regard to the homeserver container URL
`matrix_homeserver_container_url` is potentially wrong in certain
scenarios (going through `matrix-homeserver-proxy`).
2024-01-13 18:15:15 +02:00
Slavi Pantaleev
17d80cb9e8 Move wsproxy to the matrix-addons network and adjust its Postgres connectivity
This is a bit of a compatibility break.
The role was defaulting the Postgres password to `some-password` and we
auto-generate it now.

However, rebuilding both Postgres and this service should unify the
database credentials and the service configs to the new value.
2024-01-13 18:13:06 +02:00
Slavi Pantaleev
b9dfa87f9a Document difference between matrix_homeserver_container_url and matrix_addons_homeserver_client_api_url 2024-01-13 18:07:00 +02:00
Slavi Pantaleev
ed63068e22 Make maubot talk to the homeserver via matrix_addons_homeserver_client_api_url 2024-01-13 18:04:21 +02:00
Slavi Pantaleev
fa591ba278 Add missing matrix_bot_maubot_admins variable to defaults for matrix-bot-maubot 2024-01-13 18:00:19 +02:00
Slavi Pantaleev
c79f354dce Move Dimension to the addons network and connect to Homeserver via matrix_addons_homeserver_client_api_url 2024-01-13 17:58:41 +02:00
Slavi Pantaleev
49066d41a9 Deprecate matrix_docker_network 2024-01-13 17:49:38 +02:00
Slavi Pantaleev
07d0ec4217 Fix variable name typo in validation task 2024-01-13 17:48:39 +02:00
Slavi Pantaleev
0ceea3895e Move all monitoring-related services to their own container network (matrix_monitoring_container_network) 2024-01-13 17:46:52 +02:00
Slavi Pantaleev
782f1f5b1c Run postgres-backup in its own container network (not in matrix_docker_network) 2024-01-13 17:42:01 +02:00
Slavi Pantaleev
a70af2cb6c Merge branch 'master' into bye-bye-nginx-proxy 2024-01-13 17:39:34 +02:00
Slavi Pantaleev
ae64be525f Upgrade postgres-backup 2024-01-13 17:39:28 +02:00
Slavi Pantaleev
594839448f Move matrix-nginx-proxy to its own container network
This service will be removed soon, but for now we need to get rid of
`matrix_docker_network` usage everywhere.
2024-01-13 17:31:37 +02:00
Slavi Pantaleev
cdf28c39d3 Move matrix-user-verification service to its own container network 2024-01-13 17:31:03 +02:00
Slavi Pantaleev
0921087a21 Make Rageshake use its own container network 2024-01-13 17:29:14 +02:00
Slavi Pantaleev
1c7f892b2b Make wsproxy use its own container network (matrix_mautrix_wsproxy_container_network) 2024-01-13 17:28:23 +02:00
Slavi Pantaleev
7c286ab179 Remove matrix_docker_network references from remove-all script 2024-01-13 17:19:39 +02:00
Slavi Pantaleev
c96a0156c0 Make matrix-dynamic-dns use its own container network 2024-01-13 17:18:22 +02:00
Slavi Pantaleev
75f8a879de Remove matrix_docker_network references from matrix-bridge-mx-puppet-twitter 2024-01-13 17:18:22 +02:00
Slavi Pantaleev
d1d6fe01b0 Remove matrix_docker_network references from matrix-bot-maubot 2024-01-13 17:18:22 +02:00
Slavi Pantaleev
23845c1d24 Remove matrix_docker_network references from matrix-bridge-hookshot 2024-01-13 17:18:22 +02:00
Slavi Pantaleev
c86cff2708 Fix NeDB to Postgres importing task for matrix-bridge-appservice-slack
Same as 250b91a40968e, but for Slack
2024-01-13 17:18:22 +02:00
Slavi Pantaleev
6b73073012 Fix NeDB to Postgres importing task for matrix-bridge-appservice-irc
Postgres is not in `matrix_docker_network` anymore, so what we had
before could not possibly work anymore.
2024-01-13 17:18:22 +02:00
Slavi Pantaleev
e782e91fbd Fix some variable typos in matrix-appservice-webhooks.service 2024-01-13 17:18:22 +02:00
Slavi Pantaleev
3f212feb1f Move matrix-email2matrix to its own container network 2024-01-13 17:18:22 +02:00
Slavi Pantaleev
809cce98cc Rework prometheus-nginxlog-exporter docs page 2024-01-13 16:56:40 +02:00
Slavi Pantaleev
e2157517af Hook matrix-homeserver-proxy to matrix-prometheus-nginxlog-exporter 2024-01-13 16:51:09 +02:00
Slavi Pantaleev
262caf0d59 Add native Traefik support to matrix-prometheus-nginxlog-exporter 2024-01-13 16:50:44 +02:00
Slavi Pantaleev
a78a749f75 Define matrix_synapse_reverse_proxy_companion_access_log_syslog_integration_server_port in the role defaults and make the tag configurable 2024-01-13 16:43:46 +02:00