ansible-collection-famedly-.../roles/synapse
Johanna Dorothea Reichmann 1985813915
feat(synapse): add support for deploying workers
Can deploy synapse workers and allow costum amounts of workers for each
type. For documentation on how to use, see `roles/synapse/README.md`.

In a docker deployment, each worker runs in their own docker container
with respective listener configurations. Labels can be declared in
`tasks/configure_workers.yml` for routing of requests.

In systemd deployments, each worker runs in it's own systemd service,
which are marked as being part of the main service, so restarting the
main service will restart all the workers as well.
2020-11-23 08:55:07 +01:00
..
defaults feat(synapse): add support for deploying workers 2020-11-23 08:55:07 +01:00
files chore(git): merge roles/modules into collection 2020-08-01 19:29:25 +02:00
handlers feat(synapse): add support for deploying workers 2020-11-23 08:55:07 +01:00
meta chore(git): merge roles/modules into collection 2020-08-01 19:29:25 +02:00
tasks feat(synapse): add support for deploying workers 2020-11-23 08:55:07 +01:00
templates feat(synapse): add support for deploying workers 2020-11-23 08:55:07 +01:00
tests chore(git): merge roles/modules into collection 2020-08-01 19:29:25 +02:00
vars feat(synapse): add support for deploying workers 2020-11-23 08:55:07 +01:00
.gitignore chore(git): merge roles/modules into collection 2020-08-01 19:29:25 +02:00
CODEOWNERS chore(git): merge roles/modules into collection 2020-08-01 19:29:25 +02:00
README.md feat(synapse): add support for deploying workers 2020-11-23 08:55:07 +01:00
TODO.md chore(git): merge roles/modules into collection 2020-08-01 19:29:25 +02:00

matrix-synapse

Install a matrix synapse server.

Requirements

The following should be present on the target system

  • pip
  • systemd
  • rsyslogd
  • logrotate

Role Variables

Mandatory Variables

Name Type Description
matrix_server_name string
matrix_synapse_tls_cert string server's TLS certificate chain (when matrix_synapse_extra_config.no_tls is set to true)
matrix_synapse_tls_key string server's TLS key (when matrix_synapse_extra_config.no_tls is set to true)
matrix_synapse_report_stats bool Report the stats to matrix.org
matrix_synapse_pg_host string postgresql server
matrix_synapse_pg_user string postgresql user
matrix_synapse_pg_pass string postgresql user's password
matrix_synapse_pg_db string postgresql database

Optional Variables

Name Value Description
matrix_synapse_base_path "/opt/synapse"
matrix_synapse_secrets_path "{{ matrix_synapse_base_path }}/secrets"
matrix_synapse_extra_config None configuration parameters as given in the synapse configuration file
matrix_synapse_dh_path "{{ matrix_synapse_base_path }}/tls/{{ matrix_server_name }}.dh"
matrix_synapse_baseurl "https://{{ matrix_server_name }}"
matrix_synapse_signing_key_path "{{ matrix_synapse_base_path }}/ssl/{{ matrix_server_name }}.signing.key"
matrix_synapse_version "v1.23.0"
matrix_synapse_unstable false when true, release candidate versions are deployed too
matrix_synapse_log_days_keep 14
matrix_synapse_deployment_method pip Either pip or docker ¹
matrix_synapse_supervision_method systemd Either systemd, runit or docker ¹
matrix_synapse_python_version 3 Default python version (2, 3) to be used
matrix_synapse_redis_enabled false If synapse should connect to redis (needed for workers)
matrix_synapse_redis_host None host on which redis is running
matrix_synapse_redis_port 6379 port on which redis is running
matrix_synapse_redis_pass None password to use to authentificate to redis

Worker control variables

Name Value Description
matrix_synapse_workers_enabled false Enables workers and starts the replication listener
matrix_synapse_workers_client 0 Amount of workers to deploy which serve the client API
matrix_synapse_workers_federation_in 0 Amount of federation workers to deploy (inbound)
matrix_synapse_workers_federation_out 0 Amount of federation sender workers to deploy (outbound)
matrix_synapse_workers_media 0 Amount of media-repo workers to deploy
matrix_synapse_worker_push false Enables a worker for pushes to sygnal/emal
matrix_synapse_worker_appservice false Enables a worker to handle synapse->appservice traffic
matrix_synapse_worker_user_search false Enable a worker to handle user_directory search
matrix_synapse_worker_replication_port 9003 Synapse replication port to use
matrix_synapse_worker_metrics_enabled false Enable metrics endpoint on each worker
matrix_synapse_worker_metrics_port 9101 Port on which metrics on each container can be reached

¹: Docker must be used for both or neither deployment and supervision

Dependencies

None.

Example Playbook

#TODO: Add example

License

Apache 2.0

Author Information

  • Michael Kaye
  • Jan Christian Grünhage
  • Emmanouil Kampitakis