From a58a1b12c9caa9c5b9d74c4f5641bc0f7b895869 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Fri, 27 Aug 2021 18:20:18 -0500 Subject: [PATCH] Revert removal of generic and sender workers 3 & 4 This reverts commits 0e7f3b6120fc2b5914396955cc98825dc9c133e1, 70aa3d517ef8baf7bfaf95c88e2573d2bd8e8d92, and b0627430bd25d8b132e81141d6bdacf496b06b75 --- conf/prometheus.yml | 20 +++++++++++++++ docker-compose.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++ workers/sender3.yaml | 10 ++++++++ workers/sender4.yaml | 10 ++++++++ 4 files changed, 100 insertions(+) create mode 100644 workers/sender3.yaml create mode 100644 workers/sender4.yaml diff --git a/conf/prometheus.yml b/conf/prometheus.yml index 6814b5f..a2f1fdc 100644 --- a/conf/prometheus.yml +++ b/conf/prometheus.yml @@ -26,6 +26,16 @@ scrape_configs: instance: "matrix.boba.best" job: "generic_worker" index: 2 + - targets: ["generic3:8008"] + labels: + instance: "matrix.boba.best" + job: "generic_worker" + index: 3 + - targets: ["generic4:8008"] + labels: + instance: "matrix.boba.best" + job: "generic_worker" + index: 4 - targets: ["sender1:8008"] labels: @@ -37,6 +47,16 @@ scrape_configs: instance: "matrix.boba.best" job: "federation_sender" index: 2 + - targets: ["sender3:8008"] + labels: + instance: "matrix.boba.best" + job: "federation_sender" + index: 3 + - targets: ["sender4:8008"] + labels: + instance: "matrix.boba.best" + job: "federation_sender" + index: 4 - targets: ["media:8008"] labels: diff --git a/docker-compose.yml b/docker-compose.yml index cd45b22..1056e70 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -78,6 +78,34 @@ services: healthcheck: disable: true + sender3: + image: matrixdotorg/synapse:$SYNAPSE_TAG + restart: always + command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender3.yaml"] + environment: + - SYNAPSE_WORKER=synapse.app.federation_sender + volumes: + - ./data/synapse:/data + - ./workers:/workers + depends_on: + - synapse + healthcheck: + disable: true + + sender4: + image: matrixdotorg/synapse:$SYNAPSE_TAG + restart: always + command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/sender4.yaml"] + environment: + - SYNAPSE_WORKER=synapse.app.federation_sender + volumes: + - ./data/synapse:/data + - ./workers:/workers + depends_on: + - synapse + healthcheck: + disable: true + media: image: matrixdotorg/synapse:$SYNAPSE_TAG restart: always @@ -126,6 +154,38 @@ services: labels: synapse-autoheal: "true" + generic3: + image: matrixdotorg/synapse:$SYNAPSE_TAG + restart: always + command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"] + environment: + - SYNAPSE_WORKER=synapse.app.generic_worker + volumes: + - ./data/synapse:/data + - ./workers:/workers + depends_on: + - synapse + ports: + - 127.0.0.1:8012:8008/tcp + labels: + synapse-autoheal: "true" + + generic4: + image: matrixdotorg/synapse:$SYNAPSE_TAG + restart: always + command: ["run", "--config-path=/data/homeserver.yaml", "--config-path=/workers/replication.yaml", "--config-path=/workers/generic.yaml"] + environment: + - SYNAPSE_WORKER=synapse.app.generic_worker + volumes: + - ./data/synapse:/data + - ./workers:/workers + depends_on: + - synapse + ports: + - 127.0.0.1:8013:8008/tcp + labels: + synapse-autoheal: "true" + prometheus: image: prom/prometheus:latest restart: always diff --git a/workers/sender3.yaml b/workers/sender3.yaml new file mode 100644 index 0000000..52527b0 --- /dev/null +++ b/workers/sender3.yaml @@ -0,0 +1,10 @@ +worker_app: synapse.app.federation_sender +worker_name: sender3 + +worker_listeners: + - type: http + port: 8008 + x_forwarded: true + resources: + - names: + - metrics diff --git a/workers/sender4.yaml b/workers/sender4.yaml new file mode 100644 index 0000000..eee0b81 --- /dev/null +++ b/workers/sender4.yaml @@ -0,0 +1,10 @@ +worker_app: synapse.app.federation_sender +worker_name: sender4 + +worker_listeners: + - type: http + port: 8008 + x_forwarded: true + resources: + - names: + - metrics