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/14] stable-5963 --- roles/matrix-jitsi/templates/jicofo/env.j2 | 41 +++++-- roles/matrix-jitsi/templates/jvb/env.j2 | 31 +++--- roles/matrix-jitsi/templates/prosody/env.j2 | 33 +++--- roles/matrix-jitsi/templates/web/env.j2 | 116 ++++++++++++++------ 4 files changed, 149 insertions(+), 72 deletions(-) diff --git a/roles/matrix-jitsi/templates/jicofo/env.j2 b/roles/matrix-jitsi/templates/jicofo/env.j2 index a402d2d7..3de60282 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 }} - -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 }} +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 }} - -JVB_BREWERY_MUC={{ matrix_jitsi_jvb_brewery_muc }} - +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_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 f7dc9247..a927314e 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 38b2456c..74df951e 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 7b763a3c..35a1e7ff 100644 --- a/roles/matrix-jitsi/templates/web/env.j2 +++ b/roles/matrix-jitsi/templates/web/env.j2 @@ -1,42 +1,94 @@ +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 }} +TZ={{ matrix_jitsi_timezone }} +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_TRANSCRIPTIONS={{ 1 if matrix_jitsi_enable_transcriptions else 0 }} - +ENABLE_IPV6 +ENABLE_LIPSYNC +ENABLE_NO_AUDIO_DETECTION ENABLE_P2P={{ 1 if matrix_jitsi_enable_p2p else 0 }} - -DISABLE_HTTPS=1 - -JICOFO_AUTH_USER={{ matrix_jitsi_jicofo_auth_user }} - -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 }} - +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/14] 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 87d87706..436b0091 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 35a1e7ff..c4faa5ba 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/14] 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 00000000..b0dc8438 --- /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 00000000..6ecafaa0 --- /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 3de60282..92728215 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/14] 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 6ecafaa0..044b9e69 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/14] 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 92728215..df669dc6 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/14] 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 df669dc6..3764d056 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/14] 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 436b0091..c0c18fd7 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 1f7a2d1c..9dee6db0 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 e4f3508f..30b3dd04 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 00000000..c2791d9c --- /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/14] 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 c0c18fd7..9daa1716 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 b0dc8438..71862ca2 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/14] 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 53c0c83a..2785795d 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 4445e52b..5a4a81e5 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 6ae2074d..5d386361 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/14] 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 eacfa7d8..c48a0c2d 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 9daa1716..55e24d80 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 74df951e..e733e668 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/14] 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 cc8a4b22..d2887b12 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 7b2211da8e251721f101a9052dd5c43f9a598e46 Mon Sep 17 00:00:00 2001 From: sak Date: Thu, 1 Jul 2021 15:37:20 +0530 Subject: [PATCH 12/14] 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 00000000..3deaf28d --- /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 55e24d80..8c8d9156 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 9dee6db0..1f7a2d1c 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 30b3dd04..e4f3508f 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 c2791d9c..00000000 --- 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 71862ca2..00000000 --- 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 044b9e69..00000000 --- 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 13/14] 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 3deaf28d..00000000 --- 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 d08a78ff1f2aa3361304ce8d1208c2af93a6f56a Mon Sep 17 00:00:00 2001 From: sakkiii Date: Tue, 20 Jul 2021 12:09:11 +0530 Subject: [PATCH 14/14] 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 e733e668..3a91463e 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 }}