udelarinterior.jitsi_meet

jitsi-meet

Galaxy GitHub tag (latest by date) GitHub stars GitHub forks

安装和配置[ Jitsi Meet ]视频会议软件。

要求

您需要将 DNS 指向服务器,并且需要 SSL 密钥。如果您还没有该域的 SSL 密钥,可以考虑使用 geerlingguy.certbot Ansible 角色从 LetsEncrypt 获取(免费的!)SSL 证书。

您还需要开放 TCP 443 端口和 UDP 10000 端口,以使 Jitsi Meet 组件正常工作。此角色可以使用 ufw 来允许这些端口,通过设置 jitsi_meet_configure_firewall: true。如果您使用其他主机防火墙解决方案,如 iptables,请将 jitsi_meet_configure_firewall 设置为 false。如果您使用 AWS 或类似服务,您需要在相关的安全组中开放这些端口。

角色变量

########################################
###### 最重要的变量 ###################
# 并且需要根据您的情况进行调整 #####
########################################

# 在没有 SSL 的情况下,"localhost" 是正确的默认值。如果提供了 SSL 信息,
# 那么我们需要一个真实的域名。使用 Ansible 推断的 FQDN,但如果您使用较短的主机名,
# 也可以显式设置变量值。如果自动的 Nginx 配置被禁用,也要使用 FQDN,
# 因为可能会有其他角色来管理虚拟主机配置。
jitsi_meet_server_name: "{{ ansible_fqdn | default('localhost') }}"

# 官方文档说明:
# 安装程序将检查是否存在 Nginx 或 Apache(按此顺序),并配置找到的 web 服务器中的
# 虚拟主机以提供 Jitsi Meet。如果没有找到上述内容,它默认使用 Nginx。如果您
# 已经在同一台机器上的 443 端口上运行 Nginx,最好跳过 turnserver 配置,
# 这将与当前的 443 端口冲突,因此使用命令 apt install --no-install-recommends jitsi-meet
jitsi_meet_install_recommends: yes

# 如果(jitsi_meet_install_recommends == no),则不会安装和可用 turnserver
jitsi_meet_use_stun_turn: false

# 将在点对点连接中使用的 STUN 服务器
jitsi_meet_stun_servers:
  - 'meet-jit-si-turnrelay.jitsi.net:443'
  # - '{{ jitsi_meet_server_name }}:443'

# 启用 p2p 模式
jitsi_meet_enable_p2p_mode: true

# 配置 nginx 和 jitsi-meet 以同时监听 IPv6
jitsi_meet_ipv6_enable: true

# 允许您通过创建和配置自签名 HTTPS 证书来指定 jitsi meet 的安装,
# 然后可以用 Let's Encrypt 证书替换它们
jitsi_meet_cert_choice: "生成新的自签名证书(您稍后有机会获取 Let's encrypt 证书)"
# 由于 Jitsi 安装程序脚本的行为,即使您计划使用自己的生成证书(例如使用 certbot),
# 也建议保持此值。您可以从此角色实现

# 不在这里设置它们,因为自定义证书的空字符串将导致自定义 Nginx 配置任务被跳过。
jitsi_meet_ssl_cert_path: ''
jitsi_meet_ssl_key_path: ''

#############
### NGINX ###
# 该角色将自动为 jitsi-meet 配置 nginx 虚拟主机。
# 如果您希望通过单独的角色管理 web 虚拟主机,请将此设置为 false。
jitsi_meet_configure_nginx: true

# 如果您愿意,可以使用自己的 jitsi_meet_nginx.conf.j2 模板并指定位于其他路径
jitsi_meet_nginx_config_template:  "jitsi_meet_nginx.conf.j2"


###########################################
# 其他有用的变量以自定义安装,但使用频率较低 #
###########################################

# Debian 包安装 jitsi-meet 将为组件生成密钥。
# 该角色将读取配置文件并保留密钥,即使在模板过程中。
# 如果您希望生成自己的密钥并使用它们,请覆盖这些变量,但请确保安全存储密钥,
# 例如使用 ansible-vault 或 credstash。
jitsi_meet_videobridge_secret: ''
jitsi_meet_jicofo_secret: ''
jitsi_meet_jicofo_password: ''

##################
### APT 相关 ###
# 在 jitsi meet 之前需要安装的包列表
jitsi_meet_base_packages:
  - apt-transport-https
  - debconf
  - debconf-utils

# 是否使用 Jitsi Meet 组件的夜间版本。
jitsi_meet_use_nightly_apt_repo: false

jitsi_meet_apt_repos:
  stable:
    repo_url: 'deb https://download.jitsi.org/ stable/'
  unstable:
    repo_url: 'deb https://download.jitsi.org unstable/'

jitsi_meet_apt_key_url: 'https://download.jitsi.org/jitsi-key.gpg.key'
jitsi_meet_apt_key_id: '66A9CD0595D6AFA247290D3BEF8B479E2DC1389C'

# 这些 debconf 设置表示在安装 jitsi-meet deb 包期间对交互提示的回答
# 如果您使用自定义 SSL 证书,则可能需要设置更多选项。
jitsi_meet_debconf_settings:
  - name: jitsi-meet
    question: jitsi-meet/jvb-serve
    value: "false"
    vtype: boolean
  - name: jitsi-meet-prosody
    question: jitsi-meet-prosody/jvb-hostname
    value: "{{ jitsi_meet_server_name }}"
    vtype: string
  - name: jitsi-videobridge
    question: jitsi-videobridge/jvb-hostname
    value: "{{ jitsi_meet_server_name }}"
    vtype: string
  - name: jitsi-meet-web-config
    question: jitsi-meet/cert-choice
    value: "{{ jitsi_meet_cert_choice }}"
    vtype: select
  - name: jitsi-meet-web-config
    question: jitsi-meet/cert-path-key
    value: "{{ jitsi_meet_ssl_key_path }}"
    vtype: string
  - name: jitsi-meet-web-config
    question: jitsi-meet/cert-path-crt
    value: "{{ jitsi_meet_ssl_cert_path }}"
    vtype: string


#######################
### 服务器防火墙 ###
# 此角色可以通过将此变量设置为 true 自动安装和配置 ufw,以开放 jitsi-meet 端口。
# 如果您以其他方式管理防火墙,请保持为 false,ufw 任务将被跳过。
jitsi_meet_configure_firewall: false

# 警告:在此角色 v2.0.0 版本之前,SSH 端口(22/tcp)也被启用。
# 此角色专注于配置 Jitsi Meet,因此为避免与您其他角色/剧本重叠,
# 默认值将仅为 Jitsi 所需的端口
jitsi_meet_firewall_ports_allow:
  tcp:
    # - "22" # SSH
    - "80"   # HTTP / Lets Encrypt
    - "443"  # HTTPS
  udp:
    - "10000" # Videobridge

### 其他防火墙
# 这将配置 NAT 连接到 Jitsi Meet
jitsi_meet_behind_nat_firewall: false
jitsi_meet_nat_private_ip: 127.0.0.1
jitsi_meet_nat_public_ip: 255.255.255.255


##############
### Jicofo ###
# 默认认证信息,用于多个服务模板。
jitsi_meet_jicofo_user: focus
jitsi_meet_jicofo_port: 5347
# Jitsi 组件使用标准的 Java 日志级别,见:
# https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html
# 当使用日志聚合 Jitsi Meet 组件时,请设置为 "WARNING"。
jitsi_meet_jicofo_loglevel: INFO

# 如果您愿意,可以使用自己的 jinja 配置模板并指定位于其他路径
jitsi_meet_jicofo_config_template: jicofo_config.j2
jitsi_meet_jicofo_sip_template: jicofo_sip-communicator.properties.j2


###################
### Videobridge ###
# 默认配置文件位于 /etc/jitsi/videobridge/config,声称默认端口
# 对于 JVB 是 "5275",但手动安装指南引用 "5347"。
# https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md
jitsi_meet_videobridge_port: 5347
jitsi_meet_videobridge_loglevel: INFO
jitsi_meet_videobridge_opts: '--apis=,'            # 逗号分隔列表 '--apis=rest,'

jitsi_meet_videobridge_statistics_enable: true
jitsi_meet_videobridge_statistics_interval: 1000
jitsi_meet_videobridge_statistics_transport: 'muc' # 逗号分隔列表: 'muc,colibri,xmpp'

# 配置反向代理以通过 HTTPS 发布 colibri/stats
# https://{{ jitsi_meet_server_name }}/colibri/stats
# 您还应在 jitsi_meet_videobridge_opts 中启用 'rest',
# 并在 jitsi_meet_videobridge_statistics_transport 中启用 'colibri,xmpp'
jitsi_meet_expose_colibri_stats: false

# (字典类型) 启用 MUC(多用户聊天)模式的其他服务器凭据。
# https://github.com/jitsi/jitsi-videobridge/blob/master/doc/muc.md#legacy-videobridge-configuration
jitsi_meet_videobridge_other_xmpp_servers: {}
  # xmppserver1:
  #   hostname: example.net
  #   domain: auth.example.net
  #   username: jvb
  #   password: $PASSWORD
  #   muc_jids: [email protected]
  #   muc: [email protected]
  #   muc_nickname: unique-instance-id
  #   # disable_certificate_verification: true

# 如果您愿意,可以使用自己的 jinja 配置模板并指定位于其他路径
jitsi_meet_videobridge_config_template:  videobridge_config.j2
jitsi_meet_videobridge_sip_template: videobridge_sip-communicator.properties.j2

############
### Meet ###
# "anonymous" 允许任何人使用视频会议服务器。
jitsi_meet_authentication: anonymous

# 注重隐私的补充,请详细参见:
# https://github.com/jitsi/jitsi-meet/issues/422
# https://github.com/jitsi/jitsi-meet/pull/427
jitsi_meet_enable_third_party_requests: true

# Chrome 的屏幕共享配置。您需要为您的域构建和打包一个浏览器扩展;
# 见 https://github.com/jitsi/jidesha
jitsi_meet_desktop_sharing_chrome_method: 'ext'
jitsi_meet_enable_desktop_sharing_chrome: true
jitsi_meet_desktop_sharing_chrome_ext_id: 'diibjkoicjeejcmhdnailmkgecihlobk'

# 本地扩展的路径,用于复制到目标主机。远程文件名
# 将是此处提供路径的基本名称。
jitsi_meet_desktop_sharing_chrome_extension_filename: ''

# Firefox 的屏幕共享配置。如果要在 Firefox 下使用屏幕共享,max_version 设置为 '42',disabled 设置为 'false'
jitsi_meet_desktop_sharing_firefox_ext_id: 'null'
jitsi_meet_enable_desktop_sharing_firefox: true
jitsi_meet_desktop_sharing_firefox_max_version_ext_required: '-1'

jitsi_meet_channel_last_n: -1
jitsi_meet_enable_layer_suspension: false
jitsi_meet_start_audio_only: false
jitsi_meet_show_audio_levels: false
jitsi_meet_audio_levels_interval: 200

jitsi_meet_resolution: 480
jitsi_meet_constraints_video_aspect_ratio: "16 / 9"
jitsi_meet_constraints_video_height_ideal: "{{ jitsi_meet_resolution }}"
jitsi_meet_constraints_video_height_max: 720
jitsi_meet_constraints_video_height_min: 240

# 如果您愿意,可以使用自己的 jinja 配置模板并指定位于其他路径
jitsi_meet_config_js_template: jitsi_meet_config.js.j2
jitsi_meet_interface_config_js_template: interface_config.js.j2

###################
### SIP 网关 ###
jitsi_meet_configure_sip_gateway: false
jitsi_meet_jigasi_account: [email protected]
jitsi_meet_jigasi_password: fdi49fndKjhe3

