knb:meet-server

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
knb:meet-server [2020/03/21 10:10] – angelegt awickertknb:meet-server [2020/09/02 07:46] (aktuell) Django
Zeile 1: Zeile 1:
-====== Freifunk München Jitsi Server Setup ======+~~NOTOC~~ 
 +/* *** Titelbalken *** */ 
 +<WRAP center box 100%> 
 +<fs xx-large><fc #de2c68> Freifunk München Jitsi Server Setup - meet.ffmuc.net</fc></fs> 
 +{{ :ffmuc_logo.png?nolink&125|Bild: Freifunk München Logo}} 
 +</WRAP>https://ffmuc.net/wiki/doku.php?id=knb:meet-server&do= 
  
 ==== Brief overview ==== ==== Brief overview ====
 The setup consists of multiple Jitsi videobridges which can be added and removed on demand as well as one control server which does the loadbalancing decisions. The setup consists of multiple Jitsi videobridges which can be added and removed on demand as well as one control server which does the loadbalancing decisions.
  
-Each server has at least 2vCPUs4GB RAM and 10GB disc space. But the most important thing is bandwidth so a 1Gbit/s link is necessary for smooth operation.+Each server has at least 8vCPUs16GB RAM and 10GB disc space. But the most important thing is bandwidth so a 1Gbit/s link is necessary for smooth operation.  
 + 
 +The more CPUs you have the better, also you need good network hardware as you can expect many pps. 
 + 
 +<WRAP center round alert 60%> 
 +This page is outdated at the moment we don't use pubsub anymore but switched to MUC and do OCTO. 
 +</WRAP> 
 + 
 +We did some presentations about the setup you can find them at [[https://www.slideshare.net/AnnikaWickert|SlideShare]]. 
 + 
 +If you want to ask us questions join our [[https://chat.ffmuc.net/freifunk/channels/services-meet|chat]]!
  
 ===== Initial setup (control server) ===== ===== Initial setup (control server) =====
  
-We installed the first instance as described on https://jitsi.org/downloads and stopped the videobridge there, because the first server should only act as a control server.+We installed the first instance as described on https://jitsi.org/downloads and stopped the videobridge there, because the first server should only act as a control server. If you only host a single instance skip the step of disabling the videobridge. Just set the settings, restart and be done. 
 + 
 +Disable the videobridge: 
 +<code> 
 +# systemctl stop jitsi-videobridge.service 
 +# systemctl mask jitsi-videobridge.service 
 +</code> 
 + 
 +Disable unnecessary and broken features on the control server: 
 +/etc/jitsi/meet/meet.ffmuc.net-config.js 
 +<code> 
 +defaultLanguage: 'de', 
 +disableThirdPartyRequests: true, 
 +p2p: { enabled: false }, 
 +enableLipSync: false 
 +</code> 
 + 
 + 
 + 
 +==== Prosody Setup for loadbalancing (control server) ==== 
 + 
 +<WRAP center round important 60%> 
 +Most important thing is to get hostnames and DNS settings correct for each instance, otherwise your setup will fail. 
 +</WRAP> 
 + 
 + 
 +Jitsi instances balance based on metrics published by the videobridges to jicofo. To allow the videobridges to publish those metrics we need to change some settings in the prosody settings. 
 + 
 +In the Admin section you need to add all the bridges. 
 +/etc/prosody/prosody.cfg.lua 
 +<code> 
 +admins = { 
 +        "jvb1.meet.ffmuc.net", 
 +        "jvb2.meet.ffmuc.net", 
 +        "jvb3.meet.ffmuc.net" 
 +
 +</code> 
 + 
 +As we want to scale beyond 1024 connections we also switch to epoll in prosody.cfg.lua. 
 +<code> 
 +-- for better scaling 
 +-- https://prosody.im/doc/network_backend 
 +network_backend = "epoll" 
 +</code> 
 + 
 +And as we want external videobridges we need to listen on the external interface and not just localhost: 
 +<code> 
 +component_interface = "0.0.0.0"; 
 +</code> 
 + 
 +And you also need to assign a component to each videobridge in your site config. 
 +/etc/prosody/conf.d/meet.ffmuc.net.cfg.lua 
 +<code> 
 +Component "jvb1.meet.ffmuc.net" 
 +    component_secret = "pass" 
 +Component "jvb2.meet.ffmuc.net" 
 +    component_secret = "pass" 
 +Component "jvb3.meet.ffmuc.net" 
 +    component_secret = "pass" 
 +</code> 
 + 
 +==== Videobridges for loadbalancing ==== 
 + 
 +On those servers **only** the ''jitsi-videobridge'' needs to be installed. There is no need for any other jitsi component. 
 + 
 +<WRAP center round important 60%> 
 +Again watch your DNS and hostname setup! 
 +</WRAP> 
 + 
 +First you need to change ''/etc/jitsi/videobridge/config'' to fit your install. 
 + 
 +<WRAP center round tip 60%> 
 +Settings may vary on other systems than Debian Buster 
 +</WRAP> 
 + 
 +<WRAP center round tip 60%> 
 +The "subdomain" setting has to match first part of your hostname in this example the hostname is ''jvb1.meet.ffmuc.net''
 + 
 +We also enable statistics for later polling via Telegraf (--apis). 
 +</WRAP> 
 + 
 +<code> 
 +# Jitsi Videobridge settings 
 + 
 +# sets the XMPP domain (default: none) 
 +JVB_HOSTNAME=meet.ffmuc.net 
 + 
 +# sets the hostname of the XMPP server (default: domain if set, localhost otherwise) 
 +JVB_HOST=meet.ffmuc.net 
 + 
 +# sets the port of the XMPP server (default: 5275) 
 +JVB_PORT=5347 
 + 
 +# sets the shared secret used to authenticate to the XMPP server 
 +JVB_SECRET=pass 
 + 
 +# extra options to pass to the JVB daemon 
 +JVB_OPTS="--subdomain=jvb1 --apis=rest,xmpp" 
 + 
 + 
 +# adds java system props that are passed to jvb (default are for home and logging config file) 
 +JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=videobridge -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi -Djava.util.logging.config.file=/etc/jitsi/videobridge/logging.properties --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED" 
 +</code> 
 + 
 +Then we need to adjust the sip-communicator settings: 
 + 
 +<WRAP center round tip 60%> 
 +This is also important because we enable the stats on the videobridge here. If not activated there will be no loadbalancing decisions. 
 +</WRAP> 
 + 
 +/etc/jitsi/videobridge/sip-communicator.properties 
 +<code> 
 +org.jitsi.videobridge.AUTHORIZED_SOURCE_REGEXP=focus@auth.meet.ffmuc.net/.* 
 +org.jitsi.videobridge.ENABLE_STATISTICS=true 
 +org.jitsi.videobridge.STATISTICS_INTERVAL=1000 
 +org.jitsi.videobridge.STATISTICS_TRANSPORT=muc,colibri,pubsub 
 +org.jitsi.videobridge.PUBSUB_SERVICE=meet.ffmuc.net 
 +org.jitsi.videobridge.PUBSUB_NODE=sharedStatsNode 
 +</code> 
 + 
 +===== Bonus: Monitoring ===== 
 + 
 +We use telegraf to poll the statistics of the videobridges. We just use the exec section of Telegraf, to get the data. 
 + 
 +Example: [[https://stats.ffmuc.net/d/U6sKqPuZz/meet-stats?orgId=1&refresh=1m|Our grafana dashboard]] 
 + 
 +/etc/telegraf/telegraf.conf  
 +<code> 
 +[[inputs.exec]] 
 +   commands = [ 
 +     "curl localhost:8080/colibri/stats", 
 +   ] 
 +   name_suffix = "_meet" 
 +   data_format = "json" 
 +</code> 
 + 
 +===== Hint for smooth operation ===== 
 + 
 +<WRAP center round tip 60%> 
 +Use Chrome or it's derivates as client. The Mobile and Desktop Apps of jitsi-meet work as well.
  
 +Avoid using Firefox! It causes problems for the Firefox-user but as well the other parties which do not use Firefox.
 +</WRAP>
  
  • knb/meet-server.txt
  • Zuletzt geändert: 2020/09/02 07:46
  • von Django