From 40626ff8dfc150d322f199b2bcd201b271ef995b Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Fri, 21 Dec 2018 10:13:35 +0200 Subject: [PATCH] Upgrade Synapse (0.33.9/Python 2 -> 0.33.4/Python 3) --- CHANGELOG.md | 8 ++++++++ roles/matrix-server/defaults/main.yml | 6 ++++-- .../tasks/setup/setup_synapse_ext_rest_auth.yml | 2 +- .../tasks/setup/setup_synapse_ext_shared_secret_auth.yml | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d71ff84..b75dfbb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 2018-12-21 + +## Synapse 0.34.0 and Python 3 + +Synapse has been upgraded to 0.34.0 and now uses Python 3. +Based on feedback from others, running Synapse on Python 3 is supposed to decrease memory usage significantly (~2x). + + # 2018-11-28 ## More scripts diff --git a/roles/matrix-server/defaults/main.yml b/roles/matrix-server/defaults/main.yml index b96a49f2..0529ce40 100644 --- a/roles/matrix-server/defaults/main.yml +++ b/roles/matrix-server/defaults/main.yml @@ -28,7 +28,7 @@ matrix_identity_server_url: "https://{{ matrix_synapse_trusted_third_party_id_se matrix_docker_network: "matrix" -matrix_synapse_docker_image: "matrixdotorg/synapse:v0.33.9" +matrix_synapse_docker_image: "matrixdotorg/synapse:v0.34.0-py3" matrix_synapse_base_path: "{{ matrix_base_data_path }}/synapse" matrix_synapse_config_dir_path: "{{ matrix_synapse_base_path }}/config" @@ -37,6 +37,8 @@ matrix_synapse_storage_path: "{{ matrix_synapse_base_path }}/storage" matrix_synapse_media_store_path: "{{ matrix_synapse_storage_path }}/media-store" matrix_synapse_ext_path: "{{ matrix_synapse_base_path }}/ext" +matrix_synapse_in_container_python_packages_path: "/usr/local/lib/python3.6/site-packages" + # Specifies which template files to use when configuring Synapse. # If you'd like to have your own different configuration, feel free to copy and paste # the original files into your inventory (e.g. in `inventory/host_vars//`) @@ -149,7 +151,7 @@ matrix_synapse_ext_password_provider_rest_auth_login_profile_name_autofill: fals # Enable this to activate the Shared Secret Auth password provider module. # See: https://github.com/devture/matrix-synapse-shared-secret-auth matrix_synapse_ext_password_provider_shared_secret_auth_enabled: false -matrix_synapse_ext_password_provider_shared_secret_auth_download_url: "https://raw.githubusercontent.com/devture/matrix-synapse-shared-secret-auth/1.0/shared_secret_authenticator.py" +matrix_synapse_ext_password_provider_shared_secret_auth_download_url: "https://raw.githubusercontent.com/devture/matrix-synapse-shared-secret-auth/1.0.1/shared_secret_authenticator.py" matrix_synapse_ext_password_provider_shared_secret_auth_shared_secret: "" # Enable this to activate LDAP password provider diff --git a/roles/matrix-server/tasks/setup/setup_synapse_ext_rest_auth.yml b/roles/matrix-server/tasks/setup/setup_synapse_ext_rest_auth.yml index 37f90be7..09a5708d 100644 --- a/roles/matrix-server/tasks/setup/setup_synapse_ext_rest_auth.yml +++ b/roles/matrix-server/tasks/setup/setup_synapse_ext_rest_auth.yml @@ -22,7 +22,7 @@ matrix_synapse_container_additional_volumes: > {{ matrix_synapse_container_additional_volumes }} + - {{ [{'src': '{{ matrix_synapse_ext_path }}/rest_auth_provider.py', 'dst': '/usr/local/lib/python2.7/site-packages/rest_auth_provider.py', 'options': 'ro'}] }} + {{ [{'src': '{{ matrix_synapse_ext_path }}/rest_auth_provider.py', 'dst': '{{ matrix_synapse_in_container_python_packages_path }}/rest_auth_provider.py', 'options': 'ro'}] }} when: "matrix_synapse_ext_password_provider_rest_auth_enabled" - set_fact: diff --git a/roles/matrix-server/tasks/setup/setup_synapse_ext_shared_secret_auth.yml b/roles/matrix-server/tasks/setup/setup_synapse_ext_shared_secret_auth.yml index 4f8bd7ee..34680add 100644 --- a/roles/matrix-server/tasks/setup/setup_synapse_ext_shared_secret_auth.yml +++ b/roles/matrix-server/tasks/setup/setup_synapse_ext_shared_secret_auth.yml @@ -27,7 +27,7 @@ matrix_synapse_container_additional_volumes: > {{ matrix_synapse_container_additional_volumes }} + - {{ [{'src': '{{ matrix_synapse_ext_path }}/shared_secret_authenticator.py', 'dst': '/usr/local/lib/python2.7/site-packages/shared_secret_authenticator.py', 'options': 'ro'}] }} + {{ [{'src': '{{ matrix_synapse_ext_path }}/shared_secret_authenticator.py', 'dst': '{{ matrix_synapse_in_container_python_packages_path }}/shared_secret_authenticator.py', 'options': 'ro'}] }} when: "matrix_synapse_ext_password_provider_shared_secret_auth_enabled" - set_fact: