Skip to content

Instantly share code, notes, and snippets.

@mrhalix
Last active May 25, 2023 17:44
Show Gist options
  • Save mrhalix/ac1a33fe267a87e53a5dec861c9e9e4b to your computer and use it in GitHub Desktop.
Save mrhalix/ac1a33fe267a87e53a5dec861c9e9e4b to your computer and use it in GitHub Desktop.
Configure bigbluebuttons to send recordings to scalelite

Run this in bbb-server

SCALELITE_FQDN=scalelite.example.com

wget https://github.com/blindsidenetworks/scalelite/raw/master/bigbluebutton/scalelite_post_publish.rb -P /usr/local/bigbluebutton/core/scripts/post_publish

wget https://github.com/blindsidenetworks/scalelite/raw/master/bigbluebutton/scalelite.yml -P /usr/local/bigbluebutton/core/scripts
sed -i -E "s/^(spool_dir:).+/\1 bigbluebutton@$SCALELITE_FQDN:\/mnt\/scalelite-recordings\/var\/bigbluebutton\/spool/" /usr/local/bigbluebutton/core/scripts/scalelite.yml

mkdir -p /home/bigbluebutton/.ssh
ssh-keygen -t ed25519 -N '' -f /home/bigbluebutton/.ssh/scalelite
cat <<EOT >> /home/bigbluebutton/.ssh/config
Host $SCALELITE_FQDN
        User bigbluebutton
        IdentityFile ~/.ssh/scalelite
EOT
chown -R bigbluebutton:bigbluebutton /home/bigbluebutton
chmod -R 0700 /home/bigbluebutton/.ssh
addgroup scalelite-spool
adduser bigbluebutton scalelite-spool

echo "############### RUN THIS ON $SCALELITE_FQDN, sleeping 10 sec."
echo "echo '$(cat /home/bigbluebutton/.ssh/scalelite.pub)' >> /home/bigbluebutton/.ssh/authorized_keys"
echo "###############"

sleep 10

echo "###############"
echo "RUN THIS 1: su - bigbluebutton -s /bin/bash"
echo "ssh -o StrictHostKeyChecking=no $SCALELITE_FQDN"
echo "###############"

read -p "Do you want to upload old recordings? (yes/no): " choice
if [ "$choice" = "yes" ]; then
    echo 'installing gem dependencies'
    apt install ruby2.7-dev libsystemd-dev
    gem install redis builder nokogiri loofah open4 absolute_time journald-logger
    echo "Uploading Recordings..."
    wget https://github.com/blindsidenetworks/scalelite/raw/master/bigbluebutton/scalelite_batch_import.sh -P /usr/local/bigbluebutton/core/scripts
    chmod +x /usr/local/bigbluebutton/core/scripts/scalelite_batch_import.sh
    /usr/local/bigbluebutton/core/scripts/scalelite_batch_import.sh
else
    echo "Skipping upload old recordings."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment