diff options
author | villepeh <100730729+villepeh@users.noreply.github.com> | 2022-07-19 15:37:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-19 12:37:20 +0000 |
commit | 84c5e6b1fd67931c919901c733647ff0f61e2759 (patch) | |
tree | 57f2858f1eb914362818acca0bc5b7f840c8270c /contrib/workers-bash-scripts/create-multiple-generic-workers.md | |
parent | Add notes when config options were changed to config documentation (#13314) (diff) | |
download | synapse-84c5e6b1fd67931c919901c733647ff0f61e2759.tar.xz |
Bash script for creating multiple stream writers (#13271)
Add another bash script to the contrib directory. It creates multiple stream writers and also prints out the example configuration for homeserver.yaml. Signed-off-by: Ville Petteri Huh.
Diffstat (limited to 'contrib/workers-bash-scripts/create-multiple-generic-workers.md')
-rw-r--r-- | contrib/workers-bash-scripts/create-multiple-generic-workers.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/workers-bash-scripts/create-multiple-generic-workers.md b/contrib/workers-bash-scripts/create-multiple-generic-workers.md new file mode 100644 index 0000000000..d303101429 --- /dev/null +++ b/contrib/workers-bash-scripts/create-multiple-generic-workers.md @@ -0,0 +1,31 @@ +# Creating multiple generic workers with a bash script + +Setting up multiple worker configuration files manually can be time-consuming. +You can alternatively create multiple worker configuration files with a simple `bash` script. For example: + +```sh +#!/bin/bash +for i in {1..5} +do +cat << EOF >> generic_worker$i.yaml +worker_app: synapse.app.generic_worker +worker_name: generic_worker$i + +# 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: 808$i + resources: + - names: [client, federation] + +worker_log_config: /etc/matrix-synapse/generic-worker-log.yaml +EOF +done +``` + +This would create five generic workers with a unique `worker_name` field in each file and listening on ports 8081-8085. + +Customise the script to your needs. |