build-conf: Remove Kurento dependency; Run on Ubuntu 22.04

This commit is contained in:
Anton Georgiev 2023-04-25 15:08:36 -04:00
parent 12baa96d21
commit 0fccb78ee1
47 changed files with 15 additions and 338 deletions

View File

@ -12,7 +12,7 @@ stages:
# define which docker image to use for builds # define which docker image to use for builds
default: default:
image: gitlab.senfcall.de:5050/senfcall-public/docker-bbb-build:v2023-04-18 image: bigbluebutton/bbb-build:2023-04-24
# This stage uses git to find out since when each package has been unmodified. # This stage uses git to find out since when each package has been unmodified.
# it then checks an API endpoint on the package server to find out for which of # it then checks an API endpoint on the package server to find out for which of

View File

@ -13,7 +13,7 @@ We designed BigBlueButton for online learning, (though it can be used for many [
* Group collaboration (many-to-many) * Group collaboration (many-to-many)
* Online classes (one-to-many) * Online classes (one-to-many)
You can install on a Ubuntu 20.04 64-bit server. We provide [bbb-install.sh](https://github.com/bigbluebutton/bbb-install) to let you have a server up and running within 30 minutes (or your money back 😉). You can install on a Ubuntu 22.04 64-bit server. We provide [bbb-install.sh](https://github.com/bigbluebutton/bbb-install) to let you have a server up and running within 30 minutes (or your money back 😉).
For full technical documentation BigBlueButton -- including architecture, features, API, and GreenLight (the default front-end) -- see [https://docs.bigbluebutton.org/](https://docs.bigbluebutton.org/). For full technical documentation BigBlueButton -- including architecture, features, API, and GreenLight (the default front-end) -- see [https://docs.bigbluebutton.org/](https://docs.bigbluebutton.org/).

View File

@ -1 +1 @@
BIGBLUEBUTTON_RELEASE=2.7.0-alpha.1 BIGBLUEBUTTON_RELEASE=2.8.0-alpha.1

View File

@ -85,18 +85,6 @@ HERE
# tail -f /var/log/nginx/html5-client.log | sed -u 's/\\x22/"/g' | sed -u 's/\\x5C//g' # tail -f /var/log/nginx/html5-client.log | sed -u 's/\\x22/"/g' | sed -u 's/\\x5C//g'
} }
enableHTML5CameraQualityThresholds() {
echo " - Enable HTML5 cameraQualityThresholds"
yq w -i $HTML5_CONFIG public.kurento.cameraQualityThresholds.enabled true
}
enableHTML5WebcamPagination() {
echo " - Enable HTML5 webcam pagination"
yq w -i $HTML5_CONFIG public.kurento.pagination.enabled true
}
# #
# Enable firewall rules to open only # Enable firewall rules to open only
# #
@ -136,131 +124,6 @@ enableUFWRules() {
} }
enableMultipleKurentos() {
echo " - Configuring three Kurento Media Servers (listen only, webcam, and screenshare)"
# Step 1. Setup shared certificate between FreeSWITCH and Kurento
HOSTNAME=$(cat /etc/nginx/sites-available/bigbluebutton | grep -v '#' | sed -n '/server_name/{s/.*server_name[ ]*//;s/;//;p}' | cut -d' ' -f1 | head -n 1)
openssl req -x509 -new -nodes -newkey rsa:4096 -sha256 -days 3650 -subj "/C=BR/ST=Ottawa/O=BigBlueButton Inc./OU=Live/CN=$HOSTNAME" -keyout /tmp/dtls-srtp-key.pem -out /tmp/dtls-srtp-cert.pem
cat /tmp/dtls-srtp-key.pem /tmp/dtls-srtp-cert.pem > /etc/kurento/dtls-srtp.pem
cat /tmp/dtls-srtp-key.pem /tmp/dtls-srtp-cert.pem > /opt/freeswitch/etc/freeswitch/tls/dtls-srtp.pem
sed -i 's/;pemCertificateRSA=.*/pemCertificateRSA=\/etc\/kurento\/dtls-srtp.pem/g' /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
# Step 2. Setup systemd unit files to launch three separate instances of Kurento
for i in `seq 8888 8890`; do
cat > /usr/lib/systemd/system/kurento-media-server-${i}.service << HERE
# /usr/lib/systemd/system/kurento-media-server-#{i}.service
[Unit]
Description=Kurento Media Server daemon (${i})
After=network.target
PartOf=kurento-media-server.service
After=kurento-media-server.service
[Service]
UMask=0002
Environment=KURENTO_LOGS_PATH=/var/log/kurento-media-server
Environment=KURENTO_CONF_FILE=/etc/kurento/kurento-${i}.conf.json
User=kurento
Group=kurento
LimitNOFILE=1000000
ExecStartPre=-/bin/rm -f /var/kurento/.cache/gstreamer-1.5/registry.x86_64.bin
ExecStart=/usr/bin/kurento-media-server --gst-debug-level=3 --gst-debug="3,Kurento*:4,kms*:4,KurentoWebSocketTransport:5"
Type=simple
PIDFile=/var/run/kurento-media-server-${i}.pid
TasksMax=infinity
Restart=always
[Install]
WantedBy=kurento-media-server.service
HERE
# Make a new configuration file each instance of Kurento that binds to a different port
cp /etc/kurento/kurento.conf.json /etc/kurento/kurento-${i}.conf.json
sed -i "s/8888/${i}/g" /etc/kurento/kurento-${i}.conf.json
done
# Step 3. Override the main kurento-media-server unit to start/stop the three Kurento instances
cat > /etc/systemd/system/kurento-media-server.service << HERE
[Unit]
Description=Kurento Media Server
[Service]
Type=oneshot
ExecStart=/bin/true
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
HERE
# Step 4. Extend bbb-webrtc-sfu unit to wait for all three KMS servers to start
mkdir -p /etc/systemd/system/bbb-webrtc-sfu.service.d
cat > /etc/systemd/system/bbb-webrtc-sfu.service.d/override.conf << HERE
[Unit]
After=syslog.target network.target freeswitch.service kurento-media-server-8888.service kurento-media-server-8889.service kurento-media-server-8890.service
HERE
systemctl daemon-reload
for i in `seq 8888 8890`; do
systemctl enable kurento-media-server-${i}.service
done
# Step 5. Modify bbb-webrtc-sfu config to use the three Kurento servers
KURENTO_CONFIG=/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml
MEDIA_TYPE=(main audio content)
IP=$(yq r /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml kurento[0].ip)
for i in `seq 0 2`; do
yq w -i $KURENTO_CONFIG "kurento[$i].ip" $IP
yq w -i $KURENTO_CONFIG "kurento[$i].url" "ws://127.0.0.1:$(($i + 8888))/kurento"
yq w -i $KURENTO_CONFIG "kurento[$i].mediaType" "${MEDIA_TYPE[$i]}"
yq w -i $KURENTO_CONFIG "kurento[$i].ipClassMappings.local" ""
yq w -i $KURENTO_CONFIG "kurento[$i].ipClassMappings.private" ""
yq w -i $KURENTO_CONFIG "kurento[$i].ipClassMappings.public" ""
yq w -i $KURENTO_CONFIG "kurento[$i].options.failAfter" 5
yq w -i $KURENTO_CONFIG "kurento[$i].options.request_timeout" 30000
yq w -i $KURENTO_CONFIG "kurento[$i].options.response_timeout" 30000
done
yq w -i $KURENTO_CONFIG balancing-strategy MEDIA_TYPE
}
disableMultipleKurentos() {
echo " - Configuring a single Kurento Media Server for listen only, webcam, and screenshare"
systemctl stop kurento-media-server.service
for i in `seq 8888 8890`; do
systemctl disable kurento-media-server-${i}.service
done
# Remove the overrride (restoring the original kurento-media-server.service unit file)
rm -f /etc/systemd/system/kurento-media-server.service
rm -f /etc/systemd/system/bbb-webrtc-sfu.service.d/override.conf
systemctl daemon-reload
# Restore bbb-webrtc-sfu configuration to use a single instance of Kurento
KURENTO_CONFIG=/usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml
yq d -i $KURENTO_CONFIG kurento[1]
yq d -i $KURENTO_CONFIG kurento[1]
yq w -i $KURENTO_CONFIG "kurento[0].url" "ws://127.0.0.1:8888/kurento"
yq w -i $KURENTO_CONFIG "kurento[0].mediaType" ""
yq w -i $KURENTO_CONFIG balancing-strategy ROUND_ROBIN
}
notCalled() { notCalled() {
# #
# This function is not called. # This function is not called.
@ -283,10 +146,6 @@ source /etc/bigbluebutton/bbb-conf/apply-lib.sh
#enableHTML5ClientLog #enableHTML5ClientLog
#enableUFWRules #enableUFWRules
#enableHTML5CameraQualityThresholds
#enableHTML5WebcamPagination
#enableMultipleKurentos
# Shorten the FreeSWITCH "you have been muted" and "you have been unmuted" prompts # Shorten the FreeSWITCH "you have been muted" and "you have been unmuted" prompts
# cp -r /etc/bigbluebutton/bbb-conf/sounds /opt/freeswitch/share/freeswitch # cp -r /etc/bigbluebutton/bbb-conf/sounds /opt/freeswitch/share/freeswitch

View File

@ -440,19 +440,6 @@ display_bigbluebutton_status () {
units="$units bbb-webrtc-recorder" units="$units bbb-webrtc-recorder"
fi fi
if [ -f /usr/lib/systemd/system/kurento-media-server.service ]; then
units="$units kurento-media-server"
fi
for i in `seq 8888 8890`; do
# check if multi-kurento setup is configured
if [ -f /usr/lib/systemd/system/kurento-media-server-${i}.service ]; then
if systemctl is-enabled kurento-media-server-${i}.service > /dev/null; then
units="$units kurento-media-server-${i}"
fi
fi
done
if [ -f /usr/share/etherpad-lite/settings.json ]; then if [ -f /usr/share/etherpad-lite/settings.json ]; then
units="$units etherpad" units="$units etherpad"
fi fi
@ -718,9 +705,6 @@ if [[ $PORT_RANGE ]]; then
xmlstarlet edit --inplace --update '/configuration/settings/param[@name="rtp-start-port"]/@value' --value $START_PORT $FREESWITCH_SWITCH_CONF xmlstarlet edit --inplace --update '/configuration/settings/param[@name="rtp-start-port"]/@value' --value $START_PORT $FREESWITCH_SWITCH_CONF
xmlstarlet edit --inplace --update '/configuration/settings/param[@name="rtp-end-port"]/@value' --value $END_PORT $FREESWITCH_SWITCH_CONF xmlstarlet edit --inplace --update '/configuration/settings/param[@name="rtp-end-port"]/@value' --value $END_PORT $FREESWITCH_SWITCH_CONF
sed -i "s/minPort=.*/minPort=$START_PORT/" /etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini
sed -i "s/maxPort=.*/maxPort=$END_PORT/" /etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini
mkdir -p $(dirname $WEBRTC_SFU_ETC_CONFIG) mkdir -p $(dirname $WEBRTC_SFU_ETC_CONFIG)
touch $WEBRTC_SFU_ETC_CONFIG touch $WEBRTC_SFU_ETC_CONFIG
yq w -i $WEBRTC_SFU_ETC_CONFIG mediasoup.worker.rtcMinPort $START_PORT yq w -i $WEBRTC_SFU_ETC_CONFIG mediasoup.worker.rtcMinPort $START_PORT
@ -1417,7 +1401,6 @@ if [ $CHECK ]; then
echo "UDP port ranges" echo "UDP port ranges"
echo echo
echo " FreeSWITCH: $(xmlstarlet sel -t -m './configuration/settings/param[@name="rtp-start-port"]' -v @value $FREESWITCH_SWITCH_CONF)-$(xmlstarlet sel -t -m './configuration/settings/param[@name="rtp-end-port"]' -v @value $FREESWITCH_SWITCH_CONF)" echo " FreeSWITCH: $(xmlstarlet sel -t -m './configuration/settings/param[@name="rtp-start-port"]' -v @value $FREESWITCH_SWITCH_CONF)-$(xmlstarlet sel -t -m './configuration/settings/param[@name="rtp-end-port"]' -v @value $FREESWITCH_SWITCH_CONF)"
echo " kurento: $(awk -F '=' '{if (! ($0 ~ /^;/) && $0 ~ /minPort/) print $2}' /etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini)-$(awk -F '=' '{if (! ($0 ~ /^;/) && $0 ~ /maxPort/) print $2}' /etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini)"
echo " bbb-webrtc-sfu: $(echo "$WEBRTC_SFU_CONFIG" | yq r - mediasoup.worker.rtcMinPort)-$(echo "$WEBRTC_SFU_CONFIG" | yq r - mediasoup.worker.rtcMaxPort)" echo " bbb-webrtc-sfu: $(echo "$WEBRTC_SFU_CONFIG" | yq r - mediasoup.worker.rtcMinPort)-$(echo "$WEBRTC_SFU_CONFIG" | yq r - mediasoup.worker.rtcMaxPort)"
echo " bbb-webrtc-recorder: $(echo "$WEBRTC_RECORDER_CONFIG" | yq r - webrtc.rtcMinPort)-$(echo "$WEBRTC_RECORDER_CONFIG" | yq r - webrtc.rtcMaxPort)" echo " bbb-webrtc-recorder: $(echo "$WEBRTC_RECORDER_CONFIG" | yq r - webrtc.rtcMinPort)-$(echo "$WEBRTC_RECORDER_CONFIG" | yq r - webrtc.rtcMaxPort)"
@ -1518,7 +1501,6 @@ if [ $ZIP ]; then
tar rf $TMP_LOG_FILE /var/log/bbb-apps-akka > /dev/null 2>&1 tar rf $TMP_LOG_FILE /var/log/bbb-apps-akka > /dev/null 2>&1
tar rf $TMP_LOG_FILE /var/log/bbb-fsesl-akka > /dev/null 2>&1 tar rf $TMP_LOG_FILE /var/log/bbb-fsesl-akka > /dev/null 2>&1
tar rf $TMP_LOG_FILE /var/log/bbb-webrtc-sfu > /dev/null 2>&1 tar rf $TMP_LOG_FILE /var/log/bbb-webrtc-sfu > /dev/null 2>&1
tar rf $TMP_LOG_FILE /var/log/kurento-media-server > /dev/null 2>&1
tar rf $TMP_LOG_FILE /var/log/mongodb > /dev/null 2>&1 tar rf $TMP_LOG_FILE /var/log/mongodb > /dev/null 2>&1
tar rf $TMP_LOG_FILE /var/log/redis > /dev/null 2>&1 tar rf $TMP_LOG_FILE /var/log/redis > /dev/null 2>&1
tar rf $TMP_LOG_FILE /var/log/nginx/error.log* > /dev/null 2>&1 tar rf $TMP_LOG_FILE /var/log/nginx/error.log* > /dev/null 2>&1
@ -1820,10 +1802,6 @@ if [ $CLEAN ]; then
rm -f /var/log/mongodb/* rm -f /var/log/mongodb/*
fi fi
if [ -d /var/log/kurento-media-server ]; then
rm -f /var/log/kurento-media-server/*
fi
start_bigbluebutton start_bigbluebutton
check_state check_state
fi fi

View File

@ -40,9 +40,8 @@ fi
find /var/bigbluebutton/ -maxdepth 1 -type d -name "*-[0-9]*" -mtime +$history -exec rm -rf '{}' + find /var/bigbluebutton/ -maxdepth 1 -type d -name "*-[0-9]*" -mtime +$history -exec rm -rf '{}' +
# #
# Delete streams from Kurento and mediasoup older than N days # Delete streams from mediasoup older than N days
# #
kurento_dir=/var/kurento/
mediasoup_dir=/var/mediasoup/ mediasoup_dir=/var/mediasoup/
remove_stale_sfu_raw_files() { remove_stale_sfu_raw_files() {
@ -55,7 +54,6 @@ remove_stale_sfu_raw_files() {
done done
} }
remove_stale_sfu_raw_files "$kurento_dir"
remove_stale_sfu_raw_files "$mediasoup_dir" remove_stale_sfu_raw_files "$mediasoup_dir"
# #
@ -70,7 +68,6 @@ find /var/freeswitch/meetings/ -name "*.opus" -mtime +$history -delete
find /opt/freeswitch/var/log/freeswitch -type f -mtime +$log_history -delete find /opt/freeswitch/var/log/freeswitch -type f -mtime +$log_history -delete
find /var/log/bigbluebutton -type f -mtime +$log_history -delete find /var/log/bigbluebutton -type f -mtime +$log_history -delete
find /var/log/bbb-webrtc-sfu -type f -mtime +$log_history -delete find /var/log/bbb-webrtc-sfu -type f -mtime +$log_history -delete
find /var/log/kurento-media-server -name "*.pid*.log" -type f -mtime +$log_history -delete
# #
# Delete raw files of recordings without recording marks older than N days # Delete raw files of recordings without recording marks older than N days

View File

@ -1,35 +0,0 @@
#!/bin/bash
#
# Restart Kurento every 24+ hours
#
if [ ! -f /var/tmp/bbb-kms-last-restart.txt ]; then
date +%Y-%m-%d\ %H:%M:%S > /var/tmp/bbb-kms-last-restart.txt
exit
fi
users=$(mongo --quiet mongodb://127.0.1.1:27017/meteor --eval "db.users.count()")
if [ "$users" -eq 0 ]; then
# Make sure 24 hours have passed since last restart
# Seconds since epoch for last restart
dt1=$(cat /var/tmp/bbb-kms-last-restart.txt)
t1=`date --date="$dt1" +%s`
# Current seconds since epoch
dt2=`date +%Y-%m-%d\ %H:%M:%S`
t2=`date --date="$dt2" +%s`
# Hours since last restart
let "tDiff=$t2-$t1"
let "hDiff=$tDiff/3600"
if [ "$hDiff" -ge 24 ]; then
systemctl restart kurento-media-server bbb-webrtc-sfu
date +%Y-%m-%d\ %H:%M:%S > /var/tmp/bbb-kms-last-restart.txt
fi
fi

View File

@ -214,7 +214,7 @@ fi
if [ -f /etc/redhat-release ]; then if [ -f /etc/redhat-release ]; then
TOMCAT_SERVICE=tomcat TOMCAT_SERVICE=tomcat
else else
if grep -q focal /etc/lsb-release; then if grep -q jammy /etc/lsb-release; then
TOMCAT_SERVICE=tomcat9 TOMCAT_SERVICE=tomcat9
fi fi
fi fi

View File

@ -100,21 +100,6 @@ fi
usermod bigbluebutton -a -G freeswitch usermod bigbluebutton -a -G freeswitch
chmod 0775 /var/freeswitch/meetings chmod 0775 /var/freeswitch/meetings
if ! id kurento >/dev/null 2>&1; then
useradd --home-dir "/var/lib/kurento" --system kurento
fi
usermod bigbluebutton -a -G kurento
chown kurento:kurento /var/kurento
chmod 0775 /var/kurento
if [ -d /var/kurento/recordings ]; then
chmod 0775 /var/kurento/recordings
fi
if [ -d /var/kurento/screenshare ]; then
chmod 0775 /var/kurento/screenshare
fi
# Verify mediasoup raw media directories ownership and perms # Verify mediasoup raw media directories ownership and perms
if [ -d /var/mediasoup ]; then if [ -d /var/mediasoup ]; then
chown bigbluebutton:bigbluebutton /var/mediasoup chown bigbluebutton:bigbluebutton /var/mediasoup

View File

@ -2,5 +2,5 @@ after-install.sh
bbb-export-annotations.service bbb-export-annotations.service
before-remove.sh before-remove.sh
build.sh build.sh
opts-focal.sh opts-jammy.sh
opts-global.sh opts-global.sh

View File

@ -2,4 +2,4 @@ after-install.sh
bbb-pads.service bbb-pads.service
before-remove.sh before-remove.sh
build.sh build.sh
opts-focal.sh opts-jammy.sh

View File

@ -3,5 +3,5 @@ bbb-webhooks.service
before-install.sh before-install.sh
before-remove.sh before-remove.sh
build.sh build.sh
opts-focal.sh opts-jammy.sh
webhooks.nginx webhooks.nginx

View File

@ -2,4 +2,4 @@ after-install.sh
bbb-webrtc-recorder.service bbb-webrtc-recorder.service
before-remove.sh before-remove.sh
build.sh build.sh
opts-focal.sh opts-jammy.sh

View File

@ -1,11 +1,9 @@
after-install.sh after-install.sh
bbb-restart-kms
bbb-webrtc-sfu.logrotate bbb-webrtc-sfu.logrotate
bbb-webrtc-sfu.service bbb-webrtc-sfu.service
before-install.sh before-install.sh
before-remove.sh before-remove.sh
build.sh build.sh
kurento-media-server.service opts-jammy.sh
opts-focal.sh
opts-centos7.sh opts-centos7.sh
webrtc-sfu.nginx webrtc-sfu.nginx

View File

@ -10,11 +10,6 @@ case "$1" in
cp /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.example.yml $TARGET cp /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.example.yml $TARGET
chown bigbluebutton:bigbluebutton $TARGET chown bigbluebutton:bigbluebutton $TARGET
yq w -i $TARGET kurento[0].ip "$IP"
# https://github.com/bigbluebutton/bbb-webrtc-sfu/pull/37
# yq w -i $TARGET kurento[0].url "ws://$SERVER_URL:8888/kurento"
# Set mediasoup IPs # Set mediasoup IPs
yq w -i $TARGET mediasoup.webrtc.listenIps[0].announcedIp "$IP" yq w -i $TARGET mediasoup.webrtc.listenIps[0].announcedIp "$IP"
yq w -i $TARGET mediasoup.plainRtp.listenIp.announcedIp "$IP" yq w -i $TARGET mediasoup.plainRtp.listenIp.announcedIp "$IP"
@ -56,37 +51,11 @@ case "$1" in
mkdir -p /var/mediasoup mkdir -p /var/mediasoup
fi fi
# Create a symbolic link from /var/kurento -> /var/lib/kurento if needed
if [ ! -d /var/kurento ]; then
if [ -d /var/lib/kurento ]; then
ln -s /var/lib/kurento /var/kurento
fi
fi
chmod 644 $TARGET chmod 644 $TARGET
chown bigbluebutton:bigbluebutton $TARGET chown bigbluebutton:bigbluebutton $TARGET
if [ ! -d /var/log/kurento-media-server ]; then
mkdir -p /var/log/kurento-media-server
fi
chown kurento:root /var/log/kurento-media-server
# Ensure a default port range is setup
if ! grep -v '^;' /etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini | grep -q minPort; then
cat >> /etc/kurento/modules/kurento/BaseRtpEndpoint.conf.ini << HERE
# Added by bbb-webrtc-sfu.postinst $(date)
minPort=24577
maxPort=32768
HERE
fi
# Check if using Kurento packages with focal
reloadService nginx reloadService nginx
startService bbb-webrtc-sfu || echo "bbb-webrtc-sfu could not be registered or started" startService bbb-webrtc-sfu || echo "bbb-webrtc-sfu could not be registered or started"
startService kurento-media-server || echo "kurento-media-serve could not be registered or started"
;; ;;

View File

@ -1,40 +0,0 @@
#!/bin/bash
#
# Restart Kurento every 24+ hours
#
if [ ! -f /var/tmp/bbb-kms-last-restart.txt ]; then
date +%Y-%m-%d\ %H:%M:%S > /var/tmp/bbb-kms-last-restart.txt
exit
fi
# Read in RESTART_OPTS
if [ -f /etc/default/bbb-restart-kms ]; then
source /etc/default/bbb-restart-kms
fi
users=$(mongo --quiet mongodb://127.0.1.1:27017/meteor --eval "db.users.count()")
if [ "$users" -eq 0 ]; then
# Make sure 24 hours have passed since last restart
# Seconds since epoch for last restart
dt1=$(cat /var/tmp/bbb-kms-last-restart.txt)
t1=`date --date="$dt1" +%s`
# Current seconds since epoch
dt2=`date +%Y-%m-%d\ %H:%M:%S`
t2=`date --date="$dt2" +%s`
# Hours since last restart
let "tDiff=$t2-$t1"
let "hDiff=$tDiff/3600"
if [ "$hDiff" -ge 24 ]; then
systemctl restart kurento-media-server bbb-webrtc-sfu $RESTART_OPTS
date +%Y-%m-%d\ %H:%M:%S > /var/tmp/bbb-kms-last-restart.txt
fi
fi

View File

@ -1,7 +1,7 @@
[Unit] [Unit]
Description=BigBlueButton WebRTC SFU Description=BigBlueButton WebRTC SFU
Wants=redis-server.service Wants=redis-server.service
After=syslog.target network.target freeswitch.service bbb-webrtc-recorder.service kurento-media-server.service redis-server.service After=syslog.target network.target freeswitch.service bbb-webrtc-recorder.service redis-server.service
PartOf=bigbluebutton.target PartOf=bigbluebutton.target
[Service] [Service]

View File

@ -1,5 +1,3 @@
#!/bin/bash -e #!/bin/bash -e
stopService bbb-webrtc-sfu || echo "bbb-webrtc-sfu could not be registered or started" stopService bbb-webrtc-sfu || echo "bbb-webrtc-sfu could not be registered or started"
stopService kurento-media-server || echo "kurento-media-server could not be registered or started"

View File

@ -50,8 +50,6 @@ cp webrtc-sfu.nginx staging/usr/share/bigbluebutton/nginx
cp bbb-webrtc-sfu.service staging/usr/lib/systemd/system cp bbb-webrtc-sfu.service staging/usr/lib/systemd/system
cp bbb-webrtc-sfu.logrotate staging/etc/logrotate.d cp bbb-webrtc-sfu.logrotate staging/etc/logrotate.d
cp bbb-restart-kms staging/etc/cron.hourly
cp kurento-media-server.service staging/usr/lib/systemd/system
rm -rf staging/usr/local/bigbluebutton/bbb-webrtc-sfu/.git rm -rf staging/usr/local/bigbluebutton/bbb-webrtc-sfu/.git
. ./opts-$DISTRO.sh . ./opts-$DISTRO.sh

View File

@ -1,20 +0,0 @@
[Unit]
Description=Kurento Media Server daemon
After=network.target
PartOf=bigbluebutton.target
[Service]
UMask=0002
Environment=KURENTO_LOGS_PATH=/var/log/kurento-media-server
User=kurento
Group=kurento
LimitNOFILE=1000000
ExecStartPre=-/bin/rm -f /var/kurento/.cache/gstreamer-1.5/registry.x86_64.bin
ExecStart=/usr/bin/kurento-media-server --gst-debug-level=3 --gst-debug="3,Kurento*:4,kms*:4,KurentoWebSocketTransport:5"
Type=simple
PIDFile=/var/run/kurento-media-server.pid
Restart=always
[Install]
WantedBy=multi-user.target bigbluebutton.target

View File

@ -1,3 +0,0 @@
. ./opts-global.sh
OPTS="$OPTS -t deb -d git-core,nginx,kurento-media-server,openh264-gst-plugins-bad-1.5,bbb-apps-akka,nodejs,npm,build-essential,xmlstarlet,bbb-webrtc-recorder"

View File

@ -0,0 +1,3 @@
. ./opts-global.sh
OPTS="$OPTS -t deb -d git-core,nginx,openh264-gst-plugins-bad-1.5,bbb-apps-akka,nodejs,npm,build-essential,xmlstarlet,bbb-webrtc-recorder"

View File

@ -42,7 +42,7 @@ else
VERSION="${VERSION_NUMBER}~${VERSION_ADDON}+${COMMIT_DATE}-git.${GIT_REV}" VERSION="${VERSION_NUMBER}~${VERSION_ADDON}+${COMMIT_DATE}-git.${GIT_REV}"
fi fi
DISTRO=focal DISTRO=jammy
CACHE_DIR="/root/" CACHE_DIR="/root/"
mkdir -p "$CACHE_DIR" mkdir -p "$CACHE_DIR"

View File

@ -176,8 +176,6 @@ redis_host = props['redis_host']
redis_port = props['redis_port'] redis_port = props['redis_port']
redis_password = props['redis_password'] redis_password = props['redis_password']
presentation_dir = props['raw_presentation_src'] presentation_dir = props['raw_presentation_src']
kurento_video_dir = props['kurento_video_src']
kurento_screenshare_dir = props['kurento_screenshare_src']
mediasoup_video_dir = props['mediasoup_video_src'] mediasoup_video_dir = props['mediasoup_video_src']
mediasoup_screenshare_dir = props['mediasoup_screenshare_src'] mediasoup_screenshare_dir = props['mediasoup_screenshare_src']
webrtc_recorder_video_dir = props['webrtc_recorder_video_src'] webrtc_recorder_video_dir = props['webrtc_recorder_video_src']
@ -206,9 +204,6 @@ archive_audio(meeting_id, audio_dir, raw_archive_dir)
archive_notes(meeting_id, notes_endpoint, notes_formats, raw_archive_dir) archive_notes(meeting_id, notes_endpoint, notes_formats, raw_archive_dir)
# Presentation files # Presentation files
archive_directory("#{presentation_dir}/#{meeting_id}/#{meeting_id}", "#{target_dir}/presentation") archive_directory("#{presentation_dir}/#{meeting_id}/#{meeting_id}", "#{target_dir}/presentation")
# Kurento media
archive_directory("#{kurento_screenshare_dir}/#{meeting_id}", "#{target_dir}/deskshare")
archive_directory("#{kurento_video_dir}/#{meeting_id}", "#{target_dir}/video/#{meeting_id}")
# mediasoup media # mediasoup media
archive_directory("#{mediasoup_screenshare_dir}/#{meeting_id}", "#{target_dir}/deskshare") archive_directory("#{mediasoup_screenshare_dir}/#{meeting_id}", "#{target_dir}/deskshare")
archive_directory("#{mediasoup_video_dir}/#{meeting_id}", "#{target_dir}/video/#{meeting_id}") archive_directory("#{mediasoup_video_dir}/#{meeting_id}", "#{target_dir}/video/#{meeting_id}")
@ -221,9 +216,6 @@ if break_timestamp.nil?
BigBlueButton.logger.info('Deleting originals of archived media files.') BigBlueButton.logger.info('Deleting originals of archived media files.')
# FreeSWITCH Audio files # FreeSWITCH Audio files
delete_audio(meeting_id, audio_dir) delete_audio(meeting_id, audio_dir)
# Kurento media
FileUtils.rm_rf("#{kurento_screenshare_dir}/#{meeting_id}")
FileUtils.rm_rf("#{kurento_video_dir}/#{meeting_id}")
# mediasoup media # mediasoup media
FileUtils.rm_rf("#{mediasoup_screenshare_dir}/#{meeting_id}") FileUtils.rm_rf("#{mediasoup_screenshare_dir}/#{meeting_id}")
FileUtils.rm_rf("#{mediasoup_video_dir}/#{meeting_id}") FileUtils.rm_rf("#{mediasoup_video_dir}/#{meeting_id}")

View File

@ -1,7 +1,5 @@
bbb_version: '2.6.1' bbb_version: '2.6.1'
raw_audio_src: /var/freeswitch/meetings raw_audio_src: /var/freeswitch/meetings
kurento_video_src: /var/kurento/recordings
kurento_screenshare_src: /var/kurento/screenshare
mediasoup_video_src: /var/mediasoup/recordings mediasoup_video_src: /var/mediasoup/recordings
mediasoup_screenshare_src: /var/mediasoup/screenshare mediasoup_screenshare_src: /var/mediasoup/screenshare
webrtc_recorder_video_src: /var/lib/bbb-webrtc-recorder/recordings webrtc_recorder_video_src: /var/lib/bbb-webrtc-recorder/recordings