build-conf: Remove Kurento dependency; Run on Ubuntu 22.04
This commit is contained in:
parent
12baa96d21
commit
0fccb78ee1
@ -12,7 +12,7 @@ stages:
|
||||
|
||||
# define which docker image to use for builds
|
||||
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.
|
||||
# it then checks an API endpoint on the package server to find out for which of
|
||||
|
@ -13,7 +13,7 @@ We designed BigBlueButton for online learning, (though it can be used for many [
|
||||
* Group collaboration (many-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/).
|
||||
|
||||
|
@ -1 +1 @@
|
||||
BIGBLUEBUTTON_RELEASE=2.7.0-alpha.1
|
||||
BIGBLUEBUTTON_RELEASE=2.8.0-alpha.1
|
||||
|
@ -85,18 +85,6 @@ HERE
|
||||
# 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
|
||||
#
|
||||
@ -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() {
|
||||
#
|
||||
# This function is not called.
|
||||
@ -283,10 +146,6 @@ source /etc/bigbluebutton/bbb-conf/apply-lib.sh
|
||||
#enableHTML5ClientLog
|
||||
#enableUFWRules
|
||||
|
||||
#enableHTML5CameraQualityThresholds
|
||||
#enableHTML5WebcamPagination
|
||||
|
||||
#enableMultipleKurentos
|
||||
|
||||
# Shorten the FreeSWITCH "you have been muted" and "you have been unmuted" prompts
|
||||
# cp -r /etc/bigbluebutton/bbb-conf/sounds /opt/freeswitch/share/freeswitch
|
||||
|
@ -440,19 +440,6 @@ display_bigbluebutton_status () {
|
||||
units="$units bbb-webrtc-recorder"
|
||||
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
|
||||
units="$units etherpad"
|
||||
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-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)
|
||||
touch $WEBRTC_SFU_ETC_CONFIG
|
||||
yq w -i $WEBRTC_SFU_ETC_CONFIG mediasoup.worker.rtcMinPort $START_PORT
|
||||
@ -1417,7 +1401,6 @@ if [ $CHECK ]; then
|
||||
echo "UDP port ranges"
|
||||
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 " 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-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-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/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/redis > /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/*
|
||||
fi
|
||||
|
||||
if [ -d /var/log/kurento-media-server ]; then
|
||||
rm -f /var/log/kurento-media-server/*
|
||||
fi
|
||||
|
||||
start_bigbluebutton
|
||||
check_state
|
||||
fi
|
||||
|
@ -40,9 +40,8 @@ fi
|
||||
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/
|
||||
|
||||
remove_stale_sfu_raw_files() {
|
||||
@ -55,7 +54,6 @@ remove_stale_sfu_raw_files() {
|
||||
done
|
||||
}
|
||||
|
||||
remove_stale_sfu_raw_files "$kurento_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 /var/log/bigbluebutton -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
|
||||
|
@ -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
|
||||
|
@ -214,7 +214,7 @@ fi
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
TOMCAT_SERVICE=tomcat
|
||||
else
|
||||
if grep -q focal /etc/lsb-release; then
|
||||
if grep -q jammy /etc/lsb-release; then
|
||||
TOMCAT_SERVICE=tomcat9
|
||||
fi
|
||||
fi
|
||||
|
@ -100,21 +100,6 @@ fi
|
||||
usermod bigbluebutton -a -G freeswitch
|
||||
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
|
||||
if [ -d /var/mediasoup ]; then
|
||||
chown bigbluebutton:bigbluebutton /var/mediasoup
|
||||
|
@ -2,5 +2,5 @@ after-install.sh
|
||||
bbb-export-annotations.service
|
||||
before-remove.sh
|
||||
build.sh
|
||||
opts-focal.sh
|
||||
opts-jammy.sh
|
||||
opts-global.sh
|
||||
|
@ -2,4 +2,4 @@ after-install.sh
|
||||
bbb-pads.service
|
||||
before-remove.sh
|
||||
build.sh
|
||||
opts-focal.sh
|
||||
opts-jammy.sh
|
||||
|
@ -3,5 +3,5 @@ bbb-webhooks.service
|
||||
before-install.sh
|
||||
before-remove.sh
|
||||
build.sh
|
||||
opts-focal.sh
|
||||
opts-jammy.sh
|
||||
webhooks.nginx
|
||||
|
@ -2,4 +2,4 @@ after-install.sh
|
||||
bbb-webrtc-recorder.service
|
||||
before-remove.sh
|
||||
build.sh
|
||||
opts-focal.sh
|
||||
opts-jammy.sh
|
||||
|
@ -1,11 +1,9 @@
|
||||
after-install.sh
|
||||
bbb-restart-kms
|
||||
bbb-webrtc-sfu.logrotate
|
||||
bbb-webrtc-sfu.service
|
||||
before-install.sh
|
||||
before-remove.sh
|
||||
build.sh
|
||||
kurento-media-server.service
|
||||
opts-focal.sh
|
||||
opts-jammy.sh
|
||||
opts-centos7.sh
|
||||
webrtc-sfu.nginx
|
||||
|
@ -10,11 +10,6 @@ case "$1" in
|
||||
cp /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.example.yml $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
|
||||
yq w -i $TARGET mediasoup.webrtc.listenIps[0].announcedIp "$IP"
|
||||
yq w -i $TARGET mediasoup.plainRtp.listenIp.announcedIp "$IP"
|
||||
@ -56,37 +51,11 @@ case "$1" in
|
||||
mkdir -p /var/mediasoup
|
||||
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
|
||||
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
|
||||
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"
|
||||
|
||||
;;
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
[Unit]
|
||||
Description=BigBlueButton WebRTC SFU
|
||||
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
|
||||
|
||||
[Service]
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
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"
|
||||
|
||||
|
@ -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.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
|
||||
|
||||
. ./opts-$DISTRO.sh
|
||||
|
@ -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
|
||||
|
@ -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"
|
3
build/packages-template/bbb-webrtc-sfu/opts-jammy.sh
Normal file
3
build/packages-template/bbb-webrtc-sfu/opts-jammy.sh
Normal 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"
|
@ -42,7 +42,7 @@ else
|
||||
VERSION="${VERSION_NUMBER}~${VERSION_ADDON}+${COMMIT_DATE}-git.${GIT_REV}"
|
||||
fi
|
||||
|
||||
DISTRO=focal
|
||||
DISTRO=jammy
|
||||
CACHE_DIR="/root/"
|
||||
mkdir -p "$CACHE_DIR"
|
||||
|
||||
|
@ -176,8 +176,6 @@ redis_host = props['redis_host']
|
||||
redis_port = props['redis_port']
|
||||
redis_password = props['redis_password']
|
||||
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_screenshare_dir = props['mediasoup_screenshare_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)
|
||||
# Presentation files
|
||||
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
|
||||
archive_directory("#{mediasoup_screenshare_dir}/#{meeting_id}", "#{target_dir}/deskshare")
|
||||
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.')
|
||||
# FreeSWITCH Audio files
|
||||
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
|
||||
FileUtils.rm_rf("#{mediasoup_screenshare_dir}/#{meeting_id}")
|
||||
FileUtils.rm_rf("#{mediasoup_video_dir}/#{meeting_id}")
|
||||
|
@ -1,7 +1,5 @@
|
||||
bbb_version: '2.6.1'
|
||||
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_screenshare_src: /var/mediasoup/screenshare
|
||||
webrtc_recorder_video_src: /var/lib/bbb-webrtc-recorder/recordings
|
||||
|
Loading…
Reference in New Issue
Block a user