########################
### 用户界面自定义 ###
jitsi_meet_customize_the_ui: false

jitsi_meet_lang: 'en'
jitsi_meet_appname: '我的应用名称'
jitsi_meet_org_link: 'https://link-to-my-organization.com'
jitsi_meet_welcomepage_title: '安全、功能齐全、完全免费的在线视频会议'
jitsi_meet_welcomepage_description: '继续吧,和整个团队视频聊天。实际上,邀请您认识的每一个人。__app__ 是一个完全加密、100% 开源的视频会议解决方案,您可以全天候、无时无刻地免费使用——无需账户。'

# 默认是一个空字符串,因为 CSS 文件是整个网站的打包文件,
# 每次发布时都会频繁更改。只有在您有自定义 CSS 文件并在此变量中指明其路径时,
# 才会替换。
jitsi_meet_css_file: ''
jitsi_meet_welcome_page_additions_file: welcomePageAdditionalContent.html.j2
jitsi_meet_title_template: title.html.j2

jitsi_meet_favicon_file: images/favicon.ico
jitsi_meet_logo_file: images/jitsilogo.png
jitsi_meet_watermark_file: images/watermark.png

jitsi_meet_default_background: '#474747'
jitsi_meet_show_video_background: true
jitsi_meet_default_remote_display_name: 'Jitster 伙伴'
jitsi_meet_default_local_display_name: '我'
jitsi_meet_generate_roomnames_on_welcome_page: true
jitsi_meet_lang_detection: false    # 允许国际化检测系统语言

屏幕共享

Jitsi Meet 通过浏览器扩展支持屏幕共享功能。 只有共享屏幕的方需要安装扩展——会议中的其他参与者可以无需安装任何东西查看共享屏幕。 您需要为 Chrome 和/或 Firefox 构建自己的浏览器扩展。 有关详细的构建说明,请参见 Jidesha 文档。该角色仅已与自定义的 Chrome 扩展进行了测试。

Chrome 禁止从未获批准的网站安装扩展,因此您必须直接下载 .crx 文件,然后导航到 chrome://extensions 并拖放扩展进行安装。如果您希望为其他参与者提供屏幕共享支持,请通过 Jitsi Meet 文本聊天窗格与他们共享扩展的 URL。

依赖关系

这技术上不是依赖关系,但您应该查看 geerlingguy.certbot ,以获取极其简单的 SSL 证书。

示例剧本

提供一个如何使用您的角色的示例(例如,作为参数传入的变量)对于用户也是很有帮助的:

- name: 配置 jitsi-meet 服务器。
  hosts: jitsi
  vars:
    # 更改为与您主机 IP 的 DNS 条目匹配。
    jitsi_meet_server_name: meet.example.com
  roles:
    - role: geerlingguy.certbot
      become: yes
      certbot_create_if_missing: true
      certbot_admin_email: "webmaster@{{ jitsi_meet_server_name }}"
      certbot_certs:
        - domains:
            - "{{ jitsi_meet_server_name }}"
      certbot_create_standalone_stop_services: []

    - role: udelarinterior.jitsi_meet
      jitsi_meet_ssl_cert_path: "/etc/letsencrypt/live/{{ jitsi_meet_server_name }}/fullchain.pem"
      jitsi_meet_ssl_key_path: "/etc/letsencrypt/live/{{ jitsi_meet_server_name }}/privkey.pem"
      become: yes
      tags: jitsi

运行测试

该角色使用 MoleculeServerSpec 进行测试。使用方法:

pip install molecule
gem install serverspec
molecule test

您还可以运行选择性命令:

molecule idempotence
molecule verify

有关更多信息,请参见 Molecule 文档。

许可证

MIT

作者信息

新闻自由基金会UdelaR 内部@santiagomr

关于项目

Installs Jitsi Meet videoconferencing software

安装
ansible-galaxy install udelarinterior.jitsi_meet
许可证
Unknown
下载
3.5k
拥有者
Red Unidades Informáticas de la UdelaR en el Interior