From 2ca92b76b6c79e305da47c4e2075a29f139b830c Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Mon, 21 Jun 2021 23:37:08 +0530 Subject: [PATCH 01/26] stable-5963 --- roles/matrix-jitsi/templates/jicofo/env.j2 | 45 +++++--- roles/matrix-jitsi/templates/jvb/env.j2 | 31 ++--- roles/matrix-jitsi/templates/prosody/env.j2 | 33 +++--- roles/matrix-jitsi/templates/web/env.j2 | 118 ++++++++++++++------ 4 files changed, 152 insertions(+), 75 deletions(-) diff --git a/roles/matrix-jitsi/templates/jicofo/env.j2 b/roles/matrix-jitsi/templates/jicofo/env.j2 index a402d2d75..3de602825 100644 --- a/roles/matrix-jitsi/templates/jicofo/env.j2 +++ b/roles/matrix-jitsi/templates/jicofo/env.j2 @@ -1,17 +1,34 @@ -ENABLE_AUTH={{ 1 if matrix_jitsi_enable_auth else 0 }} - +AUTH_TYPE={{ matrix_jitsi_auth_type }} +BRIDGE_AVG_PARTICIPANT_STRESS +BRIDGE_STRESS_THRESHOLD +ENABLE_AUTH +ENABLE_AUTO_OWNER +ENABLE_CODEC_VP8 +ENABLE_CODEC_VP9 +ENABLE_CODEC_H264 +ENABLE_OCTO +ENABLE_RECORDING +ENABLE_SCTP +JICOFO_AUTH_USER={{ matrix_jitsi_jicofo_auth_user }} +JICOFO_AUTH_PASSWORD={{ matrix_jitsi_jicofo_auth_password }} +JICOFO_ENABLE_BRIDGE_HEALTH_CHECKS +JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT +JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT +JICOFO_ENABLE_HEALTH_CHECKS +JICOFO_SHORT_ID +JICOFO_RESERVATION_ENABLED +JICOFO_RESERVATION_REST_BASE_URL +JIBRI_BREWERY_MUC={{ matrix_jitsi_jibri_brewery_muc }} +JIBRI_REQUEST_RETRIES +JIBRI_PENDING_TIMEOUT={{ matrix_jitsi_jibri_pending_timeout }} +JIGASI_BREWERY_MUC +JIGASI_SIP_URI +JVB_BREWERY_MUC={{ matrix_jitsi_jvb_brewery_muc }} +MAX_BRIDGE_PARTICIPANTS +OCTO_BRIDGE_SELECTION_STRATEGY +TZ={{ matrix_jitsi_timezone }} XMPP_DOMAIN={{ matrix_jitsi_xmpp_domain }} XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} XMPP_INTERNAL_MUC_DOMAIN={{ matrix_jitsi_xmpp_internal_muc_domain }} -XMPP_SERVER={{ matrix_jitsi_xmpp_server }} - -JICOFO_COMPONENT_SECRET={{ matrix_jitsi_jicofo_component_secret }} -JICOFO_AUTH_USER={{ matrix_jitsi_jicofo_auth_user }} -JICOFO_AUTH_PASSWORD={{ matrix_jitsi_jicofo_auth_password }} - -JVB_BREWERY_MUC={{ matrix_jitsi_jvb_brewery_muc }} - -JIBRI_BREWERY_MUC={{ matrix_jitsi_jibri_brewery_muc }} -JIBRI_PENDING_TIMEOUT={{ matrix_jitsi_jibri_pending_timeout }} - -TZ={{ matrix_jitsi_timezone }} +XMPP_MUC_DOMAIN +XMPP_SERVER={{ matrix_jitsi_xmpp_server }} \ No newline at end of file diff --git a/roles/matrix-jitsi/templates/jvb/env.j2 b/roles/matrix-jitsi/templates/jvb/env.j2 index f7dc9247a..a927314e6 100644 --- a/roles/matrix-jitsi/templates/jvb/env.j2 +++ b/roles/matrix-jitsi/templates/jvb/env.j2 @@ -1,20 +1,25 @@ -JVB_AUTH_PASSWORD={{ matrix_jitsi_jvb_auth_password }} -JVB_TCP_PORT={{ matrix_jitsi_jvb_rtp_tcp_port }} -JVB_PORT={{ matrix_jitsi_jvb_rtp_udp_port }} +ENABLE_COLIBRI_WEBSOCKET +ENABLE_OCTO +DOCKER_HOST_ADDRESS +XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} +XMPP_INTERNAL_MUC_DOMAIN={{ matrix_jitsi_xmpp_internal_muc_domain }} +XMPP_SERVER={{ matrix_jitsi_xmpp_server }} JVB_AUTH_USER={{ matrix_jitsi_jvb_auth_user }} JVB_AUTH_PASSWORD={{ matrix_jitsi_jvb_auth_password }} JVB_BREWERY_MUC={{ matrix_jitsi_jvb_brewery_muc }} - -XMPP_SERVER={{ matrix_jitsi_xmpp_server }} -XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} -XMPP_INTERNAL_MUC_DOMAIN={{ matrix_jitsi_xmpp_internal_muc_domain }} - -HOSTNAME=matrix-jitsi-jvb - +JVB_PORT={{ matrix_jitsi_jvb_rtp_udp_port }} +JVB_TCP_HARVESTER_DISABLED=true +JVB_TCP_PORT={{ matrix_jitsi_jvb_rtp_tcp_port }} +JVB_TCP_MAPPED_PORT={{ matrix_jitsi_jvb_rtp_tcp_port }} {% if matrix_jitsi_jvb_stun_servers|length > 0 %} JVB_STUN_SERVERS={{ matrix_jitsi_jvb_stun_servers|join(',') }} {% endif %} - +JVB_ENABLE_APIS +JVB_WS_DOMAIN +JVB_WS_SERVER_ID PUBLIC_URL={{ matrix_jitsi_web_public_url }} - -{{ matrix_jitsi_jvb_environment_variables_extension }} +JVB_OCTO_BIND_ADDRESS +JVB_OCTO_PUBLIC_ADDRESS +JVB_OCTO_BIND_PORT +JVB_OCTO_REGION +TZ={{ matrix_jitsi_timezone }} \ No newline at end of file diff --git a/roles/matrix-jitsi/templates/prosody/env.j2 b/roles/matrix-jitsi/templates/prosody/env.j2 index 38b2456c6..74df951e0 100644 --- a/roles/matrix-jitsi/templates/prosody/env.j2 +++ b/roles/matrix-jitsi/templates/prosody/env.j2 @@ -1,10 +1,10 @@ AUTH_TYPE={{ matrix_jitsi_auth_type }} - ENABLE_AUTH={{ 1 if matrix_jitsi_enable_auth else 0 }} ENABLE_GUESTS={{ 1 if matrix_jitsi_enable_guests else 0 }} - -PUBLIC_URL={{ matrix_jitsi_web_public_url }} - +ENABLE_LOBBY={{ 1 if matrix_jitsi_enable_lobby else 0 }} +ENABLE_XMPP_WEBSOCKET +GLOBAL_MODULES +GLOBAL_CONFIG LDAP_URL={{ matrix_jitsi_ldap_url }} LDAP_BASE={{ matrix_jitsi_ldap_base }} LDAP_BINDDN={{ matrix_jitsi_ldap_binddn }} @@ -18,32 +18,35 @@ LDAP_TLS_CHECK_PEER={{ 1 if matrix_jitsi_ldap_tls_check_peer else 0 }} LDAP_TLS_CACERT_FILE={{ matrix_jitsi_ldap_tls_cacert_file }} LDAP_TLS_CACERT_DIR={{ matrix_jitsi_ldap_tls_cacert_dir }} LDAP_START_TLS={{ 1 if matrix_jitsi_ldap_start_tls else 0 }} - XMPP_DOMAIN={{ matrix_jitsi_xmpp_domain }} XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} XMPP_GUEST_DOMAIN={{ matrix_jitsi_xmpp_guest_domain }} XMPP_MUC_DOMAIN={{ matrix_jitsi_xmpp_muc_domain }} XMPP_INTERNAL_MUC_DOMAIN={{ matrix_jitsi_xmpp_internal_muc_domain }} - XMPP_MODULES={{ matrix_jitsi_xmpp_modules }} XMPP_MUC_MODULES= XMPP_INTERNAL_MUC_MODULES= - XMPP_RECORDER_DOMAIN={{ matrix_jitsi_recorder_domain }} - +XMPP_CROSS_DOMAIN=true JICOFO_COMPONENT_SECRET={{ matrix_jitsi_jicofo_component_secret }} JICOFO_AUTH_USER={{ matrix_jitsi_jicofo_auth_user }} JICOFO_AUTH_PASSWORD={{ matrix_jitsi_jicofo_auth_password }} - JVB_AUTH_USER={{ matrix_jitsi_jvb_auth_user }} JVB_AUTH_PASSWORD={{ matrix_jitsi_jvb_auth_password }} - +JIGASI_XMPP_USER= +JIGASI_XMPP_PASSWORD= JIBRI_XMPP_USER={{ matrix_jitsi_jibri_xmpp_user }} JIBRI_XMPP_PASSWORD={{ matrix_jitsi_jibri_xmpp_password }} - JIBRI_RECORDER_USER={{ matrix_jitsi_jibri_recorder_user }} JIBRI_RECORDER_PASSWORD={{ matrix_jitsi_jibri_recorder_password }} - -ENABLE_LOBBY={{ 1 if matrix_jitsi_enable_lobby else 0 }} - -TZ={{ matrix_jitsi_timezone }} +JWT_APP_ID +JWT_APP_SECRET +JWT_ACCEPTED_ISSUERS +JWT_ACCEPTED_AUDIENCES +JWT_ASAP_KEYSERVER +JWT_ALLOW_EMPTY +JWT_AUTH_TYPE +JWT_TOKEN_AUTH_MODULE +LOG_LEVEL +PUBLIC_URL={{ matrix_jitsi_web_public_url }} +TZ={{ matrix_jitsi_timezone }} \ No newline at end of file diff --git a/roles/matrix-jitsi/templates/web/env.j2 b/roles/matrix-jitsi/templates/web/env.j2 index 7b763a3ca..35a1e7ffd 100644 --- a/roles/matrix-jitsi/templates/web/env.j2 +++ b/roles/matrix-jitsi/templates/web/env.j2 @@ -1,42 +1,94 @@ -ENABLE_AUTH={{ 1 if matrix_jitsi_enable_auth else 0 }} -ENABLE_GUESTS={{ 1 if matrix_jitsi_enable_guests else 0 }} - -ENABLE_TRANSCRIPTIONS={{ 1 if matrix_jitsi_enable_transcriptions else 0 }} - -ENABLE_P2P={{ 1 if matrix_jitsi_enable_p2p else 0 }} - -DISABLE_HTTPS=1 - -JICOFO_AUTH_USER={{ matrix_jitsi_jicofo_auth_user }} - +ENABLE_COLIBRI_WEBSOCKET +ENABLE_FLOC=0 +ENABLE_LETSENCRYPT=0 +ENABLE_HTTP_REDIRECT=0 +ENABLE_HSTS=0 +ENABLE_XMPP_WEBSOCKET +DISABLE_HTTPS=0 +DISABLE_DEEP_LINKING +LETSENCRYPT_DOMAIN +LETSENCRYPT_EMAIL +LETSENCRYPT_USE_STAGING PUBLIC_URL={{ matrix_jitsi_web_public_url }} - -XMPP_DOMAIN={{ matrix_jitsi_xmpp_domain }} -XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} -XMPP_BOSH_URL_BASE={{ matrix_jitsi_xmpp_bosh_url_base }} -XMPP_GUEST_DOMAIN={{ matrix_jitsi_xmpp_guest_domain }} -XMPP_MUC_DOMAIN={{ matrix_jitsi_xmpp_muc_domain }} -XMPP_RECORDER_DOMAIN={{ matrix_jitsi_recorder_domain }} - TZ={{ matrix_jitsi_timezone }} - -JIBRI_BREWERY_MUC={{ matrix_jitsi_jibri_brewery_muc }} -JIBRI_PENDING_TIMEOUT={{ matrix_jitsi_jibri_pending_timeout }} -JIBRI_XMPP_USER={{ matrix_jitsi_jibri_xmpp_user }} -JIBRI_XMPP_PASSWORD={{ matrix_jitsi_jibri_xmpp_password }} -JIBRI_RECORDER_USER={{ matrix_jitsi_jibri_recorder_user }} -JIBRI_RECORDER_PASSWORD={{ matrix_jitsi_jibri_recorder_password }} - +AMPLITUDE_ID +ANALYTICS_SCRIPT_URLS +ANALYTICS_WHITELISTED_EVENTS +CALLSTATS_CUSTOM_SCRIPT_URL +CALLSTATS_ID +CALLSTATS_SECRET +CHROME_EXTENSION_BANNER_JSON +CONFCODE_URL +CONFIG_EXTERNAL_CONNECT +DEFAULT_LANGUAGE +DEPLOYMENTINFO_ENVIRONMENT +DEPLOYMENTINFO_ENVIRONMENT_TYPE +DEPLOYMENTINFO_REGION +DEPLOYMENTINFO_SHARD +DEPLOYMENTINFO_USERREGION +DIALIN_NUMBERS_URL +DIALOUT_AUTH_URL +DIALOUT_CODES_URL +DROPBOX_APPKEY +DROPBOX_REDIRECT_URI +DYNAMIC_BRANDING_URL +ENABLE_AUDIO_PROCESSING +ENABLE_AUTH={{ 1 if matrix_jitsi_enable_auth else 0 }} +ENABLE_CALENDAR +ENABLE_FILE_RECORDING_SERVICE +ENABLE_FILE_RECORDING_SERVICE_SHARING +ENABLE_GUESTS={{ 1 if matrix_jitsi_enable_guests else 0 }} +ENABLE_IPV6 +ENABLE_LIPSYNC +ENABLE_NO_AUDIO_DETECTION +ENABLE_P2P={{ 1 if matrix_jitsi_enable_p2p else 0 }} +ENABLE_PREJOIN_PAGE +ENABLE_WELCOME_PAGE +ENABLE_CLOSE_PAGE ENABLE_RECORDING={{ 1 if matrix_jitsi_enable_recording else 0 }} - +ENABLE_REMB +ENABLE_REQUIRE_DISPLAY_NAME +ENABLE_SIMULCAST +ENABLE_STATS_ID +ENABLE_STEREO +ENABLE_SUBDOMAINS +ENABLE_TALK_WHILE_MUTED +ENABLE_TCC +ENABLE_TRANSCRIPTIONS={{ 1 if matrix_jitsi_enable_transcriptions else 0 }} +ETHERPAD_PUBLIC_URL +ETHERPAD_URL_BASE={{ (matrix_jitsi_etherpad_base + '/') if matrix_jitsi_etherpad_enabled else ''}} +GOOGLE_ANALYTICS_ID +GOOGLE_API_APP_CLIENT_ID +INVITE_SERVICE_URL +JICOFO_AUTH_USER={{ matrix_jitsi_jicofo_auth_user }} +MATOMO_ENDPOINT +MATOMO_SITE_ID +MICROSOFT_API_APP_CLIENT_ID +NGINX_RESOLVER +NGINX_WORKER_PROCESSES +NGINX_WORKER_CONNECTIONS +PEOPLE_SEARCH_URL RESOLUTION={{ matrix_jitsi_web_config_resolution_height_ideal_and_max }} RESOLUTION_MIN={{ matrix_jitsi_web_config_resolution_height_min }} RESOLUTION_WIDTH={{ matrix_jitsi_web_config_resolution_width_ideal_and_max }} RESOLUTION_WIDTH_MIN={{ matrix_jitsi_web_config_resolution_width_min }} - +START_AUDIO_ONLY START_AUDIO_MUTED={{ matrix_jitsi_web_config_start_audio_muted_after_nth_participant }} +START_WITH_AUDIO_MUTED +START_SILENT +DISABLE_AUDIO_LEVELS +ENABLE_NOISY_MIC_DETECTION +START_BITRATE +DESKTOP_SHARING_FRAMERATE_MIN +DESKTOP_SHARING_FRAMERATE_MAX START_VIDEO_MUTED={{ matrix_jitsi_web_config_start_video_muted_after_nth_participant }} - -ETHERPAD_URL_BASE={{ (matrix_jitsi_etherpad_base + '/') if matrix_jitsi_etherpad_enabled else ''}} - -{{ matrix_jitsi_web_environment_variables_extension }} +START_WITH_VIDEO_MUTED +TESTING_CAP_SCREENSHARE_BITRATE +TESTING_OCTO_PROBABILITY +XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} +XMPP_BOSH_URL_BASE={{ matrix_jitsi_xmpp_bosh_url_base }} +XMPP_DOMAIN={{ matrix_jitsi_xmpp_domain }} +XMPP_GUEST_DOMAIN={{ matrix_jitsi_xmpp_guest_domain }} +XMPP_MUC_DOMAIN={{ matrix_jitsi_xmpp_muc_domain }} +XMPP_RECORDER_DOMAIN={{ matrix_jitsi_recorder_domain }} +TOKEN_AUTH_URL \ No newline at end of file From 8af2d818b12fee7cebdd7c14545f9c637b0eeebd Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Mon, 21 Jun 2021 23:55:26 +0530 Subject: [PATCH 02/26] domain_fix --- roles/matrix-jitsi/defaults/main.yml | 4 ++-- roles/matrix-jitsi/templates/web/env.j2 | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/matrix-jitsi/defaults/main.yml b/roles/matrix-jitsi/defaults/main.yml index 87d877065..436b0091f 100644 --- a/roles/matrix-jitsi/defaults/main.yml +++ b/roles/matrix-jitsi/defaults/main.yml @@ -32,8 +32,8 @@ matrix_jitsi_ldap_start_tls: false matrix_jitsi_timezone: UTC -matrix_jitsi_xmpp_domain: matrix-jitsi-web -matrix_jitsi_xmpp_server: matrix-jitsi-prosody +matrix_jitsi_xmpp_domain: meet.jitsi +matrix_jitsi_xmpp_server: xmpp.meet.jitsi matrix_jitsi_xmpp_auth_domain: auth.meet.jitsi matrix_jitsi_xmpp_bosh_url_base: http://{{ matrix_jitsi_xmpp_server }}:5280 matrix_jitsi_xmpp_guest_domain: guest.meet.jitsi diff --git a/roles/matrix-jitsi/templates/web/env.j2 b/roles/matrix-jitsi/templates/web/env.j2 index 35a1e7ffd..c4faa5baf 100644 --- a/roles/matrix-jitsi/templates/web/env.j2 +++ b/roles/matrix-jitsi/templates/web/env.j2 @@ -6,9 +6,9 @@ ENABLE_HSTS=0 ENABLE_XMPP_WEBSOCKET DISABLE_HTTPS=0 DISABLE_DEEP_LINKING -LETSENCRYPT_DOMAIN -LETSENCRYPT_EMAIL -LETSENCRYPT_USE_STAGING +LETSENCRYPT_DOMAIN={{ matrix_server_fqn_jitsi }} +LETSENCRYPT_EMAIL={{ matrix_ssl_lets_encrypt_support_email }} +LETSENCRYPT_USE_STAGING=0 PUBLIC_URL={{ matrix_jitsi_web_public_url }} TZ={{ matrix_jitsi_timezone }} AMPLITUDE_ID From 3e011bafd512e00c85a1d9115b018af8105c21db Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Tue, 22 Jun 2021 00:18:29 +0530 Subject: [PATCH 03/26] jibri env --- roles/matrix-jitsi/templates/jibri/env.j2 | 17 ++++++++++ .../jibri/matrix-jitsi-jibri.service.j2 | 33 +++++++++++++++++++ roles/matrix-jitsi/templates/jicofo/env.j2 | 2 +- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 roles/matrix-jitsi/templates/jibri/env.j2 create mode 100644 roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 diff --git a/roles/matrix-jitsi/templates/jibri/env.j2 b/roles/matrix-jitsi/templates/jibri/env.j2 new file mode 100644 index 000000000..b0dc8438b --- /dev/null +++ b/roles/matrix-jitsi/templates/jibri/env.j2 @@ -0,0 +1,17 @@ +PUBLIC_URL={{ matrix_jitsi_web_public_url }} +XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} +XMPP_INTERNAL_MUC_DOMAIN={{ matrix_jitsi_xmpp_internal_muc_domain }} +XMPP_RECORDER_DOMAIN={{ matrix_jitsi_recorder_domain }} +XMPP_SERVER={{ matrix_jitsi_xmpp_server }} +XMPP_DOMAIN={{ matrix_jitsi_xmpp_domain }} +JIBRI_XMPP_USER={{ matrix_jitsi_jibri_xmpp_user }} +JIBRI_XMPP_PASSWORD={{ matrix_jitsi_jibri_xmpp_password }} +JIBRI_BREWERY_MUC={{ matrix_jitsi_jibri_brewery_muc }} +JIBRI_RECORDER_USER={{ matrix_jitsi_jibri_recorder_user }} +JIBRI_RECORDER_PASSWORD={{ matrix_jitsi_jibri_recorder_password }} +JIBRI_RECORDING_DIR={{ matrix_jitsi_jibri_recording_dir }} +JIBRI_FINALIZE_RECORDING_SCRIPT_PATH +JIBRI_STRIP_DOMAIN_JID=muc +JIBRI_LOGS_DIR={{ matrix_jitsi_jibri_logs_dir }} +DISPLAY=:0 +TZ={{ matrix_jitsi_timezone }} \ No newline at end of file diff --git a/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 b/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 new file mode 100644 index 000000000..6ecafaa03 --- /dev/null +++ b/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 @@ -0,0 +1,33 @@ +#jinja2: lstrip_blocks: "True" +[Unit] +Description=Matrix jitsi-jicofo server +{% for service in matrix_jitsi_jicofo_systemd_required_services_list %} +Requires={{ service }} +After={{ service }} +{% endfor %} +DefaultDependencies=no + +[Service] +Type=simple +Environment="HOME={{ matrix_systemd_unit_home_path }}" +ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jicofo 2>/dev/null' +ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jicofo 2>/dev/null' + +ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jicofo \ + --log-driver=none \ + --network={{ matrix_docker_network }} \ + --env-file={{ matrix_jitsi_jicofo_base_path }}/env \ + --mount type=bind,src={{ matrix_jitsi_jicofo_config_path }},dst=/config \ + {% for arg in matrix_jitsi_jicofo_container_extra_arguments %} + {{ arg }} \ + {% endfor %} + {{ matrix_jitsi_jicofo_docker_image }} + +ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jicofo 2>/dev/null' +ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jicofo 2>/dev/null' +Restart=always +RestartSec=30 +SyslogIdentifier=matrix-jitsi-jicofo + +[Install] +WantedBy=multi-user.target diff --git a/roles/matrix-jitsi/templates/jicofo/env.j2 b/roles/matrix-jitsi/templates/jicofo/env.j2 index 3de602825..927282151 100644 --- a/roles/matrix-jitsi/templates/jicofo/env.j2 +++ b/roles/matrix-jitsi/templates/jicofo/env.j2 @@ -30,5 +30,5 @@ TZ={{ matrix_jitsi_timezone }} XMPP_DOMAIN={{ matrix_jitsi_xmpp_domain }} XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} XMPP_INTERNAL_MUC_DOMAIN={{ matrix_jitsi_xmpp_internal_muc_domain }} -XMPP_MUC_DOMAIN +XMPP_MUC_DOMAIN={{ matrix_jitsi_xmpp_muc_domain }} XMPP_SERVER={{ matrix_jitsi_xmpp_server }} \ No newline at end of file From f8be36327c54aef32d2ad02845336587599e3bd9 Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Tue, 22 Jun 2021 11:11:01 +0530 Subject: [PATCH 04/26] jibri service --- .../jibri/matrix-jitsi-jibri.service.j2 | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 b/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 index 6ecafaa03..044b9e696 100644 --- a/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 +++ b/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 @@ -1,7 +1,7 @@ #jinja2: lstrip_blocks: "True" [Unit] -Description=Matrix jitsi-jicofo server -{% for service in matrix_jitsi_jicofo_systemd_required_services_list %} +Description=Matrix jitsi-jibri server +{% for service in matrix_jitsi_jibri_systemd_required_services_list %} Requires={{ service }} After={{ service }} {% endfor %} @@ -10,24 +10,30 @@ DefaultDependencies=no [Service] Type=simple Environment="HOME={{ matrix_systemd_unit_home_path }}" -ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jicofo 2>/dev/null' -ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jicofo 2>/dev/null' +ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jibri 2>/dev/null' +ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jibri 2>/dev/null' -ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jicofo \ +ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jibri \ --log-driver=none \ --network={{ matrix_docker_network }} \ - --env-file={{ matrix_jitsi_jicofo_base_path }}/env \ - --mount type=bind,src={{ matrix_jitsi_jicofo_config_path }},dst=/config \ - {% for arg in matrix_jitsi_jicofo_container_extra_arguments %} + --env-file={{ matrix_jitsi_jibri_base_path }}/env \ +# --device=/dev/snd:/dev/snd \ + --mount type=bind,src=/dev/snd,dst=/dev/snd \ + --mount type=bind,src={{ matrix_jitsi_jibri_config_path }},dst=/config \ +# --volume={{ matrix_jitsi_jibri_config_path }}:/config:Z \ + --volume=/dev/shm:/dev/shm \ + --cap-add=SYS_ADMIN \ + --cap-add=NET_BIND_SERVICE \ + {% for arg in matrix_jitsi_jibri_container_extra_arguments %} {{ arg }} \ {% endfor %} - {{ matrix_jitsi_jicofo_docker_image }} + {{ matrix_jitsi_jibri_docker_image }} -ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jicofo 2>/dev/null' -ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jicofo 2>/dev/null' +ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jibri 2>/dev/null' +ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jibri 2>/dev/null' Restart=always RestartSec=30 -SyslogIdentifier=matrix-jitsi-jicofo +SyslogIdentifier=matrix-jitsi-jibri [Install] WantedBy=multi-user.target From c0cd2a3c938a9154ae4f9be124a8f6cd7c189d8f Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Tue, 22 Jun 2021 12:14:14 +0530 Subject: [PATCH 05/26] JICOFO_RESERVATION_ENABLED contains whitespaces. --- roles/matrix-jitsi/templates/jicofo/env.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/matrix-jitsi/templates/jicofo/env.j2 b/roles/matrix-jitsi/templates/jicofo/env.j2 index 927282151..df669dc6f 100644 --- a/roles/matrix-jitsi/templates/jicofo/env.j2 +++ b/roles/matrix-jitsi/templates/jicofo/env.j2 @@ -16,7 +16,7 @@ JICOFO_CONF_INITIAL_PARTICIPANT_WAIT_TIMEOUT JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT JICOFO_ENABLE_HEALTH_CHECKS JICOFO_SHORT_ID -JICOFO_RESERVATION_ENABLED +JICOFO_RESERVATION_ENABLED JICOFO_RESERVATION_REST_BASE_URL JIBRI_BREWERY_MUC={{ matrix_jitsi_jibri_brewery_muc }} JIBRI_REQUEST_RETRIES @@ -31,4 +31,4 @@ XMPP_DOMAIN={{ matrix_jitsi_xmpp_domain }} XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} XMPP_INTERNAL_MUC_DOMAIN={{ matrix_jitsi_xmpp_internal_muc_domain }} XMPP_MUC_DOMAIN={{ matrix_jitsi_xmpp_muc_domain }} -XMPP_SERVER={{ matrix_jitsi_xmpp_server }} \ No newline at end of file +XMPP_SERVER={{ matrix_jitsi_xmpp_server }} From 125020890777570b8c92821a01e810c7bb86d8e9 Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Tue, 22 Jun 2021 12:24:35 +0530 Subject: [PATCH 06/26] whitespaces --- roles/matrix-jitsi/templates/jicofo/env.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-jitsi/templates/jicofo/env.j2 b/roles/matrix-jitsi/templates/jicofo/env.j2 index df669dc6f..3764d0564 100644 --- a/roles/matrix-jitsi/templates/jicofo/env.j2 +++ b/roles/matrix-jitsi/templates/jicofo/env.j2 @@ -17,7 +17,7 @@ JICOFO_CONF_SINGLE_PARTICIPANT_TIMEOUT JICOFO_ENABLE_HEALTH_CHECKS JICOFO_SHORT_ID JICOFO_RESERVATION_ENABLED -JICOFO_RESERVATION_REST_BASE_URL +JICOFO_RESERVATION_REST_BASE_URL JIBRI_BREWERY_MUC={{ matrix_jitsi_jibri_brewery_muc }} JIBRI_REQUEST_RETRIES JIBRI_PENDING_TIMEOUT={{ matrix_jitsi_jibri_pending_timeout }} From 0c8a3c401f8d152a7e6d2a839e94b440e3eb9864 Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Tue, 22 Jun 2021 23:20:09 +0530 Subject: [PATCH 07/26] jibri service --- roles/matrix-jitsi/defaults/main.yml | 13 +++ roles/matrix-jitsi/tasks/init.yml | 2 +- roles/matrix-jitsi/tasks/main.yml | 6 ++ .../matrix-jitsi/tasks/setup_jitsi_jibri.yml | 83 +++++++++++++++++++ 4 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 roles/matrix-jitsi/tasks/setup_jitsi_jibri.yml diff --git a/roles/matrix-jitsi/defaults/main.yml b/roles/matrix-jitsi/defaults/main.yml index 436b0091f..c0c18fd7c 100644 --- a/roles/matrix-jitsi/defaults/main.yml +++ b/roles/matrix-jitsi/defaults/main.yml @@ -259,3 +259,16 @@ matrix_jitsi_jvb_container_rtp_tcp_host_bind_port: "{{ matrix_jitsi_jvb_rtp_tcp_ # # Takes an ":" or "" value (e.g. "127.0.0.1:12090"), or empty string to not expose. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: '' + +# Jibri +matrix_jitsi_jibri_docker_image: "{{ matrix_container_global_registry_prefix }}jitsi/jibri:{{ matrix_jitsi_container_image_tag }}" +matrix_jitsi_jibri_docker_image_force_pull: "{{ matrix_jitsi_jibri_docker_image.endswith(':latest') }}" + +matrix_jitsi_jibri_base_path: "{{ matrix_base_data_path }}/jitsi/jibri" +matrix_jitsi_jibri_config_path: "{{ matrix_jitsi_jicofo_base_path }}/config" + +# A list of extra arguments to pass to the container +matrix_jitsi_jibri_container_extra_arguments: [] + +# List of systemd services that matrix-jitsi-jicofo.service depends on +matrix_jitsi_jibri_systemd_required_services_list: ['docker.service', 'matrix-jitsi-jicofo.service'] \ No newline at end of file diff --git a/roles/matrix-jitsi/tasks/init.yml b/roles/matrix-jitsi/tasks/init.yml index 1f7a2d1cf..9dee6db09 100644 --- a/roles/matrix-jitsi/tasks/init.yml +++ b/roles/matrix-jitsi/tasks/init.yml @@ -1,3 +1,3 @@ - set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-jitsi-web.service', 'matrix-jitsi-prosody.service', 'matrix-jitsi-jicofo.service', 'matrix-jitsi-jvb.service'] }}" + matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-jitsi-web.service', 'matrix-jitsi-prosody.service', 'matrix-jitsi-jicofo.service', 'matrix-jitsi-jvb.service', 'matrix-jitsi-jibri.service'] }}" when: matrix_jitsi_enabled|bool diff --git a/roles/matrix-jitsi/tasks/main.yml b/roles/matrix-jitsi/tasks/main.yml index e4f3508f3..30b3dd040 100644 --- a/roles/matrix-jitsi/tasks/main.yml +++ b/roles/matrix-jitsi/tasks/main.yml @@ -37,3 +37,9 @@ tags: - setup-all - setup-jitsi + +- import_tasks: "{{ role_path }}/tasks/setup_jitsi_jibri.yml" + when: run_setup|bool + tags: + - setup-all + - setup-jitsi diff --git a/roles/matrix-jitsi/tasks/setup_jitsi_jibri.yml b/roles/matrix-jitsi/tasks/setup_jitsi_jibri.yml new file mode 100644 index 000000000..c2791d9c9 --- /dev/null +++ b/roles/matrix-jitsi/tasks/setup_jitsi_jibri.yml @@ -0,0 +1,83 @@ +--- + +# +# Tasks related to setting up jitsi-jibri +# + +- name: Ensure Matrix jitsi-jibri path exists + file: + path: "{{ item.path }}" + state: directory + mode: 0777 + owner: "{{ matrix_user_username }}" + group: "{{ matrix_user_groupname }}" + with_items: + - { path: "{{ matrix_jitsi_jibri_base_path }}", when: true } + - { path: "{{ matrix_jitsi_jibri_config_path }}", when: true } + when: matrix_jitsi_enabled|bool and item.when + +- name: Ensure jitsi-jibri Docker image is pulled + docker_image: + name: "{{ matrix_jitsi_jibri_docker_image }}" + source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" + force_source: "{{ matrix_jitsi_jibri_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" + force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_jitsi_jibri_docker_image_force_pull }}" + when: matrix_jitsi_enabled|bool + +- name: Ensure jitsi-jibri environment variables file created + template: + src: "{{ role_path }}/templates/jibri/env.j2" + dest: "{{ matrix_jitsi_jibri_base_path }}/env" + mode: 0640 + when: matrix_jitsi_enabled|bool + +- name: Ensure matrix-jitsi-jibri.service installed + template: + src: "{{ role_path }}/templates/jibri/matrix-jitsi-jibri.service.j2" + dest: "{{ matrix_systemd_path }}/matrix-jitsi-jibri.service" + mode: 0644 + register: matrix_jitsi_jibri_systemd_service_result + when: matrix_jitsi_enabled|bool + +- name: Ensure systemd reloaded after matrix-jitsi-jibri.service installation + service: + daemon_reload: yes + when: "matrix_jitsi_enabled and matrix_jitsi_jibri_systemd_service_result.changed" + +# +# Tasks related to getting rid of jitsi-jibri (if it was previously enabled) +# + +- name: Check existence of matrix-jitsi-jibri service + stat: + path: "{{ matrix_systemd_path }}/matrix-jitsi-jibri.service" + register: matrix_jitsi_jibri_service_stat + when: "not matrix_jitsi_enabled|bool" + +- name: Ensure matrix-jitsi-jibri is stopped + service: + name: matrix-jitsi-jibri + state: stopped + daemon_reload: yes + register: stopping_result + when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jibri_service_stat.stat.exists" + +- name: Ensure matrix-jitsi-jibri.service doesn't exist + file: + path: "{{ matrix_systemd_path }}/matrix-jitsi-jibri.service" + state: absent + when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jibri_service_stat.stat.exists" + +- name: Ensure systemd reloaded after matrix-jitsi-jibri.service removal + service: + daemon_reload: yes + when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jibri_service_stat.stat.exists" + +- name: Ensure Matrix jitsi-jibri paths doesn't exist + file: + path: "{{ matrix_jitsi_jibri_base_path }}" + state: absent + when: "not matrix_jitsi_enabled|bool" + +# Intentionally not removing the Docker image when uninstalling. +# We can't be sure it had been pulled by us in the first place. From d9e943aaaa6d035abb24d7ff98f4997be0f12dde Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Tue, 22 Jun 2021 23:32:32 +0530 Subject: [PATCH 08/26] minor fix --- roles/matrix-jitsi/defaults/main.yml | 2 +- roles/matrix-jitsi/templates/jibri/env.j2 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/matrix-jitsi/defaults/main.yml b/roles/matrix-jitsi/defaults/main.yml index c0c18fd7c..9daa1716e 100644 --- a/roles/matrix-jitsi/defaults/main.yml +++ b/roles/matrix-jitsi/defaults/main.yml @@ -265,7 +265,7 @@ matrix_jitsi_jibri_docker_image: "{{ matrix_container_global_registry_prefix }}j matrix_jitsi_jibri_docker_image_force_pull: "{{ matrix_jitsi_jibri_docker_image.endswith(':latest') }}" matrix_jitsi_jibri_base_path: "{{ matrix_base_data_path }}/jitsi/jibri" -matrix_jitsi_jibri_config_path: "{{ matrix_jitsi_jicofo_base_path }}/config" +matrix_jitsi_jibri_config_path: "{{ matrix_jitsi_jibri_base_path }}/config" # A list of extra arguments to pass to the container matrix_jitsi_jibri_container_extra_arguments: [] diff --git a/roles/matrix-jitsi/templates/jibri/env.j2 b/roles/matrix-jitsi/templates/jibri/env.j2 index b0dc8438b..71862ca28 100644 --- a/roles/matrix-jitsi/templates/jibri/env.j2 +++ b/roles/matrix-jitsi/templates/jibri/env.j2 @@ -9,9 +9,9 @@ JIBRI_XMPP_PASSWORD={{ matrix_jitsi_jibri_xmpp_password }} JIBRI_BREWERY_MUC={{ matrix_jitsi_jibri_brewery_muc }} JIBRI_RECORDER_USER={{ matrix_jitsi_jibri_recorder_user }} JIBRI_RECORDER_PASSWORD={{ matrix_jitsi_jibri_recorder_password }} -JIBRI_RECORDING_DIR={{ matrix_jitsi_jibri_recording_dir }} +JIBRI_RECORDING_DIR=/config/recordings JIBRI_FINALIZE_RECORDING_SCRIPT_PATH JIBRI_STRIP_DOMAIN_JID=muc -JIBRI_LOGS_DIR={{ matrix_jitsi_jibri_logs_dir }} +JIBRI_LOGS_DIR=/config/logs DISPLAY=:0 TZ={{ matrix_jitsi_timezone }} \ No newline at end of file From 6ede9c8cd6be996c00c5b6ae258846839d45457f Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Tue, 22 Jun 2021 23:59:49 +0530 Subject: [PATCH 09/26] network-alias added to fix domains --- roles/matrix-jitsi/templates/jvb/matrix-jitsi-jvb.service.j2 | 1 + .../templates/prosody/matrix-jitsi-prosody.service.j2 | 1 + roles/matrix-jitsi/templates/web/matrix-jitsi-web.service.j2 | 1 + 3 files changed, 3 insertions(+) diff --git a/roles/matrix-jitsi/templates/jvb/matrix-jitsi-jvb.service.j2 b/roles/matrix-jitsi/templates/jvb/matrix-jitsi-jvb.service.j2 index 53c0c83ac..2785795d7 100644 --- a/roles/matrix-jitsi/templates/jvb/matrix-jitsi-jvb.service.j2 +++ b/roles/matrix-jitsi/templates/jvb/matrix-jitsi-jvb.service.j2 @@ -16,6 +16,7 @@ ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jvb \ --log-driver=none \ --network={{ matrix_docker_network }} \ + --network-alias=jvb.meet.jitsi \ --env-file={{ matrix_jitsi_jvb_base_path }}/env \ {% if matrix_jitsi_jvb_container_rtp_udp_host_bind_port %} -p {{ matrix_jitsi_jvb_container_rtp_udp_host_bind_port }}:{{ matrix_jitsi_jvb_rtp_udp_port }}/udp \ diff --git a/roles/matrix-jitsi/templates/prosody/matrix-jitsi-prosody.service.j2 b/roles/matrix-jitsi/templates/prosody/matrix-jitsi-prosody.service.j2 index 4445e52bd..5a4a81e5d 100644 --- a/roles/matrix-jitsi/templates/prosody/matrix-jitsi-prosody.service.j2 +++ b/roles/matrix-jitsi/templates/prosody/matrix-jitsi-prosody.service.j2 @@ -16,6 +16,7 @@ ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-prosody \ --log-driver=none \ --network={{ matrix_docker_network }} \ + --network-alias={{ matrix_jitsi_xmpp_server }} \ {% if matrix_jitsi_prosody_container_http_host_bind_port %} -p {{ matrix_jitsi_prosody_container_http_host_bind_port }}:5280 \ {% endif %} diff --git a/roles/matrix-jitsi/templates/web/matrix-jitsi-web.service.j2 b/roles/matrix-jitsi/templates/web/matrix-jitsi-web.service.j2 index 6ae2074d5..5d3863611 100644 --- a/roles/matrix-jitsi/templates/web/matrix-jitsi-web.service.j2 +++ b/roles/matrix-jitsi/templates/web/matrix-jitsi-web.service.j2 @@ -16,6 +16,7 @@ ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-web \ --log-driver=none \ --network={{ matrix_docker_network }} \ + --network-alias={{ matrix_jitsi_xmpp_domain }} \ --env-file={{ matrix_jitsi_web_base_path }}/env \ {% if matrix_jitsi_web_container_http_host_bind_port %} -p {{ matrix_jitsi_web_container_http_host_bind_port }}:80 \ From f2f1b20e44671a4f4e8cca08090ea723d9e1c6db Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Wed, 23 Jun 2021 23:17:24 +0530 Subject: [PATCH 10/26] jicofo client proxy connection --- inventory/scripts/jitsi-generate-passwords.sh | 2 -- roles/matrix-jitsi/defaults/main.yml | 2 +- roles/matrix-jitsi/templates/prosody/env.j2 | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/inventory/scripts/jitsi-generate-passwords.sh b/inventory/scripts/jitsi-generate-passwords.sh index eacfa7d88..c48a0c2de 100755 --- a/inventory/scripts/jitsi-generate-passwords.sh +++ b/inventory/scripts/jitsi-generate-passwords.sh @@ -11,7 +11,6 @@ echo "# Install it before using this script, or simply create your own passwords echo "" -JICOFO_COMPONENT_SECRET=$(generatePassword) JICOFO_AUTH_PASSWORD=$(generatePassword) JVB_AUTH_PASSWORD=$(generatePassword) JIBRI_RECORDER_PASSWORD=$(generatePassword) @@ -19,7 +18,6 @@ JIBRI_XMPP_PASSWORD=$(generatePassword) echo "# Paste these variables into your inventory/host_vars/matrix.DOMAIN/vars.yml file:" echo "" -echo "matrix_jitsi_jicofo_component_secret: "$JICOFO_COMPONENT_SECRET echo "matrix_jitsi_jicofo_auth_password: "$JICOFO_AUTH_PASSWORD echo "matrix_jitsi_jvb_auth_password: "$JVB_AUTH_PASSWORD echo "matrix_jitsi_jibri_recorder_password: "$JIBRI_RECORDER_PASSWORD diff --git a/roles/matrix-jitsi/defaults/main.yml b/roles/matrix-jitsi/defaults/main.yml index 9daa1716e..55e24d80c 100644 --- a/roles/matrix-jitsi/defaults/main.yml +++ b/roles/matrix-jitsi/defaults/main.yml @@ -53,7 +53,7 @@ matrix_jitsi_jibri_recorder_password: '' matrix_jitsi_enable_lobby: false -matrix_jitsi_version: stable-5765-1 +matrix_jitsi_version: stable-5963 matrix_jitsi_container_image_tag: "{{ matrix_jitsi_version }}" # for backward-compatibility matrix_jitsi_web_docker_image: "{{ matrix_container_global_registry_prefix }}jitsi/web:{{ matrix_jitsi_container_image_tag }}" diff --git a/roles/matrix-jitsi/templates/prosody/env.j2 b/roles/matrix-jitsi/templates/prosody/env.j2 index 74df951e0..e733e668a 100644 --- a/roles/matrix-jitsi/templates/prosody/env.j2 +++ b/roles/matrix-jitsi/templates/prosody/env.j2 @@ -28,7 +28,7 @@ XMPP_MUC_MODULES= XMPP_INTERNAL_MUC_MODULES= XMPP_RECORDER_DOMAIN={{ matrix_jitsi_recorder_domain }} XMPP_CROSS_DOMAIN=true -JICOFO_COMPONENT_SECRET={{ matrix_jitsi_jicofo_component_secret }} +JICOFO_COMPONENT_SECRET JICOFO_AUTH_USER={{ matrix_jitsi_jicofo_auth_user }} JICOFO_AUTH_PASSWORD={{ matrix_jitsi_jicofo_auth_password }} JVB_AUTH_USER={{ matrix_jitsi_jvb_auth_user }} From 0cc17ab2cafac628f4cb1cae4256224b60edacef Mon Sep 17 00:00:00 2001 From: sakkiii <11132948+sakkiii@users.noreply.github.com> Date: Wed, 23 Jun 2021 23:55:55 +0530 Subject: [PATCH 11/26] matrix_jitsi_jicofo_component_secret validation --- roles/matrix-jitsi/tasks/validate_config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/matrix-jitsi/tasks/validate_config.yml b/roles/matrix-jitsi/tasks/validate_config.yml index cc8a4b224..d2887b12c 100644 --- a/roles/matrix-jitsi/tasks/validate_config.yml +++ b/roles/matrix-jitsi/tasks/validate_config.yml @@ -16,7 +16,6 @@ with_items: - "matrix_jitsi_jibri_xmpp_password" - "matrix_jitsi_jibri_recorder_password" - - "matrix_jitsi_jicofo_component_secret" - "matrix_jitsi_jicofo_auth_password" - "matrix_jitsi_jvb_auth_password" From 5df4d688292020c2d00bd15aa3bc4216a7b839e7 Mon Sep 17 00:00:00 2001 From: oxmie <61626020+oxmie@users.noreply.github.com> Date: Mon, 28 Jun 2021 14:30:48 +0200 Subject: [PATCH 12/26] Make federation domain customizable --- roles/matrix-base/defaults/main.yml | 3 +++ .../templates/static-files/well-known/matrix-server.j2 | 2 +- roles/matrix-nginx-proxy/defaults/main.yml | 1 + .../templates/nginx/conf.d/matrix-domain.conf.j2 | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/matrix-base/defaults/main.yml b/roles/matrix-base/defaults/main.yml index 86df4ad6f..31bff1051 100644 --- a/roles/matrix-base/defaults/main.yml +++ b/roles/matrix-base/defaults/main.yml @@ -11,6 +11,9 @@ matrix_domain: ~ # This and the Element FQN (see below) are expected to be on the same server. matrix_server_fqn_matrix: "matrix.{{ matrix_domain }}" +# This is where you access federation API. +matrix_server_fqn_matrix_federation: '{{ matrix_server_fqn_matrix }}' + # This is where you access the Element web UI from (if enabled via matrix_client_element_enabled; enabled by default). # This and the Matrix FQN (see above) are expected to be on the same server. matrix_server_fqn_element: "element.{{ matrix_domain }}" diff --git a/roles/matrix-base/templates/static-files/well-known/matrix-server.j2 b/roles/matrix-base/templates/static-files/well-known/matrix-server.j2 index 8349a15c2..3bc7346d2 100644 --- a/roles/matrix-base/templates/static-files/well-known/matrix-server.j2 +++ b/roles/matrix-base/templates/static-files/well-known/matrix-server.j2 @@ -1,4 +1,4 @@ #jinja2: lstrip_blocks: "True" { - "m.server": "{{ matrix_server_fqn_matrix }}:{{ matrix_federation_public_port }}" + "m.server": "{{ matrix_server_fqn_matrix_federation }}:{{ matrix_federation_public_port }}" } diff --git a/roles/matrix-nginx-proxy/defaults/main.yml b/roles/matrix-nginx-proxy/defaults/main.yml index e71a10382..c476fd488 100644 --- a/roles/matrix-nginx-proxy/defaults/main.yml +++ b/roles/matrix-nginx-proxy/defaults/main.yml @@ -120,6 +120,7 @@ matrix_nginx_proxy_proxy_hydrogen_hostname: "{{ matrix_server_fqn_hydrogen }}" # Controls whether proxying the matrix domain should be done. matrix_nginx_proxy_proxy_matrix_enabled: false matrix_nginx_proxy_proxy_matrix_hostname: "{{ matrix_server_fqn_matrix }}" +matrix_nginx_proxy_proxy_matrix_federation_hostname: "{{ matrix_nginx_proxy_proxy_matrix_hostname }}" # The port name used for federation in the nginx configuration. # This is not necessarily the port that it's actually on, # as port-mapping happens (`-p ..`) for the `matrix-nginx-proxy` container. diff --git a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 index 7b26434d9..04a77269c 100644 --- a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 +++ b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-domain.conf.j2 @@ -239,7 +239,7 @@ server { listen {{ matrix_nginx_proxy_proxy_matrix_federation_port }}; {% endif %} - server_name {{ matrix_nginx_proxy_proxy_matrix_hostname }}; + server_name {{ matrix_nginx_proxy_proxy_matrix_federation_hostname }}; server_tokens off; root /dev/null; From 7b2211da8e251721f101a9052dd5c43f9a598e46 Mon Sep 17 00:00:00 2001 From: sak Date: Thu, 1 Jul 2021 15:37:20 +0530 Subject: [PATCH 13/26] remove jibri --- logs/log.0.txt | 71 ++++++++++++++++ roles/matrix-jitsi/defaults/main.yml | 13 --- roles/matrix-jitsi/tasks/init.yml | 2 +- roles/matrix-jitsi/tasks/main.yml | 6 -- .../matrix-jitsi/tasks/setup_jitsi_jibri.yml | 83 ------------------- roles/matrix-jitsi/templates/jibri/env.j2 | 17 ---- .../jibri/matrix-jitsi-jibri.service.j2 | 39 --------- 7 files changed, 72 insertions(+), 159 deletions(-) create mode 100644 logs/log.0.txt delete mode 100644 roles/matrix-jitsi/tasks/setup_jitsi_jibri.yml delete mode 100644 roles/matrix-jitsi/templates/jibri/env.j2 delete mode 100644 roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 diff --git a/logs/log.0.txt b/logs/log.0.txt new file mode 100644 index 000000000..3deaf28d3 --- /dev/null +++ b/logs/log.0.txt @@ -0,0 +1,71 @@ +2021-06-25 04:54:56.392 INFO: [1] org.jitsi.jibri.Main.log() Jibri run with args [--config, /etc/jitsi/jibri/config.json] +2021-06-25 04:54:56.471 INFO: [1] org.jitsi.jibri.Main.log() Checking legacy config file /etc/jitsi/jibri/config.json +2021-06-25 04:54:57.150 INFO: [1] org.jitsi.jibri.Main.log() Parsed legacy config: +JibriConfig(jibriId=null, recordingDirectory=/config/recordings, singleUseMode=null, enabledStatsD=null, finalizeRecordingScriptPath=null, xmppEnvironments=[XmppEnvironmentConfig(name=prod environment, xmppServerHosts=[xmpp.meet.jitsi], xmppDomain=meet.jitsi, baseUrl=https://jitsi.domain.tld, controlLogin=XmppCredentials(domain=auth.meet.jitsi, port=null, username=jibri, password=e54e91c82a9081af3f4c93b1bfab5a69), controlMuc=XmppMuc(domain=internal-muc.meet.jitsi, roomName=jibribrewery, nickname=jibri-instanse-075102036), sipControlMuc=null, callLogin=XmppCredentials(domain=recorder.meet.jitsi, port=null, username=recorder, password=ab79147973e1ee2deb0dfad0fb1e4113), stripFromRoomDomain=muc., usageTimeoutMins=0, trustAllXmppCerts=true)]) +2021-06-25 04:54:57.178 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: + LambdaSupplier: 'JibriConfig::jibriId' + ConfigSourceSupplier: key: 'jibri.id', type: 'kotlin.String', source: 'config' +2021-06-25 04:54:57.179 FINE: [1] org.jitsi.jibri.config.log() LambdaSupplier: Trying to retrieve value via JibriConfig::jibriId +2021-06-25 04:54:57.180 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: failed to find value via LambdaSupplier: 'JibriConfig::jibriId': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$Error: class java.lang.NullPointerException +2021-06-25 04:54:57.181 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.id' from source 'config' as type kotlin.String +2021-06-25 04:54:57.199 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.id' from source 'config' as type kotlin.String +2021-06-25 04:54:57.200 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.id', type: 'kotlin.String', source: 'config' +2021-06-25 04:54:57.200 INFO: [1] org.jitsi.jibri.Main.log() Jibri starting up with id +2021-06-25 04:54:57.205 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: + LambdaSupplier: 'JibriConfig::enableStatsD' + ConfigSourceSupplier: key: 'jibri.stats.enable-stats-d', type: 'kotlin.Boolean', source: 'config' +2021-06-25 04:54:57.206 FINE: [1] org.jitsi.jibri.config.log() LambdaSupplier: Trying to retrieve value via JibriConfig::enableStatsD +2021-06-25 04:54:57.206 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: failed to find value via LambdaSupplier: 'JibriConfig::enableStatsD': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$Error: class java.lang.NullPointerException +2021-06-25 04:54:57.206 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.stats.enable-stats-d' from source 'config' as type kotlin.Boolean +2021-06-25 04:54:57.208 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.stats.enable-stats-d' from source 'config' as type kotlin.Boolean +2021-06-25 04:54:57.208 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.stats.enable-stats-d', type: 'kotlin.Boolean', source: 'config' +2021-06-25 04:54:57.221 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: + ConfigSourceSupplier: key: 'jibri.webhook.subscribers', type: 'kotlin.collections.List', source: 'config' +2021-06-25 04:54:57.222 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.webhook.subscribers' from source 'config' as type kotlin.collections.List +2021-06-25 04:54:57.228 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.webhook.subscribers' from source 'config' as type kotlin.collections.List +2021-06-25 04:54:57.228 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.webhook.subscribers', type: 'kotlin.collections.List', source: 'config' +2021-06-25 04:54:57.625 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.jwt-info' from source 'config' as type com.typesafe.config.ConfigObject +2021-06-25 04:54:57.635 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.jwt-info' from source 'config' as type com.typesafe.config.ConfigObject +2021-06-25 04:54:57.636 INFO: [1] org.jitsi.jibri.webhooks.v1.JwtInfo.log() got jwtConfig: {} + +2021-06-25 04:54:57.637 INFO: [1] org.jitsi.jibri.webhooks.v1.JwtInfo.log() Unable to create JwtInfo: com.typesafe.config.ConfigException$Missing: reference.conf @ jar:file:/opt/jitsi/jibri/jibri.jar!/reference.conf: 59: No configuration setting found for key 'signing-key-path' +2021-06-25 04:54:57.657 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: + ConfigSourceSupplier: key: 'internal_http_port', type: 'kotlin.Int', source: 'command line args' + ConfigSourceSupplier: key: 'jibri.api.http.internal-api-port', type: 'kotlin.Int', source: 'config' +2021-06-25 04:54:57.658 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'internal_http_port' from source 'command line args' as type kotlin.Int +2021-06-25 04:54:57.660 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: failed to find value via ConfigSourceSupplier: key: 'internal_http_port', type: 'kotlin.Int', source: 'command line args': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$NotFound: not found +2021-06-25 04:54:57.660 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.api.http.internal-api-port' from source 'config' as type kotlin.Int +2021-06-25 04:54:57.662 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.api.http.internal-api-port' from source 'config' as type kotlin.Int +2021-06-25 04:54:57.663 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.api.http.internal-api-port', type: 'kotlin.Int', source: 'config' +2021-06-25 04:54:57.663 INFO: [1] org.jitsi.jibri.Main.log() Using port 3333 for internal HTTP API +2021-06-25 04:54:57.669 FINE: [26] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status +2021-06-25 04:54:57.827 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: + LambdaSupplier: 'JibriConfig::xmppEnvironments' + TypeConvertingSupplier: converting value from ConfigSourceSupplier: key: 'jibri.api.xmpp.environments', type: 'kotlin.collections.List', source: 'config' +2021-06-25 04:54:57.827 FINE: [1] org.jitsi.jibri.config.log() LambdaSupplier: Trying to retrieve value via JibriConfig::xmppEnvironments +2021-06-25 04:54:57.827 FINE: [1] org.jitsi.jibri.config.log() LambdaSupplier: 'JibriConfig::xmppEnvironments': found value +2021-06-25 04:54:57.828 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via LambdaSupplier: 'JibriConfig::xmppEnvironments' +2021-06-25 04:54:57.934 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() Jibri reports its status is now JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections +2021-06-25 04:54:57.936 FINE: [1] org.jitsi.xmpp.mucclient.MucClientManager.log() Setting a presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@18e8473e +2021-06-25 04:54:57.942 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() Connecting to xmpp environment on xmpp.meet.jitsi with config XmppEnvironmentConfig(name=prod environment, xmppServerHosts=[xmpp.meet.jitsi], xmppDomain=meet.jitsi, baseUrl=https://jitsi.domain.tld, controlLogin=XmppCredentials(domain=auth.meet.jitsi, port=null, username=jibri, password=e54e91c82a9081af3f4c93b1bfab5a69), controlMuc=XmppMuc(domain=internal-muc.meet.jitsi, roomName=jibribrewery, nickname=jibri-instanse-075102036), sipControlMuc=null, callLogin=XmppCredentials(domain=recorder.meet.jitsi, port=null, username=recorder, password=ab79147973e1ee2deb0dfad0fb1e4113), stripFromRoomDomain=muc., usageTimeoutMins=0, trustAllXmppCerts=true) +2021-06-25 04:54:57.943 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() The trustAllXmppCerts config is enabled for this domain, all XMPP server provided certificates will be accepted +2021-06-25 04:54:57.966 FINE: [39] org.jitsi.xmpp.mucclient.MucClient.log() Initializing a new MucClient for [ org.jitsi.xmpp.mucclient.MucClientConfiguration id=xmpp.meet.jitsi domain=auth.meet.jitsi hostname=xmpp.meet.jitsi port=null username=jibri mucs=[jibribrewery@internal-muc.meet.jitsi] mucNickname=jibri-instanse-075102036 disableCertificateVerification=true] +2021-06-25 04:54:57.967 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: + ConfigSourceSupplier: key: 'http_api_port', type: 'kotlin.Int', source: 'command line args' + ConfigSourceSupplier: key: 'jibri.api.http.external-api-port', type: 'kotlin.Int', source: 'config' +2021-06-25 04:54:57.967 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'http_api_port' from source 'command line args' as type kotlin.Int +2021-06-25 04:54:57.968 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: failed to find value via ConfigSourceSupplier: key: 'http_api_port', type: 'kotlin.Int', source: 'command line args': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$NotFound: not found +2021-06-25 04:54:57.968 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.api.http.external-api-port' from source 'config' as type kotlin.Int +2021-06-25 04:54:57.969 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.api.http.external-api-port' from source 'config' as type kotlin.Int +2021-06-25 04:54:57.970 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.api.http.external-api-port', type: 'kotlin.Int', source: 'config' +2021-06-25 04:54:57.970 WARNING: [39] org.jitsi.xmpp.mucclient.MucClient.log() Disabling certificate verification! +2021-06-25 04:54:57.970 INFO: [1] org.jitsi.jibri.Main.log() Using port 2222 for HTTP API +2021-06-25 04:54:57.999 FINE: [39] org.jitsi.xmpp.mucclient.MucClient.log() About to connect and login. +2021-06-25 04:54:58.154 INFO: [39] org.jitsi.xmpp.mucclient.MucClient.log() Connected. +2021-06-25 04:54:58.155 INFO: [39] org.jitsi.xmpp.mucclient.MucClient.log() Logging in. +2021-06-25 04:54:58.210 FINE: [39] org.jitsi.xmpp.mucclient.MucClient.log() Authenticated, b=false +2021-06-25 04:54:58.210 FINE: [39] org.jitsi.xmpp.mucclient.MucClient.log() About to join MUCs: [jibribrewery@internal-muc.meet.jitsi] +2021-06-25 04:54:58.226 INFO: [39] org.jitsi.xmpp.mucclient.MucClient.log() Joined MUC: jibribrewery@internal-muc.meet.jitsi +2021-06-25 04:54:58.234 FINE: [55] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element busy-status from namespace http://jitsi.org/protocol/jibri +2021-06-25 04:54:58.234 FINE: [55] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element health-status from namespace http://jitsi.org/protocol/health +021-06-25 04:55:57.654 FINE: [26] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status diff --git a/roles/matrix-jitsi/defaults/main.yml b/roles/matrix-jitsi/defaults/main.yml index 55e24d80c..8c8d9156b 100644 --- a/roles/matrix-jitsi/defaults/main.yml +++ b/roles/matrix-jitsi/defaults/main.yml @@ -259,16 +259,3 @@ matrix_jitsi_jvb_container_rtp_tcp_host_bind_port: "{{ matrix_jitsi_jvb_rtp_tcp_ # # Takes an ":" or "" value (e.g. "127.0.0.1:12090"), or empty string to not expose. matrix_jitsi_jvb_container_colibri_ws_host_bind_port: '' - -# Jibri -matrix_jitsi_jibri_docker_image: "{{ matrix_container_global_registry_prefix }}jitsi/jibri:{{ matrix_jitsi_container_image_tag }}" -matrix_jitsi_jibri_docker_image_force_pull: "{{ matrix_jitsi_jibri_docker_image.endswith(':latest') }}" - -matrix_jitsi_jibri_base_path: "{{ matrix_base_data_path }}/jitsi/jibri" -matrix_jitsi_jibri_config_path: "{{ matrix_jitsi_jibri_base_path }}/config" - -# A list of extra arguments to pass to the container -matrix_jitsi_jibri_container_extra_arguments: [] - -# List of systemd services that matrix-jitsi-jicofo.service depends on -matrix_jitsi_jibri_systemd_required_services_list: ['docker.service', 'matrix-jitsi-jicofo.service'] \ No newline at end of file diff --git a/roles/matrix-jitsi/tasks/init.yml b/roles/matrix-jitsi/tasks/init.yml index 9dee6db09..1f7a2d1cf 100644 --- a/roles/matrix-jitsi/tasks/init.yml +++ b/roles/matrix-jitsi/tasks/init.yml @@ -1,3 +1,3 @@ - set_fact: - matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-jitsi-web.service', 'matrix-jitsi-prosody.service', 'matrix-jitsi-jicofo.service', 'matrix-jitsi-jvb.service', 'matrix-jitsi-jibri.service'] }}" + matrix_systemd_services_list: "{{ matrix_systemd_services_list + ['matrix-jitsi-web.service', 'matrix-jitsi-prosody.service', 'matrix-jitsi-jicofo.service', 'matrix-jitsi-jvb.service'] }}" when: matrix_jitsi_enabled|bool diff --git a/roles/matrix-jitsi/tasks/main.yml b/roles/matrix-jitsi/tasks/main.yml index 30b3dd040..e4f3508f3 100644 --- a/roles/matrix-jitsi/tasks/main.yml +++ b/roles/matrix-jitsi/tasks/main.yml @@ -37,9 +37,3 @@ tags: - setup-all - setup-jitsi - -- import_tasks: "{{ role_path }}/tasks/setup_jitsi_jibri.yml" - when: run_setup|bool - tags: - - setup-all - - setup-jitsi diff --git a/roles/matrix-jitsi/tasks/setup_jitsi_jibri.yml b/roles/matrix-jitsi/tasks/setup_jitsi_jibri.yml deleted file mode 100644 index c2791d9c9..000000000 --- a/roles/matrix-jitsi/tasks/setup_jitsi_jibri.yml +++ /dev/null @@ -1,83 +0,0 @@ ---- - -# -# Tasks related to setting up jitsi-jibri -# - -- name: Ensure Matrix jitsi-jibri path exists - file: - path: "{{ item.path }}" - state: directory - mode: 0777 - owner: "{{ matrix_user_username }}" - group: "{{ matrix_user_groupname }}" - with_items: - - { path: "{{ matrix_jitsi_jibri_base_path }}", when: true } - - { path: "{{ matrix_jitsi_jibri_config_path }}", when: true } - when: matrix_jitsi_enabled|bool and item.when - -- name: Ensure jitsi-jibri Docker image is pulled - docker_image: - name: "{{ matrix_jitsi_jibri_docker_image }}" - source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" - force_source: "{{ matrix_jitsi_jibri_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" - force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_jitsi_jibri_docker_image_force_pull }}" - when: matrix_jitsi_enabled|bool - -- name: Ensure jitsi-jibri environment variables file created - template: - src: "{{ role_path }}/templates/jibri/env.j2" - dest: "{{ matrix_jitsi_jibri_base_path }}/env" - mode: 0640 - when: matrix_jitsi_enabled|bool - -- name: Ensure matrix-jitsi-jibri.service installed - template: - src: "{{ role_path }}/templates/jibri/matrix-jitsi-jibri.service.j2" - dest: "{{ matrix_systemd_path }}/matrix-jitsi-jibri.service" - mode: 0644 - register: matrix_jitsi_jibri_systemd_service_result - when: matrix_jitsi_enabled|bool - -- name: Ensure systemd reloaded after matrix-jitsi-jibri.service installation - service: - daemon_reload: yes - when: "matrix_jitsi_enabled and matrix_jitsi_jibri_systemd_service_result.changed" - -# -# Tasks related to getting rid of jitsi-jibri (if it was previously enabled) -# - -- name: Check existence of matrix-jitsi-jibri service - stat: - path: "{{ matrix_systemd_path }}/matrix-jitsi-jibri.service" - register: matrix_jitsi_jibri_service_stat - when: "not matrix_jitsi_enabled|bool" - -- name: Ensure matrix-jitsi-jibri is stopped - service: - name: matrix-jitsi-jibri - state: stopped - daemon_reload: yes - register: stopping_result - when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jibri_service_stat.stat.exists" - -- name: Ensure matrix-jitsi-jibri.service doesn't exist - file: - path: "{{ matrix_systemd_path }}/matrix-jitsi-jibri.service" - state: absent - when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jibri_service_stat.stat.exists" - -- name: Ensure systemd reloaded after matrix-jitsi-jibri.service removal - service: - daemon_reload: yes - when: "not matrix_jitsi_enabled|bool and matrix_jitsi_jibri_service_stat.stat.exists" - -- name: Ensure Matrix jitsi-jibri paths doesn't exist - file: - path: "{{ matrix_jitsi_jibri_base_path }}" - state: absent - when: "not matrix_jitsi_enabled|bool" - -# Intentionally not removing the Docker image when uninstalling. -# We can't be sure it had been pulled by us in the first place. diff --git a/roles/matrix-jitsi/templates/jibri/env.j2 b/roles/matrix-jitsi/templates/jibri/env.j2 deleted file mode 100644 index 71862ca28..000000000 --- a/roles/matrix-jitsi/templates/jibri/env.j2 +++ /dev/null @@ -1,17 +0,0 @@ -PUBLIC_URL={{ matrix_jitsi_web_public_url }} -XMPP_AUTH_DOMAIN={{ matrix_jitsi_xmpp_auth_domain }} -XMPP_INTERNAL_MUC_DOMAIN={{ matrix_jitsi_xmpp_internal_muc_domain }} -XMPP_RECORDER_DOMAIN={{ matrix_jitsi_recorder_domain }} -XMPP_SERVER={{ matrix_jitsi_xmpp_server }} -XMPP_DOMAIN={{ matrix_jitsi_xmpp_domain }} -JIBRI_XMPP_USER={{ matrix_jitsi_jibri_xmpp_user }} -JIBRI_XMPP_PASSWORD={{ matrix_jitsi_jibri_xmpp_password }} -JIBRI_BREWERY_MUC={{ matrix_jitsi_jibri_brewery_muc }} -JIBRI_RECORDER_USER={{ matrix_jitsi_jibri_recorder_user }} -JIBRI_RECORDER_PASSWORD={{ matrix_jitsi_jibri_recorder_password }} -JIBRI_RECORDING_DIR=/config/recordings -JIBRI_FINALIZE_RECORDING_SCRIPT_PATH -JIBRI_STRIP_DOMAIN_JID=muc -JIBRI_LOGS_DIR=/config/logs -DISPLAY=:0 -TZ={{ matrix_jitsi_timezone }} \ No newline at end of file diff --git a/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 b/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 deleted file mode 100644 index 044b9e696..000000000 --- a/roles/matrix-jitsi/templates/jibri/matrix-jitsi-jibri.service.j2 +++ /dev/null @@ -1,39 +0,0 @@ -#jinja2: lstrip_blocks: "True" -[Unit] -Description=Matrix jitsi-jibri server -{% for service in matrix_jitsi_jibri_systemd_required_services_list %} -Requires={{ service }} -After={{ service }} -{% endfor %} -DefaultDependencies=no - -[Service] -Type=simple -Environment="HOME={{ matrix_systemd_unit_home_path }}" -ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jibri 2>/dev/null' -ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jibri 2>/dev/null' - -ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-jitsi-jibri \ - --log-driver=none \ - --network={{ matrix_docker_network }} \ - --env-file={{ matrix_jitsi_jibri_base_path }}/env \ -# --device=/dev/snd:/dev/snd \ - --mount type=bind,src=/dev/snd,dst=/dev/snd \ - --mount type=bind,src={{ matrix_jitsi_jibri_config_path }},dst=/config \ -# --volume={{ matrix_jitsi_jibri_config_path }}:/config:Z \ - --volume=/dev/shm:/dev/shm \ - --cap-add=SYS_ADMIN \ - --cap-add=NET_BIND_SERVICE \ - {% for arg in matrix_jitsi_jibri_container_extra_arguments %} - {{ arg }} \ - {% endfor %} - {{ matrix_jitsi_jibri_docker_image }} - -ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-jitsi-jibri 2>/dev/null' -ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-jitsi-jibri 2>/dev/null' -Restart=always -RestartSec=30 -SyslogIdentifier=matrix-jitsi-jibri - -[Install] -WantedBy=multi-user.target From d87947c7793320aa5ef7024db8d5d3cc0e1dcc3e Mon Sep 17 00:00:00 2001 From: sak Date: Thu, 1 Jul 2021 15:42:18 +0530 Subject: [PATCH 14/26] remove jibri --- logs/log.0.txt | 71 -------------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 logs/log.0.txt diff --git a/logs/log.0.txt b/logs/log.0.txt deleted file mode 100644 index 3deaf28d3..000000000 --- a/logs/log.0.txt +++ /dev/null @@ -1,71 +0,0 @@ -2021-06-25 04:54:56.392 INFO: [1] org.jitsi.jibri.Main.log() Jibri run with args [--config, /etc/jitsi/jibri/config.json] -2021-06-25 04:54:56.471 INFO: [1] org.jitsi.jibri.Main.log() Checking legacy config file /etc/jitsi/jibri/config.json -2021-06-25 04:54:57.150 INFO: [1] org.jitsi.jibri.Main.log() Parsed legacy config: -JibriConfig(jibriId=null, recordingDirectory=/config/recordings, singleUseMode=null, enabledStatsD=null, finalizeRecordingScriptPath=null, xmppEnvironments=[XmppEnvironmentConfig(name=prod environment, xmppServerHosts=[xmpp.meet.jitsi], xmppDomain=meet.jitsi, baseUrl=https://jitsi.domain.tld, controlLogin=XmppCredentials(domain=auth.meet.jitsi, port=null, username=jibri, password=e54e91c82a9081af3f4c93b1bfab5a69), controlMuc=XmppMuc(domain=internal-muc.meet.jitsi, roomName=jibribrewery, nickname=jibri-instanse-075102036), sipControlMuc=null, callLogin=XmppCredentials(domain=recorder.meet.jitsi, port=null, username=recorder, password=ab79147973e1ee2deb0dfad0fb1e4113), stripFromRoomDomain=muc., usageTimeoutMins=0, trustAllXmppCerts=true)]) -2021-06-25 04:54:57.178 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: - LambdaSupplier: 'JibriConfig::jibriId' - ConfigSourceSupplier: key: 'jibri.id', type: 'kotlin.String', source: 'config' -2021-06-25 04:54:57.179 FINE: [1] org.jitsi.jibri.config.log() LambdaSupplier: Trying to retrieve value via JibriConfig::jibriId -2021-06-25 04:54:57.180 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: failed to find value via LambdaSupplier: 'JibriConfig::jibriId': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$Error: class java.lang.NullPointerException -2021-06-25 04:54:57.181 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.id' from source 'config' as type kotlin.String -2021-06-25 04:54:57.199 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.id' from source 'config' as type kotlin.String -2021-06-25 04:54:57.200 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.id', type: 'kotlin.String', source: 'config' -2021-06-25 04:54:57.200 INFO: [1] org.jitsi.jibri.Main.log() Jibri starting up with id -2021-06-25 04:54:57.205 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: - LambdaSupplier: 'JibriConfig::enableStatsD' - ConfigSourceSupplier: key: 'jibri.stats.enable-stats-d', type: 'kotlin.Boolean', source: 'config' -2021-06-25 04:54:57.206 FINE: [1] org.jitsi.jibri.config.log() LambdaSupplier: Trying to retrieve value via JibriConfig::enableStatsD -2021-06-25 04:54:57.206 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: failed to find value via LambdaSupplier: 'JibriConfig::enableStatsD': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$Error: class java.lang.NullPointerException -2021-06-25 04:54:57.206 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.stats.enable-stats-d' from source 'config' as type kotlin.Boolean -2021-06-25 04:54:57.208 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.stats.enable-stats-d' from source 'config' as type kotlin.Boolean -2021-06-25 04:54:57.208 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.stats.enable-stats-d', type: 'kotlin.Boolean', source: 'config' -2021-06-25 04:54:57.221 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: - ConfigSourceSupplier: key: 'jibri.webhook.subscribers', type: 'kotlin.collections.List', source: 'config' -2021-06-25 04:54:57.222 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.webhook.subscribers' from source 'config' as type kotlin.collections.List -2021-06-25 04:54:57.228 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.webhook.subscribers' from source 'config' as type kotlin.collections.List -2021-06-25 04:54:57.228 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.webhook.subscribers', type: 'kotlin.collections.List', source: 'config' -2021-06-25 04:54:57.625 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.jwt-info' from source 'config' as type com.typesafe.config.ConfigObject -2021-06-25 04:54:57.635 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.jwt-info' from source 'config' as type com.typesafe.config.ConfigObject -2021-06-25 04:54:57.636 INFO: [1] org.jitsi.jibri.webhooks.v1.JwtInfo.log() got jwtConfig: {} - -2021-06-25 04:54:57.637 INFO: [1] org.jitsi.jibri.webhooks.v1.JwtInfo.log() Unable to create JwtInfo: com.typesafe.config.ConfigException$Missing: reference.conf @ jar:file:/opt/jitsi/jibri/jibri.jar!/reference.conf: 59: No configuration setting found for key 'signing-key-path' -2021-06-25 04:54:57.657 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: - ConfigSourceSupplier: key: 'internal_http_port', type: 'kotlin.Int', source: 'command line args' - ConfigSourceSupplier: key: 'jibri.api.http.internal-api-port', type: 'kotlin.Int', source: 'config' -2021-06-25 04:54:57.658 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'internal_http_port' from source 'command line args' as type kotlin.Int -2021-06-25 04:54:57.660 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: failed to find value via ConfigSourceSupplier: key: 'internal_http_port', type: 'kotlin.Int', source: 'command line args': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$NotFound: not found -2021-06-25 04:54:57.660 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.api.http.internal-api-port' from source 'config' as type kotlin.Int -2021-06-25 04:54:57.662 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.api.http.internal-api-port' from source 'config' as type kotlin.Int -2021-06-25 04:54:57.663 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.api.http.internal-api-port', type: 'kotlin.Int', source: 'config' -2021-06-25 04:54:57.663 INFO: [1] org.jitsi.jibri.Main.log() Using port 3333 for internal HTTP API -2021-06-25 04:54:57.669 FINE: [26] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status -2021-06-25 04:54:57.827 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: - LambdaSupplier: 'JibriConfig::xmppEnvironments' - TypeConvertingSupplier: converting value from ConfigSourceSupplier: key: 'jibri.api.xmpp.environments', type: 'kotlin.collections.List', source: 'config' -2021-06-25 04:54:57.827 FINE: [1] org.jitsi.jibri.config.log() LambdaSupplier: Trying to retrieve value via JibriConfig::xmppEnvironments -2021-06-25 04:54:57.827 FINE: [1] org.jitsi.jibri.config.log() LambdaSupplier: 'JibriConfig::xmppEnvironments': found value -2021-06-25 04:54:57.828 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via LambdaSupplier: 'JibriConfig::xmppEnvironments' -2021-06-25 04:54:57.934 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() Jibri reports its status is now JibriStatus(busyStatus=IDLE, health=OverallHealth(healthStatus=HEALTHY, details={})), publishing presence to connections -2021-06-25 04:54:57.936 FINE: [1] org.jitsi.xmpp.mucclient.MucClientManager.log() Setting a presence extension: org.jitsi.xmpp.extensions.jibri.JibriStatusPacketExt@18e8473e -2021-06-25 04:54:57.942 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() Connecting to xmpp environment on xmpp.meet.jitsi with config XmppEnvironmentConfig(name=prod environment, xmppServerHosts=[xmpp.meet.jitsi], xmppDomain=meet.jitsi, baseUrl=https://jitsi.domain.tld, controlLogin=XmppCredentials(domain=auth.meet.jitsi, port=null, username=jibri, password=e54e91c82a9081af3f4c93b1bfab5a69), controlMuc=XmppMuc(domain=internal-muc.meet.jitsi, roomName=jibribrewery, nickname=jibri-instanse-075102036), sipControlMuc=null, callLogin=XmppCredentials(domain=recorder.meet.jitsi, port=null, username=recorder, password=ab79147973e1ee2deb0dfad0fb1e4113), stripFromRoomDomain=muc., usageTimeoutMins=0, trustAllXmppCerts=true) -2021-06-25 04:54:57.943 INFO: [1] org.jitsi.jibri.api.xmpp.XmppApi.log() The trustAllXmppCerts config is enabled for this domain, all XMPP server provided certificates will be accepted -2021-06-25 04:54:57.966 FINE: [39] org.jitsi.xmpp.mucclient.MucClient.log() Initializing a new MucClient for [ org.jitsi.xmpp.mucclient.MucClientConfiguration id=xmpp.meet.jitsi domain=auth.meet.jitsi hostname=xmpp.meet.jitsi port=null username=jibri mucs=[jibribrewery@internal-muc.meet.jitsi] mucNickname=jibri-instanse-075102036 disableCertificateVerification=true] -2021-06-25 04:54:57.967 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: checking for value via suppliers: - ConfigSourceSupplier: key: 'http_api_port', type: 'kotlin.Int', source: 'command line args' - ConfigSourceSupplier: key: 'jibri.api.http.external-api-port', type: 'kotlin.Int', source: 'config' -2021-06-25 04:54:57.967 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'http_api_port' from source 'command line args' as type kotlin.Int -2021-06-25 04:54:57.968 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: failed to find value via ConfigSourceSupplier: key: 'http_api_port', type: 'kotlin.Int', source: 'command line args': org.jitsi.metaconfig.ConfigException$UnableToRetrieve$NotFound: not found -2021-06-25 04:54:57.968 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Trying to retrieve key 'jibri.api.http.external-api-port' from source 'config' as type kotlin.Int -2021-06-25 04:54:57.969 FINE: [1] org.jitsi.jibri.config.log() ConfigSourceSupplier: Successfully retrieved key 'jibri.api.http.external-api-port' from source 'config' as type kotlin.Int -2021-06-25 04:54:57.970 FINE: [1] org.jitsi.jibri.config.log() FallbackSupplier: value found via ConfigSourceSupplier: key: 'jibri.api.http.external-api-port', type: 'kotlin.Int', source: 'config' -2021-06-25 04:54:57.970 WARNING: [39] org.jitsi.xmpp.mucclient.MucClient.log() Disabling certificate verification! -2021-06-25 04:54:57.970 INFO: [1] org.jitsi.jibri.Main.log() Using port 2222 for HTTP API -2021-06-25 04:54:57.999 FINE: [39] org.jitsi.xmpp.mucclient.MucClient.log() About to connect and login. -2021-06-25 04:54:58.154 INFO: [39] org.jitsi.xmpp.mucclient.MucClient.log() Connected. -2021-06-25 04:54:58.155 INFO: [39] org.jitsi.xmpp.mucclient.MucClient.log() Logging in. -2021-06-25 04:54:58.210 FINE: [39] org.jitsi.xmpp.mucclient.MucClient.log() Authenticated, b=false -2021-06-25 04:54:58.210 FINE: [39] org.jitsi.xmpp.mucclient.MucClient.log() About to join MUCs: [jibribrewery@internal-muc.meet.jitsi] -2021-06-25 04:54:58.226 INFO: [39] org.jitsi.xmpp.mucclient.MucClient.log() Joined MUC: jibribrewery@internal-muc.meet.jitsi -2021-06-25 04:54:58.234 FINE: [55] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element busy-status from namespace http://jitsi.org/protocol/jibri -2021-06-25 04:54:58.234 FINE: [55] org.jitsi.xmpp.extensions.DefaultPacketExtensionProvider.parse() Could not add a provider for element health-status from namespace http://jitsi.org/protocol/health -021-06-25 04:55:57.654 FINE: [26] org.jitsi.jibri.webhooks.v1.WebhookClient.log() Updating 0 subscribers of status From f933ba14aee96be9776b6bbba3ccf071ff88eb12 Mon Sep 17 00:00:00 2001 From: Toorero Date: Fri, 16 Jul 2021 13:27:36 +0200 Subject: [PATCH 15/26] Fixed self-build functionality for mautrix-signal and added self-build functionality for signald --- group_vars/matrix_servers | 4 +- .../defaults/main.yml | 6 ++- .../tasks/setup_install.yml | 48 ++++++++++++++----- 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 8e151d151..43e4007fb 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -374,14 +374,14 @@ matrix_mautrix_signal_login_shared_secret: "{{ matrix_synapse_ext_password_provi matrix_mautrix_signal_database_engine: 'postgres' matrix_mautrix_signal_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.signal.db') | to_uuid }}" +matrix_mautrix_signal_daemon_container_self_build: "{{ matrix_architecture != 'amd64' }}" # sadly not automatic detectable because no manifest + ###################################################################### # # /matrix-bridge-mautrix-signal # ###################################################################### -matrix_mautrix_signal_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" - ###################################################################### # # matrix-bridge-mautrix-telegram diff --git a/roles/matrix-bridge-mautrix-signal/defaults/main.yml b/roles/matrix-bridge-mautrix-signal/defaults/main.yml index 8c121c039..7ff450d9a 100644 --- a/roles/matrix-bridge-mautrix-signal/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-signal/defaults/main.yml @@ -3,7 +3,7 @@ matrix_mautrix_signal_enabled: true -matrix_mautrix_signal_self_build: false +matrix_mautrix_signal_container_self_build: false matrix_mautrix_signal_docker_repo: "https://mau.dev/tulir/mautrix-signal.git" matrix_mautrix_signal_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-signal/docker-src" @@ -13,6 +13,10 @@ matrix_mautrix_signal_daemon_version: latest matrix_mautrix_signal_docker_image: "dock.mau.dev/tulir/mautrix-signal:{{ matrix_mautrix_signal_version }}" matrix_mautrix_signal_docker_image_force_pull: "{{ matrix_mautrix_signal_docker_image.endswith(':latest') }}" +matrix_mautrix_signal_daemon_container_self_build: false +matrix_mautrix_signal_daemon_docker_repo: "https://mau.dev/maunium/signald.git" +matrix_mautrix_signal_daemon_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-signald/docker-src" + matrix_mautrix_signal_daemon_docker_image: "dock.mau.dev/maunium/signald:{{ matrix_mautrix_signal_daemon_version }}" matrix_mautrix_signal_daemon_docker_image_force_pull: "{{ matrix_mautrix_signal_daemon_docker_image.endswith(':latest') }}" diff --git a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml index f90043d8f..c890b706f 100644 --- a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml @@ -8,13 +8,25 @@ The matrix-bridge-mautrix-signal role needs to execute before the matrix-synapse role. when: "matrix_synapse_role_executed|default(False)" +- name: Ensure Mautrix Signal image is pulled + docker_image: + name: "{{ matrix_mautrix_signal_docker_image }}" + source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" + force_source: "{{ matrix_mautrix_signal_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" + force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_signal_docker_image_force_pull }}" +# pull: +# platform: "{{ matrix_architecture }}" + when: "matrix_mautrix_signal_enabled|bool and not matrix_mautrix_signal_container_self_build|bool" + register: matrix_mautrix_signal_pull_results + ignore_errors: yes + - name: Ensure Mautrix Signal repository is present on self-build git: repo: "{{ matrix_mautrix_signal_docker_repo }}" dest: "{{ matrix_mautrix_signal_docker_src_files_path }}" force: "yes" register: matrix_mautrix_signal_git_pull_results - when: "matrix_mautrix_signal_enabled|bool and matrix_mautrix_signal_container_self_build|bool" + when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_container_self_build|bool or matrix_mautrix_signal_pull_results is failed)" - name: Ensure Mautrix Signal image is built docker_image: @@ -26,16 +38,8 @@ dockerfile: Dockerfile path: "{{ matrix_mautrix_signal_docker_src_files_path }}" pull: yes - when: "matrix_mautrix_signal_enabled|bool and matrix_mautrix_signal_container_self_build|bool" + when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_container_self_build|bool or matrix_mautrix_signal_pull_results is failed)" -- name: Ensure Mautrix Signal image is pulled - docker_image: - name: "{{ matrix_mautrix_signal_docker_image }}" - source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" - force_source: "{{ matrix_mautrix_signal_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" - force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_signal_docker_image_force_pull }}" - when: "matrix_mautrix_signal_enabled|bool and not matrix_mautrix_signal_container_self_build|bool" - - name: Ensure Mautrix Signal Daemon image is pulled docker_image: @@ -43,7 +47,29 @@ source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" force_source: "{{ matrix_mautrix_signal_daemon_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_signal_daemon_docker_image_force_pull }}" - when: matrix_mautrix_signal_enabled|bool + when: matrix_mautrix_signal_enabled and not matrix_mautrix_signal_daemon_container_self_build|bool + register: matrix_mautrix_signal_daemon_pull_results + ignore_errors: yes + +- name: Ensure Mautrix Signal Daemon repository is present on self-build + git: + repo: "{{ matrix_mautrix_signal_daemon_docker_repo }}" + dest: "{{ matrix_mautrix_signal_daemon_docker_src_files_path }}" + force: "yes" + register: matrix_mautrix_signal_daemon_git_pull_results + when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_daemon_container_self_build|bool or matrix_mautrix_signal_daemon_pull_results is failed)" + +- name: Ensure Mautrix Signal Daemon image is built + docker_image: + name: "{{ matrix_mautrix_signal_daemon_docker_image }}" + source: build + force_source: "{{ matrix_mautrix_signal_daemon_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" + force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mailer_git_pull_results.changed }}" + build: + dockerfile: Dockerfile + path: "{{ matrix_mautrix_signal_daemon_docker_src_files_path }}" + pull: yes + when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_daemon_container_self_build|bool or matrix_mautrix_signal_daemon_pull_results is failed)" - name: Ensure Mautrix Signal paths exist file: From 7f15787d54703a15bfe02989560dbbed42107d89 Mon Sep 17 00:00:00 2001 From: Toorero Date: Fri, 16 Jul 2021 16:08:51 +0200 Subject: [PATCH 16/26] Fixed mautrix-telegram selfbuild not working on non amd64 platforms --- group_vars/matrix_servers | 2 ++ .../defaults/main.yml | 6 ++++ .../tasks/setup_install.yml | 32 ++++++++++++++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 8e151d151..e1675b51b 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -393,6 +393,8 @@ matrix_mautrix_telegram_enabled: false # Images are multi-arch (amd64 and arm64, but not arm32). matrix_mautrix_telegram_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" +matrix_lottieconverter_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" +matrix_lottieconverter_container_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}" matrix_mautrix_telegram_systemd_required_services_list: | {{ diff --git a/roles/matrix-bridge-mautrix-telegram/defaults/main.yml b/roles/matrix-bridge-mautrix-telegram/defaults/main.yml index e4c7696aa..934403bba 100644 --- a/roles/matrix-bridge-mautrix-telegram/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-telegram/defaults/main.yml @@ -3,6 +3,12 @@ matrix_mautrix_telegram_enabled: true +matrix_lottieconverter_container_self_build: false +matrix_lottieconverter_container_self_build_mask_arch: false +matrix_lottieconverter_docker_repo: "https://mau.dev/tulir/lottieconverter.git" +matrix_lottieconverter_docker_src_files_path: "{{ matrix_base_data_path }}/lotticonverter/docker-src" +matrix_lottieconverter_docker_image: "dock.mau.dev/tulir/lottieconverter:alpine-3.14" # needs to be ajusted according to FROM clause of Dockerfile of mautrix-telegram + matrix_mautrix_telegram_container_self_build: false matrix_mautrix_telegram_docker_repo: "https://mau.dev/tulir/mautrix-telegram.git" matrix_mautrix_telegram_docker_src_files_path: "{{ matrix_base_data_path }}/mautrix-telegram/docker-src" diff --git a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml index 704f0e262..67ab4fe88 100644 --- a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml @@ -56,6 +56,26 @@ force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_telegram_docker_image_force_pull }}" when: "not matrix_mautrix_telegram_container_self_build|bool" +- name: Ensure lottieconverter is present when self-building + git: + repo: "{{ matrix_lottieconverter_docker_repo }}" + dest: "{{ matrix_lottieconverter_docker_src_files_path }}" + force: "yes" + register: matrix_lottieconverter_git_pull_results + when: "matrix_lottieconverter_container_self_build|bool and matrix_mautrix_telegram_container_self_build|bool" + +- name: Ensure lottieconverter Docker image is built + docker_image: + name: "{{ matrix_lottieconverter_docker_image }}" + source: build + force_source: "{{ matrix_lottieconverter_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" + force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_lottieconverter_git_pull_results.changed }}" + build: + dockerfile: Dockerfile + path: "{{ matrix_lottieconverter_docker_src_files_path }}" + pull: yes + when: "matrix_lottieconverter_container_self_build|bool and matrix_lottieconverter_git_pull_results.changed and matrix_mautrix_telegram_container_self_build|bool" + - name: Ensure matrix-mautrix-telegram repository is present when self-building git: repo: "{{ matrix_mautrix_telegram_docker_repo }}" @@ -63,7 +83,12 @@ force: "yes" register: matrix_mautrix_telegram_git_pull_results when: "matrix_mautrix_telegram_container_self_build|bool" + ignore_errors: yes +- name: Ensure TARGETARCH is beeing masked + command: sed -i "3s/ARG/#ARG/" "{{ matrix_mautrix_telegram_docker_src_files_path }}/Dockerfile" + when: "matrix_lottieconverter_container_self_build_mask_arch|bool" + - name: Ensure matrix-mautrix-telegram Docker image is built docker_image: name: "{{ matrix_mautrix_telegram_docker_image }}" @@ -73,9 +98,14 @@ build: dockerfile: Dockerfile path: "{{ matrix_mautrix_telegram_docker_src_files_path }}" - pull: yes + pull: "{{ not matrix_lottieconverter_container_self_build_mask_arch|bool }}" when: "matrix_mautrix_telegram_container_self_build|bool and matrix_mautrix_telegram_git_pull_results.changed" +# Unmask so no git changes are beeing detected +- name: Ensure TARGETARCH is beeing unmasked + command: sed -i "3s/#ARG/ARG/" "{{ matrix_mautrix_telegram_docker_src_files_path }}/Dockerfile" + when: "matrix_lottieconverter_container_self_build_mask_arch|bool" + - name: Check if an old database file already exists stat: path: "{{ matrix_mautrix_telegram_base_path }}/mautrix-telegram.db" From 3a2810013146adf4e4d96f28b62ef7d3ca860e79 Mon Sep 17 00:00:00 2001 From: Toorero Date: Sat, 17 Jul 2021 14:05:13 +0200 Subject: [PATCH 17/26] Renamed matrix_lottieconverter to matrix_telegram_lottieconverter --- group_vars/matrix_servers | 4 ++-- .../defaults/main.yml | 10 ++++---- .../tasks/setup_install.yml | 24 +++++++++---------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index e1675b51b..4e9431f05 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -393,8 +393,8 @@ matrix_mautrix_telegram_enabled: false # Images are multi-arch (amd64 and arm64, but not arm32). matrix_mautrix_telegram_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" -matrix_lottieconverter_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" -matrix_lottieconverter_container_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}" +matrix_telegram_lottieconverter_container_self_build: "{{ matrix_architecture not in ['arm64', 'amd64'] }}" +matrix_telegram_lottieconverter_container_self_build_mask_arch: "{{ matrix_architecture != 'amd64' }}" matrix_mautrix_telegram_systemd_required_services_list: | {{ diff --git a/roles/matrix-bridge-mautrix-telegram/defaults/main.yml b/roles/matrix-bridge-mautrix-telegram/defaults/main.yml index 934403bba..e49de8e32 100644 --- a/roles/matrix-bridge-mautrix-telegram/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-telegram/defaults/main.yml @@ -3,11 +3,11 @@ matrix_mautrix_telegram_enabled: true -matrix_lottieconverter_container_self_build: false -matrix_lottieconverter_container_self_build_mask_arch: false -matrix_lottieconverter_docker_repo: "https://mau.dev/tulir/lottieconverter.git" -matrix_lottieconverter_docker_src_files_path: "{{ matrix_base_data_path }}/lotticonverter/docker-src" -matrix_lottieconverter_docker_image: "dock.mau.dev/tulir/lottieconverter:alpine-3.14" # needs to be ajusted according to FROM clause of Dockerfile of mautrix-telegram +matrix_telegram_lottieconverter_container_self_build: false +matrix_telegram_lottieconverter_container_self_build_mask_arch: false +matrix_telegram_lottieconverter_docker_repo: "https://mau.dev/tulir/lottieconverter.git" +matrix_telegram_lottieconverter_docker_src_files_path: "{{ matrix_base_data_path }}/lotticonverter/docker-src" +matrix_telegram_lottieconverter_docker_image: "dock.mau.dev/tulir/lottieconverter:alpine-3.14" # needs to be ajusted according to FROM clause of Dockerfile of mautrix-telegram matrix_mautrix_telegram_container_self_build: false matrix_mautrix_telegram_docker_repo: "https://mau.dev/tulir/mautrix-telegram.git" diff --git a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml index 67ab4fe88..8c86a7504 100644 --- a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml @@ -58,23 +58,23 @@ - name: Ensure lottieconverter is present when self-building git: - repo: "{{ matrix_lottieconverter_docker_repo }}" - dest: "{{ matrix_lottieconverter_docker_src_files_path }}" + repo: "{{ matrix_telegram_lottieconverter_docker_repo }}" + dest: "{{ matrix_telegram_lottieconverter_docker_src_files_path }}" force: "yes" - register: matrix_lottieconverter_git_pull_results - when: "matrix_lottieconverter_container_self_build|bool and matrix_mautrix_telegram_container_self_build|bool" + register: matrix_telegram_lottieconverter_git_pull_results + when: "matrix_telegram_lottieconverter_container_self_build|bool and matrix_mautrix_telegram_container_self_build|bool" - name: Ensure lottieconverter Docker image is built docker_image: - name: "{{ matrix_lottieconverter_docker_image }}" + name: "{{ matrix_telegram_lottieconverter_docker_image }}" source: build - force_source: "{{ matrix_lottieconverter_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" - force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_lottieconverter_git_pull_results.changed }}" + force_source: "{{ matrix_telegram_lottieconverter_git_pull_results.changed if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" + force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_telegram_lottieconverter_git_pull_results.changed }}" build: dockerfile: Dockerfile - path: "{{ matrix_lottieconverter_docker_src_files_path }}" + path: "{{ matrix_telegram_lottieconverter_docker_src_files_path }}" pull: yes - when: "matrix_lottieconverter_container_self_build|bool and matrix_lottieconverter_git_pull_results.changed and matrix_mautrix_telegram_container_self_build|bool" + when: "matrix_telegram_lottieconverter_container_self_build|bool and matrix_telegram_lottieconverter_git_pull_results.changed and matrix_mautrix_telegram_container_self_build|bool" - name: Ensure matrix-mautrix-telegram repository is present when self-building git: @@ -87,7 +87,7 @@ - name: Ensure TARGETARCH is beeing masked command: sed -i "3s/ARG/#ARG/" "{{ matrix_mautrix_telegram_docker_src_files_path }}/Dockerfile" - when: "matrix_lottieconverter_container_self_build_mask_arch|bool" + when: "matrix_telegram_lottieconverter_container_self_build_mask_arch|bool" - name: Ensure matrix-mautrix-telegram Docker image is built docker_image: @@ -98,13 +98,13 @@ build: dockerfile: Dockerfile path: "{{ matrix_mautrix_telegram_docker_src_files_path }}" - pull: "{{ not matrix_lottieconverter_container_self_build_mask_arch|bool }}" + pull: "{{ not matrix_telegram_lottieconverter_container_self_build_mask_arch|bool }}" when: "matrix_mautrix_telegram_container_self_build|bool and matrix_mautrix_telegram_git_pull_results.changed" # Unmask so no git changes are beeing detected - name: Ensure TARGETARCH is beeing unmasked command: sed -i "3s/#ARG/ARG/" "{{ matrix_mautrix_telegram_docker_src_files_path }}/Dockerfile" - when: "matrix_lottieconverter_container_self_build_mask_arch|bool" + when: "matrix_telegram_lottieconverter_container_self_build_mask_arch|bool" - name: Check if an old database file already exists stat: From b3793f359533e073b0ee6054ad96ab9e61c64399 Mon Sep 17 00:00:00 2001 From: Toorero Date: Sat, 17 Jul 2021 14:40:21 +0200 Subject: [PATCH 18/26] Masked TARGETARCH via docker.build.arg directive --- .../tasks/setup_install.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml index 8c86a7504..fe4ede3d9 100644 --- a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml @@ -85,10 +85,6 @@ when: "matrix_mautrix_telegram_container_self_build|bool" ignore_errors: yes -- name: Ensure TARGETARCH is beeing masked - command: sed -i "3s/ARG/#ARG/" "{{ matrix_mautrix_telegram_docker_src_files_path }}/Dockerfile" - when: "matrix_telegram_lottieconverter_container_self_build_mask_arch|bool" - - name: Ensure matrix-mautrix-telegram Docker image is built docker_image: name: "{{ matrix_mautrix_telegram_docker_image }}" @@ -99,13 +95,10 @@ dockerfile: Dockerfile path: "{{ matrix_mautrix_telegram_docker_src_files_path }}" pull: "{{ not matrix_telegram_lottieconverter_container_self_build_mask_arch|bool }}" + args: + TARGETARCH: "" when: "matrix_mautrix_telegram_container_self_build|bool and matrix_mautrix_telegram_git_pull_results.changed" -# Unmask so no git changes are beeing detected -- name: Ensure TARGETARCH is beeing unmasked - command: sed -i "3s/#ARG/ARG/" "{{ matrix_mautrix_telegram_docker_src_files_path }}/Dockerfile" - when: "matrix_telegram_lottieconverter_container_self_build_mask_arch|bool" - - name: Check if an old database file already exists stat: path: "{{ matrix_mautrix_telegram_base_path }}/mautrix-telegram.db" From 8b304445e58fff78dd83740b0e22b92f6cad416a Mon Sep 17 00:00:00 2001 From: sakkiii Date: Mon, 19 Jul 2021 23:31:39 +0530 Subject: [PATCH 19/26] Upgrade hydrogen (v0.2.0 -> v0.2.3) --- roles/matrix-client-hydrogen/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-client-hydrogen/defaults/main.yml b/roles/matrix-client-hydrogen/defaults/main.yml index fa2e38fd7..e4adb8c05 100644 --- a/roles/matrix-client-hydrogen/defaults/main.yml +++ b/roles/matrix-client-hydrogen/defaults/main.yml @@ -5,7 +5,7 @@ matrix_client_hydrogen_enabled: true matrix_client_hydrogen_container_image_self_build: true matrix_client_hydrogen_container_image_self_build_repo: "https://github.com/vector-im/hydrogen-web.git" -matrix_client_hydrogen_version: v0.2.0 +matrix_client_hydrogen_version: v0.2.3 matrix_client_hydrogen_docker_image: "{{ matrix_client_hydrogen_docker_image_name_prefix }}vectorim/hydrogen-web:{{ matrix_client_hydrogen_version }}" matrix_client_hydrogen_docker_image_name_prefix: "{{ 'localhost/' if matrix_client_hydrogen_container_image_self_build }}" matrix_client_hydrogen_docker_image_force_pull: "{{ matrix_client_hydrogen_docker_image.endswith(':latest') }}" From a8373d6bd4fd4be9ea9da9067b52566498706254 Mon Sep 17 00:00:00 2001 From: Richard Meyer Date: Mon, 19 Jul 2021 19:02:29 -0500 Subject: [PATCH 20/26] Update main.yml Fixes an issue related to https://github.com/anoadragon453/matrix-reminder-bot/issues/86 --- roles/matrix-bot-matrix-reminder-bot/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-bot-matrix-reminder-bot/defaults/main.yml b/roles/matrix-bot-matrix-reminder-bot/defaults/main.yml index 775dadcc0..6a5a837eb 100644 --- a/roles/matrix-bot-matrix-reminder-bot/defaults/main.yml +++ b/roles/matrix-bot-matrix-reminder-bot/defaults/main.yml @@ -2,7 +2,7 @@ # See: https://github.com/anoadragon453/matrix-reminder-bot matrix_bot_matrix_reminder_bot_enabled: true -matrix_bot_matrix_reminder_bot_version: release-v0.2.0 +matrix_bot_matrix_reminder_bot_version: release-v0.2.1 matrix_bot_matrix_reminder_bot_docker_image: "{{ matrix_container_global_registry_prefix }}anoa/matrix-reminder-bot:{{ matrix_bot_matrix_reminder_bot_version }}" matrix_bot_matrix_reminder_bot_docker_image_force_pull: "{{ matrix_bot_matrix_reminder_bot_docker_image.endswith(':latest') }}" From 9345d840bee8b5d9a8f0c0762d87b51cfae23878 Mon Sep 17 00:00:00 2001 From: JokerGermany <30293477+JokerGermany@users.noreply.github.com> Date: Tue, 20 Jul 2021 07:48:11 +0200 Subject: [PATCH 21/26] root path for the base domain is wrong (#1189) * root path for the base domain * Fix path when running in a container Co-authored-by: Slavi Pantaleev --- .../templates/nginx/conf.d/matrix-base-domain.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-base-domain.conf.j2 b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-base-domain.conf.j2 index 37863d738..fc567aa3e 100644 --- a/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-base-domain.conf.j2 +++ b/roles/matrix-nginx-proxy/templates/nginx/conf.d/matrix-base-domain.conf.j2 @@ -1,7 +1,7 @@ #jinja2: lstrip_blocks: "True" {% macro render_vhost_directives() %} - root /nginx-data/matrix-domain; + root {{ matrix_nginx_proxy_data_path_in_container if matrix_nginx_proxy_enabled else matrix_nginx_proxy_data_path }}/matrix-domain; gzip on; gzip_types text/plain application/json; From fb221c81793607228a6c420d592b2e3bf0bf23e6 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 20 Jul 2021 09:05:13 +0300 Subject: [PATCH 22/26] Do not needlessly ignore errors --- roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml index fe4ede3d9..e2e583f23 100644 --- a/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-telegram/tasks/setup_install.yml @@ -83,7 +83,6 @@ force: "yes" register: matrix_mautrix_telegram_git_pull_results when: "matrix_mautrix_telegram_container_self_build|bool" - ignore_errors: yes - name: Ensure matrix-mautrix-telegram Docker image is built docker_image: From d08a78ff1f2aa3361304ce8d1208c2af93a6f56a Mon Sep 17 00:00:00 2001 From: sakkiii Date: Tue, 20 Jul 2021 12:09:11 +0530 Subject: [PATCH 23/26] remove prosody JICOFO_COMPONENT_SECRET --- roles/matrix-jitsi/templates/prosody/env.j2 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/matrix-jitsi/templates/prosody/env.j2 b/roles/matrix-jitsi/templates/prosody/env.j2 index e733e668a..3a91463e6 100644 --- a/roles/matrix-jitsi/templates/prosody/env.j2 +++ b/roles/matrix-jitsi/templates/prosody/env.j2 @@ -28,7 +28,6 @@ XMPP_MUC_MODULES= XMPP_INTERNAL_MUC_MODULES= XMPP_RECORDER_DOMAIN={{ matrix_jitsi_recorder_domain }} XMPP_CROSS_DOMAIN=true -JICOFO_COMPONENT_SECRET JICOFO_AUTH_USER={{ matrix_jitsi_jicofo_auth_user }} JICOFO_AUTH_PASSWORD={{ matrix_jitsi_jicofo_auth_password }} JVB_AUTH_USER={{ matrix_jitsi_jvb_auth_user }} @@ -49,4 +48,4 @@ JWT_AUTH_TYPE JWT_TOKEN_AUTH_MODULE LOG_LEVEL PUBLIC_URL={{ matrix_jitsi_web_public_url }} -TZ={{ matrix_jitsi_timezone }} \ No newline at end of file +TZ={{ matrix_jitsi_timezone }} From ead4b00c095036664f4bfa2178ad1f4a81fdd926 Mon Sep 17 00:00:00 2001 From: Toorero Date: Wed, 21 Jul 2021 14:05:21 +0200 Subject: [PATCH 24/26] Reverted back to manual self-build detection --- group_vars/matrix_servers | 3 ++- roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/group_vars/matrix_servers b/group_vars/matrix_servers index 43e4007fb..fc85cae20 100755 --- a/group_vars/matrix_servers +++ b/group_vars/matrix_servers @@ -374,7 +374,8 @@ matrix_mautrix_signal_login_shared_secret: "{{ matrix_synapse_ext_password_provi matrix_mautrix_signal_database_engine: 'postgres' matrix_mautrix_signal_database_password: "{{ matrix_synapse_macaroon_secret_key | password_hash('sha512', 'mau.signal.db') | to_uuid }}" -matrix_mautrix_signal_daemon_container_self_build: "{{ matrix_architecture != 'amd64' }}" # sadly not automatic detectable because no manifest +matrix_mautrix_signal_container_self_build: "{{ matrix_architecture not in ['amd64', 'arm64'] }}" +matrix_mautrix_signal_daemon_container_self_build: "{{ matrix_architecture != 'amd64' }}" ###################################################################### # diff --git a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml index c890b706f..948a84b73 100644 --- a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml @@ -14,11 +14,8 @@ source: "{{ 'pull' if ansible_version.major > 2 or ansible_version.minor > 7 else omit }}" force_source: "{{ matrix_mautrix_signal_docker_image_force_pull if ansible_version.major > 2 or ansible_version.minor >= 8 else omit }}" force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_signal_docker_image_force_pull }}" -# pull: -# platform: "{{ matrix_architecture }}" when: "matrix_mautrix_signal_enabled|bool and not matrix_mautrix_signal_container_self_build|bool" - register: matrix_mautrix_signal_pull_results - ignore_errors: yes + - name: Ensure Mautrix Signal repository is present on self-build git: @@ -26,7 +23,7 @@ dest: "{{ matrix_mautrix_signal_docker_src_files_path }}" force: "yes" register: matrix_mautrix_signal_git_pull_results - when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_container_self_build|bool or matrix_mautrix_signal_pull_results is failed)" + when: "matrix_mautrix_signal_enabled|bool and matrix_mautrix_signal_container_self_build|bool" - name: Ensure Mautrix Signal image is built docker_image: From a21696f68783d861ecd95c9334125852a108a0de Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 21 Jul 2021 15:16:14 +0300 Subject: [PATCH 25/26] Fix some if-checks We'd rather not suppress pull errors or run self-build tasks if pulling fails. --- roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml index 948a84b73..f590cdf8b 100644 --- a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml @@ -46,7 +46,6 @@ force: "{{ omit if ansible_version.major > 2 or ansible_version.minor >= 8 else matrix_mautrix_signal_daemon_docker_image_force_pull }}" when: matrix_mautrix_signal_enabled and not matrix_mautrix_signal_daemon_container_self_build|bool register: matrix_mautrix_signal_daemon_pull_results - ignore_errors: yes - name: Ensure Mautrix Signal Daemon repository is present on self-build git: @@ -54,7 +53,7 @@ dest: "{{ matrix_mautrix_signal_daemon_docker_src_files_path }}" force: "yes" register: matrix_mautrix_signal_daemon_git_pull_results - when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_daemon_container_self_build|bool or matrix_mautrix_signal_daemon_pull_results is failed)" + when: "matrix_mautrix_signal_enabled|bool and matrix_mautrix_signal_daemon_container_self_build|bool" - name: Ensure Mautrix Signal Daemon image is built docker_image: @@ -66,7 +65,7 @@ dockerfile: Dockerfile path: "{{ matrix_mautrix_signal_daemon_docker_src_files_path }}" pull: yes - when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_daemon_container_self_build|bool or matrix_mautrix_signal_daemon_pull_results is failed)" + when: "matrix_mautrix_signal_enabled|bool and matrix_mautrix_signal_daemon_container_self_build|bool" - name: Ensure Mautrix Signal paths exist file: From 7d9ee3e2fb3dc3304fbfd6e969f89084d78509cd Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 21 Jul 2021 15:17:17 +0300 Subject: [PATCH 26/26] Remove unnecessary if-condition --- roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml index f590cdf8b..551092576 100644 --- a/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml +++ b/roles/matrix-bridge-mautrix-signal/tasks/setup_install.yml @@ -35,7 +35,7 @@ dockerfile: Dockerfile path: "{{ matrix_mautrix_signal_docker_src_files_path }}" pull: yes - when: "matrix_mautrix_signal_enabled|bool and (matrix_mautrix_signal_container_self_build|bool or matrix_mautrix_signal_pull_results is failed)" + when: "matrix_mautrix_signal_enabled|bool and matrix_mautrix_signal_container_self_build|bool" - name: Ensure Mautrix Signal Daemon image is pulled