From 547bf0988ef81edb25fd0783b8d635108f614626 Mon Sep 17 00:00:00 2001 From: anoadragon453 Date: Tue, 3 May 2022 10:52:17 +0000 Subject: deploy: 7e6598bcf6cf63b4d04c27b9696ed8429b6ddff6 --- latest/systemd-with-workers/index.html | 25 +++++++++++----------- .../workers/background_worker.yaml | 8 +++++++ .../workers/event_persister.yaml | 23 ++++++++++++++++++++ .../workers/federation_reader.yaml | 13 ----------- .../workers/generic_worker.yaml | 14 ++++++++++++ 5 files changed, 58 insertions(+), 25 deletions(-) create mode 100644 latest/systemd-with-workers/workers/background_worker.yaml create mode 100644 latest/systemd-with-workers/workers/event_persister.yaml delete mode 100644 latest/systemd-with-workers/workers/federation_reader.yaml create mode 100644 latest/systemd-with-workers/workers/generic_worker.yaml (limited to 'latest/systemd-with-workers') diff --git a/latest/systemd-with-workers/index.html b/latest/systemd-with-workers/index.html index 0d6a008397..e168b6df48 100644 --- a/latest/systemd-with-workers/index.html +++ b/latest/systemd-with-workers/index.html @@ -76,7 +76,7 @@ @@ -155,24 +155,25 @@ require. Additionally, to group the required services, it sets up a

See the folder system for the systemd unit files.

The folder workers -contains an example configuration for the federation_reader worker.

+contains an example configuration for the generic_worker worker.

Synapse configuration files

See the worker documentation for information on how to set up the configuration files and reverse-proxy correctly. -Below is a sample federation_reader worker configuration file.

-
worker_app: synapse.app.federation_reader
-worker_name: federation_reader1
+Below is a sample generic_worker worker configuration file.

+
worker_app: synapse.app.generic_worker
+worker_name: generic_worker1
 
+# The replication listener on the main synapse process.
 worker_replication_host: 127.0.0.1
 worker_replication_http_port: 9093
 
 worker_listeners:
-    - type: http
-      port: 8011
-      resources:
-          - names: [federation]
+  - type: http
+    port: 8083
+    resources:
+      - names: [client, federation]
 
-worker_log_config: /etc/matrix-synapse/federation-reader-log.yaml
+worker_log_config: /etc/matrix-synapse/generic-worker-log.yaml
 

Systemd manages daemonization itself, so ensure that none of the configuration files set either daemonize or worker_daemonize.

@@ -207,9 +208,9 @@ systemctl stop matrix-synapse.target # Restart the master alone systemctl start matrix-synapse.service -# Restart a specific worker (eg. federation_reader); the master is +# Restart a specific worker (eg. generic_worker); the master is # unaffected by this. -systemctl restart matrix-synapse-worker@federation_reader.service +systemctl restart matrix-synapse-worker@generic_worker.service # Add a new worker (assuming all configs are set up already) systemctl enable matrix-synapse-worker@federation_writer.service diff --git a/latest/systemd-with-workers/workers/background_worker.yaml b/latest/systemd-with-workers/workers/background_worker.yaml new file mode 100644 index 0000000000..9fbfbda7db --- /dev/null +++ b/latest/systemd-with-workers/workers/background_worker.yaml @@ -0,0 +1,8 @@ +worker_app: synapse.app.generic_worker +worker_name: background_worker + +# The replication listener on the main synapse process. +worker_replication_host: 127.0.0.1 +worker_replication_http_port: 9093 + +worker_log_config: /etc/matrix-synapse/background-worker-log.yaml diff --git a/latest/systemd-with-workers/workers/event_persister.yaml b/latest/systemd-with-workers/workers/event_persister.yaml new file mode 100644 index 0000000000..9bc6997bad --- /dev/null +++ b/latest/systemd-with-workers/workers/event_persister.yaml @@ -0,0 +1,23 @@ +worker_app: synapse.app.generic_worker +worker_name: event_persister1 + +# The replication listener on the main synapse process. +worker_replication_host: 127.0.0.1 +worker_replication_http_port: 9093 + +worker_listeners: + - type: http + port: 8034 + resources: + - names: [replication] + + # Enable listener if this stream writer handles endpoints for the `typing` or + # `to_device` streams. Uses a different port to the `replication` listener to + # avoid exposing the `replication` listener publicly. + # + #- type: http + # port: 8035 + # resources: + # - names: [client] + +worker_log_config: /etc/matrix-synapse/event-persister-log.yaml diff --git a/latest/systemd-with-workers/workers/federation_reader.yaml b/latest/systemd-with-workers/workers/federation_reader.yaml deleted file mode 100644 index 13e69e62c9..0000000000 --- a/latest/systemd-with-workers/workers/federation_reader.yaml +++ /dev/null @@ -1,13 +0,0 @@ -worker_app: synapse.app.federation_reader -worker_name: federation_reader1 - -worker_replication_host: 127.0.0.1 -worker_replication_http_port: 9093 - -worker_listeners: - - type: http - port: 8011 - resources: - - names: [federation] - -worker_log_config: /etc/matrix-synapse/federation-reader-log.yaml diff --git a/latest/systemd-with-workers/workers/generic_worker.yaml b/latest/systemd-with-workers/workers/generic_worker.yaml new file mode 100644 index 0000000000..a82f9c161f --- /dev/null +++ b/latest/systemd-with-workers/workers/generic_worker.yaml @@ -0,0 +1,14 @@ +worker_app: synapse.app.generic_worker +worker_name: generic_worker1 + +# The replication listener on the main synapse process. +worker_replication_host: 127.0.0.1 +worker_replication_http_port: 9093 + +worker_listeners: + - type: http + port: 8083 + resources: + - names: [client, federation] + +worker_log_config: /etc/matrix-synapse/generic-worker-log.yaml -- cgit 1.5.1