Browse Source

Document a scalable installation with multiple videobridges (#5783)

master
Jens-Christian Fischer 5 years ago
parent
commit
f2df5906f6
No account linked to committer's email address

+ 2
- 0
doc/README.md View File

41
 * [Enabling TURN](https://github.com/jitsi/jitsi-meet/blob/master/doc/turn.md)
41
 * [Enabling TURN](https://github.com/jitsi/jitsi-meet/blob/master/doc/turn.md)
42
 * [Networking FAQ](https://github.com/jitsi/jitsi-meet/blob/master/doc/faq.md)
42
 * [Networking FAQ](https://github.com/jitsi/jitsi-meet/blob/master/doc/faq.md)
43
 * [Cloud APIs](https://github.com/jitsi/jitsi-meet/blob/master/doc/cloud-api.md)
43
 * [Cloud APIs](https://github.com/jitsi/jitsi-meet/blob/master/doc/cloud-api.md)
44
+* [Manual Installation](https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md)
45
+* [Scalable Installation](https://github.com/jitsi/jitsi-meet/blob/master/doc/scalable-installation.md)

+ 27
- 0
doc/example-config-files/scalable/jicofo_config.scalable.example View File

1
+# Jitsi Conference Focus settings
2
+# sets the host name of the XMPP server
3
+JICOFO_HOST=localhost
4
+
5
+# sets the XMPP domain (default: none)
6
+JICOFO_HOSTNAME=meet.example.com
7
+
8
+# sets the secret used to authenticate as an XMPP component
9
+JICOFO_SECRET=$JICOFO_SECRET
10
+
11
+# sets the port to use for the XMPP component connection
12
+JICOFO_PORT=5347
13
+
14
+# sets the XMPP domain name to use for XMPP user logins
15
+JICOFO_AUTH_DOMAIN=auth.meet.example.com
16
+
17
+# sets the username to use for XMPP user logins
18
+JICOFO_AUTH_USER=focus
19
+
20
+# sets the password to use for XMPP user logins
21
+JICOFO_AUTH_PASSWORD=$JICOFO_PASSWORD
22
+
23
+# extra options to pass to the jicofo daemon
24
+JICOFO_OPTS=""
25
+
26
+# adds java system props that are passed to jicofo (default are for home and logging config file)
27
+JAVA_SYS_PROPS="-Dnet.java.sip.communicator.SC_HOME_DIR_LOCATION=/etc/jitsi -Dnet.java.sip.communicator.SC_HOME_DIR_NAME=jicofo -Dnet.java.sip.communicator.SC_LOG_DIR_LOCATION=/var/log/jitsi -Djava.util.logging.config.file=/etc/jitsi/jicofo/logging.properties"

+ 6
- 0
doc/example-config-files/scalable/jicofo_sip-communicator.properties.scalable.example View File

1
+
2
+org.jitsi.jicofo.BRIDGE_MUC=JvbBrewery@internal.auth.meet.example.com
3
+org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED=true
4
+
5
+org.jitsi.jicofo.jibri.BREWERY=JibriBrewery@internal.auth.meet.example.com
6
+org.jitsi.jicofo.jibri.PENDING_TIMEOUT=90

+ 88
- 0
doc/example-config-files/scalable/meet.example.com.cfg.lua.scalable.example View File

1
+plugin_paths = { "/usr/share/jitsi-meet/prosody-plugins/" }
2
+
3
+-- domain mapper options, must at least have domain base set to use the mapper
4
+muc_mapper_domain_base = "meet.example.com";
5
+
6
+turncredentials_secret = "turncredentials_secret_test";
7
+
8
+turncredentials = {
9
+  { type = "stun", host = "meet.example.com", port = "443" },
10
+  { type = "turn", host = "meet.example.com", port = "443", transport = "udp" },
11
+  { type = "turns", host = "meet.example.com", port = "443", transport = "tcp" }
12
+};
13
+
14
+cross_domain_bosh = false;
15
+consider_bosh_secure = true;
16
+
17
+VirtualHost "meet.example.com"
18
+        -- enabled = false -- Remove this line to enable this host
19
+        authentication = "anonymous"
20
+        -- Properties below are modified by jitsi-meet-tokens package config
21
+        -- and authentication above is switched to "token"
22
+        --app_id="example_app_id"
23
+        --app_secret="example_app_secret"
24
+        -- Assign this host a certificate for TLS, otherwise it would use the one
25
+        -- set in the global section (if any).
26
+        -- Note that old-style SSL on port 5223 only supports one certificate, and will always
27
+        -- use the global one.
28
+        ssl = {
29
+                key = "/etc/prosody/certs/meet.example.com.key";
30
+                certificate = "/etc/prosody/certs/meet.example.com.crt";
31
+        }
32
+        speakerstats_component = "speakerstats.meet.example.com"
33
+        conference_duration_component = "conferenceduration.meet.example.com"
34
+        -- we need bosh
35
+        modules_enabled = {
36
+            "bosh";
37
+            "pubsub";
38
+            "ping"; -- Enable mod_ping
39
+            "speakerstats";
40
+            "turncredentials";
41
+            "conference_duration";
42
+        }
43
+        c2s_require_encryption = false
44
+
45
+Component "conference.meet.example.com" "muc"
46
+    storage = "memory"
47
+    modules_enabled = {
48
+        "muc_meeting_id";
49
+        "muc_domain_mapper";
50
+        -- "token_verification";
51
+    }
52
+    admins = { "focus@auth.meet.example.com" }
53
+    muc_room_locking = false
54
+    muc_room_default_public_jids = true
55
+
56
+-- internal muc component
57
+-- Note: This is also used from jibris
58
+Component "internal.auth.meet.example.com" "muc"
59
+    storage = "memory"
60
+    modules_enabled = {
61
+      "ping";
62
+    }
63
+    admins = { "focus@auth.meet.example.com", "jvb@auth.meet.example.com" }
64
+
65
+VirtualHost "auth.meet.example.com"
66
+    ssl = {
67
+        key = "/etc/prosody/certs/auth.meet.example.com.key";
68
+        certificate = "/etc/prosody/certs/auth.meet.example.com.crt";
69
+    }
70
+    authentication = "internal_plain"
71
+
72
+Component "focus.meet.example.com"
73
+    component_secret = "jicofo_secret_test"
74
+
75
+Component "speakerstats.meet.example.com" "speakerstats_component"
76
+    muc_component = "conference.meet.example.com"
77
+
78
+
79
+Component "conferenceduration.meet.example.com" "conference_duration_component"
80
+    muc_component = "conference.meet.example.com"
81
+
82
+-- for Jibri
83
+VirtualHost "recorder.meet.example.com"
84
+    modules_enabled = {
85
+        "ping";
86
+    }
87
+    authentication = "internal_plain"
88
+    c2s_require_encryption = false

+ 114
- 0
doc/example-config-files/scalable/prosody.cfg.lua.scalable.example View File

1
+-- Prosody XMPP Server Configuration
2
+
3
+---------- Server-wide settings ----------
4
+-- Settings in this section apply to the whole server and are the default settings
5
+-- for any virtual hosts
6
+
7
+admins = { }
8
+
9
+network_backend = "epoll"
10
+
11
+-- This is the list of modules Prosody will load on startup.
12
+-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
13
+-- Documentation for bundled modules can be found at: https://prosody.im/doc/modules
14
+modules_enabled = {
15
+
16
+	-- Generally required
17
+		"roster"; -- Allow users to have a roster. Recommended ;)
18
+		"saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
19
+		"tls"; -- Add support for secure TLS on c2s/s2s connections
20
+		"dialback"; -- s2s dialback support
21
+		"disco"; -- Service discovery
22
+
23
+	-- Not essential, but recommended
24
+		"carbons"; -- Keep multiple clients in sync
25
+		"pep"; -- Enables users to publish their avatar, mood, activity, playing music and more
26
+		"private"; -- Private XML storage (for room bookmarks, etc.)
27
+		"blocklist"; -- Allow users to block communications with other users
28
+		"vcard4"; -- User profiles (stored in PEP)
29
+		"vcard_legacy"; -- Conversion between legacy vCard and PEP Avatar, vcard
30
+
31
+	-- Nice to have
32
+		"version"; -- Replies to server version requests
33
+		"uptime"; -- Report how long server has been running
34
+		"time"; -- Let others know the time here on this server
35
+		"ping"; -- Replies to XMPP pings with pongs
36
+		"register"; -- Allow users to register on this server using a client and change passwords
37
+		--"mam"; -- Store messages in an archive and allow users to access it
38
+		--"csi_simple"; -- Simple Mobile optimizations
39
+
40
+	-- Admin interfaces
41
+		"admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
42
+		--"admin_telnet"; -- Opens telnet console interface on localhost port 5582
43
+
44
+	-- HTTP modules
45
+		--"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
46
+		--"websocket"; -- XMPP over WebSockets
47
+		--"http_files"; -- Serve static files from a directory over HTTP
48
+
49
+	-- Other specific functionality
50
+		--"limits"; -- Enable bandwidth limiting for XMPP connections
51
+		--"groups"; -- Shared roster support
52
+		--"server_contact_info"; -- Publish contact information for this service
53
+		--"announce"; -- Send announcement to all online users
54
+		--"welcome"; -- Welcome users who register accounts
55
+		--"watchregistrations"; -- Alert admins of registrations
56
+		--"motd"; -- Send a message to users when they log in
57
+		--"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
58
+		--"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
59
+}
60
+
61
+-- These modules are auto-loaded, but should you want
62
+-- to disable them then uncomment them here:
63
+modules_disabled = {
64
+	-- "offline"; -- Store offline messages
65
+	-- "c2s"; -- Handle client connections
66
+	-- "s2s"; -- Handle server-to-server connections
67
+	-- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
68
+}
69
+
70
+-- Disable account creation by default, for security
71
+-- For more information see https://prosody.im/doc/creating_accounts
72
+allow_registration = false
73
+
74
+-- Force clients to use encrypted connections? This option will
75
+-- prevent clients from authenticating unless they are using encryption.
76
+
77
+c2s_require_encryption = true
78
+
79
+-- Force servers to use encrypted connections? This option will
80
+-- prevent servers from authenticating unless they are using encryption.
81
+
82
+s2s_require_encryption = true
83
+
84
+-- Force certificate authentication for server-to-server connections?
85
+
86
+s2s_secure_auth = false
87
+
88
+
89
+-- Required for init scripts and prosodyctl
90
+pidfile = "/var/run/prosody/prosody.pid"
91
+
92
+-- Select the authentication backend to use. The 'internal' providers
93
+-- use Prosody's configured data storage to store the authentication data.
94
+
95
+authentication = "internal_hashed"
96
+
97
+archive_expires_after = "1w" -- Remove archived messages after 1 week
98
+
99
+-- Logging configuration
100
+-- For advanced logging see https://prosody.im/doc/logging
101
+log = {
102
+	info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
103
+	error = "/var/log/prosody/prosody.err";
104
+	-- "*syslog"; -- Uncomment this for logging to syslog
105
+	-- "*console"; -- Log to the console, useful for debugging with daemonize=false
106
+}
107
+
108
+
109
+-- Location of directory to find certificates in (relative to main config file):
110
+certificates = "certs"
111
+
112
+VirtualHost "localhost"
113
+
114
+Include "conf.d/*.cfg.lua"

+ 20
- 0
doc/example-config-files/scalable/videobridge_config.scalable.example View File

1
+# Jitsi Videobridge settings
2
+
3
+# sets the XMPP domain (default: none)
4
+JVB_HOSTNAME=meet.example.com
5
+
6
+# sets the hostname of the XMPP server (default: domain if set, localhost otherwise)
7
+JVB_HOST=
8
+
9
+# sets the port of the XMPP server (default: 5275)
10
+JVB_PORT=5347
11
+
12
+# sets the shared secret used to authenticate to the XMPP server
13
+JVB_SECRET=$VP_SECRET
14
+
15
+# extra options to pass to the JVB daemon
16
+JVB_OPTS="--apis=rest,"
17
+
18
+
19
+# adds java system props that are passed to jvb (default are for home and logging config file)
20
+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"

+ 19
- 0
doc/example-config-files/scalable/videobridge_sip-communicator.properties.scalable.example View File

1
+org.ice4j.ice.harvest.DISABLE_AWS_HARVESTER=true
2
+org.ice4j.ice.harvest.STUN_MAPPING_HARVESTER_ADDRESSES=meet-jit-si-turnrelay.jitsi.net:443
3
+
4
+org.jitsi.jicofo.ALWAYS_TRUST_MODE_ENABLED=true
5
+
6
+org.jitsi.videobridge.ENABLE_REST_SHUTDOWN=true
7
+
8
+# Enable broadcasting stats/presence in a MUC
9
+org.jitsi.videobridge.ENABLE_STATISTICS=true
10
+org.jitsi.videobridge.STATISTICS_TRANSPORT=muc,colibri,rest
11
+org.jitsi.videobridge.STATISTICS_INTERVAL=5000
12
+
13
+org.jitsi.videobridge.xmpp.user.shard-1.HOSTNAME=meet.example.com
14
+org.jitsi.videobridge.xmpp.user.shard-1.DOMAIN=auth.meet.example.com
15
+org.jitsi.videobridge.xmpp.user.shard-1.USERNAME=jvb
16
+org.jitsi.videobridge.xmpp.user.shard-1.PASSWORD=$VB_PASSWORD
17
+org.jitsi.videobridge.xmpp.user.shard-1.MUC_JIDS=JvbBrewery@internal.auth.meet.example.com
18
+org.jitsi.videobridge.xmpp.user.shard-1.MUC_NICKNAME=$NICKNAME_OF_VB
19
+org.jitsi.videobridge.xmpp.user.shard-1.DISABLE_CERTIFICATE_VERIFICATION=true

+ 2
- 0
doc/manual-install.md View File

8
 
8
 
9
 There are also some complete [example config files](https://github.com/jitsi/jitsi-meet/tree/master/doc/example-config-files/) available, mentioned in each section.
9
 There are also some complete [example config files](https://github.com/jitsi/jitsi-meet/tree/master/doc/example-config-files/) available, mentioned in each section.
10
 
10
 
11
+There are additional configurations to be done for a [scalable installation](https://github.com/jitsi/jitsi-meet/tree/master/doc/scalable-installation.md)
12
+
11
 ## Network description
13
 ## Network description
12
 
14
 
13
 This is how the network looks:
15
 This is how the network looks:

+ 166
- 0
doc/scalable-installation.md View File

1
+# Scalable Jitsi installation
2
+
3
+A single server Jitsi installation is good for a limited size of concurrent conferences.
4
+The first limiting factor is the videobridge component, that handles the actual video and audio traffic.
5
+It is easy to scale the video bridges horizontally by adding as many as needed.
6
+In a cloud based environment, additionally the bridges can be scaled up or down as needed.
7
+
8
+*NB*: The [Youtube Tutorial on Scaling](https://www.youtube.com/watch?v=LyGV4uW8km8) is outdated and describes an old configuration method.
9
+
10
+*NB*: Building a scalable infrastructure is not a task for beginning Jitsi Administrators.
11
+The instructions assume that you have installed a single node version successfully, and that
12
+you are comfortable installing, configuring and debugging Linux software.
13
+This is not a step-by-step guide, but will show you, which packages to install and which
14
+configurations to change. Use the [manual install](https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md) for
15
+details on how to setup Jitsi on a single host.
16
+It is highly recommended to use configuration management tools like Ansible or Puppet to manage the
17
+installation and configuration.
18
+
19
+## Architecture (Single Jitsi-Meet, multiple videobridges)
20
+
21
+A first step is to split the functions of the central jitsi-meet instance (with nginx, prosody and jicofo) and
22
+videobridges.
23
+
24
+A simplified diagram (with open network ports) of an installation with one Jitsi-Meet instance and three
25
+videobridges that are load balanced looks as follows. Each box is a server/VM.
26
+
27
+```
28
+               +                                       +
29
+               |                                       |
30
+               |                                       |
31
+               v                                       v
32
+          80, 443 TCP                          443 TCP, 10000 UDP
33
+       +--------------+                     +---------------------+
34
+       |  nginx       |  5222, 5347 TCP     |                     |
35
+       |  jitsi-meet  |<-------------------+|  jitsi-videobridge  |
36
+       |  prosody     |         |           |                     |
37
+       |  jicofo      |         |           +---------------------+
38
+       +--------------+         |
39
+                                |           +---------------------+
40
+                                |           |                     |
41
+                                +----------+|  jitsi-videobridge  |
42
+                                |           |                     |
43
+                                |           +---------------------+
44
+                                |
45
+                                |           +---------------------+
46
+                                |           |                     |
47
+                                +----------+|  jitsi-videobridge  |
48
+                                            |                     |
49
+                                            +---------------------+
50
+```
51
+
52
+## Machine Sizing
53
+
54
+The Jitsi-Meet server will generally not have that much load (unless you have many) conferences
55
+going at the same time. A 4 CPU, 8 GB machine will probably be fine.
56
+
57
+The videobridges will have more load. 4 or 8 CPU with 8 GB RAM seems to be a good configuration.
58
+
59
+
60
+### Installation of Jitsi-Meet
61
+
62
+Assuming that the installation will run under the following FQDN: `meet.example.com` and you have
63
+SSL cert and key in `/etc/ssl/meet.example.com.{crt,key}`
64
+
65
+Set the following DebConf variables prior to installing the packages.
66
+(We are not installing the `jitsi-meet` package which would handle that for us)
67
+
68
+Install the `debconf-utils` package
69
+
70
+```
71
+$ cat << EOF | sudo debconf-set-selections
72
+jitsi-videobridge	jitsi-videobridge/jvb-hostname	string	meet.example.com
73
+jitsi-meet	jitsi-meet/jvb-serve	boolean	false
74
+jitsi-meet-prosody	jitsi-videobridge/jvb-hostname	string	meet.example.com
75
+jitsi-meet-web-config	jitsi-meet/cert-choice	select	I want to use my own certificate
76
+jitsi-meet-web-config	jitsi-meet/cert-path-crt	string	/etc/ssl/meet.example.com.crt
77
+jitsi-meet-web-config	jitsi-meet/cert-path-key	string	/etc/ssl/meet.example.com.key
78
+EOF
79
+```
80
+
81
+On the jitsi-meet server, install the following packages:
82
+
83
+* `nginx`
84
+* `prosody`
85
+* `jicofo`
86
+* `jitsi-meet-web`
87
+* `jitsi-meet-prosody`
88
+* `jitsi-meet-web-config`
89
+
90
+### Installation of Videobridge(s)
91
+
92
+For simplicities sake, set the same `debconf` variables as above and install
93
+
94
+* `jitsi-videobridge2`
95
+
96
+### Configuration of jitsi-meet
97
+
98
+#### Firewall
99
+
100
+Open the following ports:
101
+
102
+Open to world:
103
+
104
+* 80 TCP
105
+* 443 TCP
106
+
107
+Open to the videobridges only
108
+
109
+* 5222 TCP (for Prosody)
110
+* 5437 TCP (for Jicofo)
111
+
112
+
113
+#### NGINX
114
+
115
+Create the `/etc/nginx/sites-available/meet.example.com.conf` as usual
116
+
117
+#### Prosody
118
+
119
+Follow the steps in the [manual install](https://github.com/jitsi/jitsi-meet/blob/master/doc/manual-install.md) for setup tasks
120
+
121
+You will need to adapt the following files (see the files in `example-config-files/scalable`)
122
+
123
+* `/etc/prosody/prosody.cfg.lua`
124
+* `/etc/prosody/conf.avail/meet.example.com.cfg.lua`
125
+
126
+#### Jitsi-Meet
127
+
128
+Adapt `/usr/share/jitsi-meet/config.js` and `/usr/share/jitsi-meet/interface-config.js` to your specific needs
129
+
130
+#### Jicofo
131
+
132
+You will need to adapt the following files (see the files in `example-config-files/scalable`)
133
+
134
+* `/etc/jitsi/jicofo/config` (hostname, jicofo_secret, jicofo_password)
135
+* `/etc/jitsi/jicofo/sip-communicator.properties` (hostname)
136
+
137
+### Configuration of the Videobridge
138
+
139
+#### Firewall
140
+
141
+Open the following ports:
142
+
143
+Open to world:
144
+
145
+* 443 TCP
146
+* 10000 UDP
147
+
148
+#### jitsi-videobridge2
149
+
150
+You will need to adapt the following files (see the files in `example-config-files/scalable`)
151
+
152
+Each videobridge will have to have it's own, unique nickname
153
+
154
+* `/etc/jitsi/videobridge/config` (hostname, password)
155
+* `/etc/jitsi/jicofo/sip-communicator.properties` (hostname of jitsi-meet, nickname of videobridge, vb_password)
156
+
157
+With the latest stable (April 2020) videobridge, it is no longer necessary to set public and private IP
158
+adresses in the `sip-communicator.properties` as the bridge will figure out the correct configuration by itself.
159
+
160
+## Testing
161
+
162
+After restarting all services (`prosody`, `jicofo` and all the `jitsi-videobridge2`) you can see in
163
+`/var/log/prosody/prosody.log` and
164
+`/var/log/jitsi/jicofo.log` that the videobridges connect to Prososy and that Jicofo picks them up.
165
+
166
+When a new conference starts, Jicofo picks a videobridge and schedules the conference on it.

Loading…
Cancel
Save