Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 4ec7db5

Browse files
committed
Added docs for apply-config.sh
1 parent 91bd7a3 commit 4ec7db5

File tree

3 files changed

+133
-7
lines changed

3 files changed

+133
-7
lines changed

_posts/2015-04-05-faq.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,9 @@ In short, if the user is having any problems (such as audio is garbled or they a
412412

413413
## How many simultaneous users can BigBlueButton support
414414

415-
As a rule of thumb, without knowing anything about your server, we recommend running your BigBlueButton with sessions of one hundred (100) users or less.
415+
As a rule of thumb, if your BigBlueButton server meets the [minimum requirements](http://docs.bigbluebutton.org/2.2/install.html#minimum-server-requirements), the server should be able to support 150 simultaneous users, such as 3 simultaneous sessions of 50 users, 6 x 25, etc.
416416

417-
For example, if after testing your server under load, you find it can support 250 simultaneous users, then we recommend running up to two sessions of 100 users, 3 x 75, 5 x 50, etc.
418-
419-
See [minimum server requirements](/install/install.html).
420-
421-
Of course, there is a big difference between running BigBlueButton on a single core Celeron CPU vs. a quad core X3450 processor. The latter will be able to hold more simultaneous users than the former.
417+
We recommend no single sessions exceed one hundred (100) users.
422418

423419
Members of our community periodically host stress tests for BigBlueButton, which gives others a data point on what a particular server was able to handle. Take any stress test with a grain of salt. There are many variables at play:
424420

@@ -428,7 +424,9 @@ Members of our community periodically host stress tests for BigBlueButton, which
428424
* Configuration of BigBlueButton
429425
* Version of BigBlueButton
430426

431-
In BigBlueButton, it also depends on what users do in a session. If you have a session with 20 users and all share their webcam (yes, this is possible) will generate 400 streams (10 incoming streams to the server and 390 outgoing streams). If you have a session with 20 users and all share their microphones, there will be a two-way audio stream for each user to the BigBlueButton server; whereas if 19 of the users join the Listen Only stream, then there is only two two-way audio streams to the BigBlueButton server (one for the presenter and the other for the listen only stream).
427+
The scalability of a BigBlueButton session also depends on what media users are sharing in a session. If you have a session with 20 users and all sharing their webcam, this scenario will generate 400 streams (10 incoming streams to the server and 390 outgoing streams). Alternatively, if in the same session there is only one person (the instructor) sharing their webcam, there will be 20 streams (1 incoming and 19 outgoing).
428+
429+
If you have a session with 20 users and all share their microphones, there will be 20 two-way audio stream being mixed by in real-time by FreeSWITCH. Alternatively, if only one user (the instructor) shares their microphone and 19 join Listen Only, then there is only one stream mixed by FreeSWITCH (less CPU), and 19 one way streams shared to the user.
432430

433431
If you are unsure of how many users your server will support, we **strongly** recommend you first stress test your own server with a group of users to get real-world data.
434432

_posts/2019-02-14-customize.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,134 @@ This change will cause BigBlueButton to generate an additional `.mp4` file for t
372372

373373
This change will increase the processing time and storage size of recordings with video files as it will now generate two videos: `.webm` and `.mp4` for the webcam and screen share videos.
374374

375+
## Automatically apply configuration changes on restart
376+
377+
When you upgrade to the latest build of BigBlueButton using either the [manual steps](/2.2/install.html#upgrading-from-bigbluebutton-22) or [bbb-install.sh](https://github.com/bigbluebutton/bbb-install) script, if you have made manual changes to BigBlueButton's configuration, the packaging scripts may overwrite your changes.
378+
379+
Instead of an error-prone step to manually re-applying any changes after each upgrade, a better approach would be to have your custom configuration changes in a script that gets automatically when BigBlueButton gets restarted.
380+
381+
Whenever you manually update BigBlueButton, the [instructions](/2.2/install.html#upgrading-from-bigbluebutton-22) state to run `sudo bbb-conf --setip <hostname>` to re-apply the `<hostname>` to BigBlueButton's configuration files ([bbb-install.sh](https://github.com/bigbluebutton/bbb-install) does this for you automatically).
382+
383+
There is now logic in `bbb-conf` to look for a BASH script at `/etc/bigbluebutton/bbb-conf/apply-config.sh` when doing either `--restart` or `--setip <hostname>` and, if found, execute this script before starting up BigBlueButton.
384+
385+
You can then put your configuration changes in `apply-config.sh` to ensure they are automatically applied. Here's a sample `apply-config.sh` script
386+
387+
~~~sh
388+
!/bin/bash
389+
390+
# Pull in the helper functions for configuring BigBlueButton
391+
source /etc/bigbluebutton/bbb-conf/apply-lib.sh
392+
393+
enableUFWRules
394+
~~~
395+
396+
Notice it includes `apply-lib.sh` which is another BASH script that contains some helper functions (see [apply-lib.sh](https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-config/bin/apply-lib.sh) source). It then calls `enableUFWRules` to apply the settings in [restrict access to specific ports](#restrict-access-to-specific-ports).
397+
The contents of `apply-config.sh` are not owned by any package, so it will never be overwritten.
398+
399+
When you create `apply-config.sh`, make it executable (`chmod +x /etc/bigbluebutton/bbb-conf/apply-config.sh`). Using the above script as an example, whenever you do `bbb-conf` with `--restart` or `--setip`, you'll see the following output
400+
401+
~~~
402+
Restarting BigBlueButton 2.2.0-xx-x ...
403+
Stopping BigBlueButton
404+
405+
Applying updates in /etc/bigbluebutton/bbb-conf/apply-config.sh:
406+
- Enable Firewall and opening 22/tcp, 80/tcp, 443/tcp and 16384:32768/udp
407+
Rules updated
408+
Rules updated (v6)
409+
Rules updated
410+
Rules updated (v6)
411+
Rules updated
412+
Rules updated (v6)
413+
Rules updated
414+
Rules updated (v6)
415+
Firewall is active and enabled on system startup
416+
417+
Starting BigBlueButton
418+
~~~
419+
420+
The next sections give some examples of customizations you could add to `apply-config.sh`.
421+
422+
423+
### Reduce bandwidth for webcams
424+
425+
If you expect users to share many webcams, to [reduce bandwidth for webcams](#reduce-bandwidth-from-webcams), add the following to `apply-config.sh`.
426+
427+
~~~bash
428+
echo " - Setting camera defaults"
429+
yq w -i $HTML5_CONFIG public.kurento.cameraProfiles.[0].bitrate 50
430+
yq w -i $HTML5_CONFIG public.kurento.cameraProfiles.[1].bitrate 100
431+
yq w -i $HTML5_CONFIG public.kurento.cameraProfiles.[2].bitrate 200
432+
yq w -i $HTML5_CONFIG public.kurento.cameraProfiles.[3].bitrate 300
433+
434+
yq w -i $HTML5_CONFIG public.kurento.cameraProfiles.[0].default true
435+
yq w -i $HTML5_CONFIG public.kurento.cameraProfiles.[1].default false
436+
yq w -i $HTML5_CONFIG public.kurento.cameraProfiles.[2].default false
437+
yq w -i $HTML5_CONFIG public.kurento.cameraProfiles.[3].default false
438+
439+
~~~
440+
441+
### Apply lock settings to restrict webcams
442+
443+
To enable lock settings for `Share webcam` by default (viewers are unable to share their webcam), add the following to `apply-config.sh`.
444+
445+
~~~bash
446+
echo " - Prevent viewers from sharing webcams"
447+
sed -i 's/lockSettingsDisableCam=.*/lockSettingsDisableCam=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
448+
~~~
449+
450+
After restart, if you open the lock settings you'll see `Share webcam` lock enabled.
451+
452+
<p align="center">
453+
<img src="/images/html5-lock-webcam.png"/>
454+
</p><br>
455+
456+
### Apply custom settings for TURN server
457+
458+
If always want a specific TURN server configuration, the following to `apply-config.sh` and modify `aaa.bbb.ccc.ddd` and `secret` with your values.
459+
460+
~~~bash
461+
echo " - Update TURN server configuration turn-stun-servers.xml"
462+
cat <<HERE > /usr/share/bbb-web/WEB-INF/classes/spring/turn-stun-servers.xml
463+
<?xml version="1.0" encoding="UTF-8"?>
464+
<beans xmlns="http://www.springframework.org/schema/beans"
465+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
466+
xsi:schemaLocation="http://www.springframework.org/schema/beans
467+
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
468+
<bean id="stun0" class="org.bigbluebutton.web.services.turn.StunServer">
469+
<constructor-arg index="0" value="stun:aaa.bbb.ccc.ddd"/>
470+
</bean>
471+
<bean id="turn0" class="org.bigbluebutton.web.services.turn.TurnServer">
472+
<constructor-arg index="0" value="secret"/>
473+
<constructor-arg index="1" value="turns:aaa.bbb.ccc.ddd:443?transport=tcp"/>
474+
<constructor-arg index="2" value="86400"/>
475+
</bean>
476+
<bean id="stunTurnService"
477+
class="org.bigbluebutton.web.services.turn.StunTurnService">
478+
<property name="stunServers">
479+
<set>
480+
<ref bean="stun0"/>
481+
</set>
482+
</property>
483+
<property name="turnServers">
484+
<set>
485+
<ref bean="turn0"/>
486+
</set>
487+
</property>
488+
</bean>
489+
</beans>
490+
~~~
491+
492+
### Always record every meeting
493+
494+
To [always record every meeting](#always-record-every-meeting), add the following to `apply-config.sh`.
495+
496+
~~~bash
497+
echo " - Prevent viewers from sharing webcams"
498+
sed -i 's/autoStartRecording=.*/autoStartRecording=true/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
499+
sed -i 's/allowStartStopRecording=.*/allowStartStopRecording=false/g' /usr/share/bbb-web/WEB-INF/classes/bigbluebutton.properties
500+
~~~
501+
502+
375503
# Other configuration options
376504
377505
## Increase the file size for an uploaded presentation

images/html5-lock-webcam.png

36.7 KB
Loading

0 commit comments

Comments
 (0)