Skip to main content

Scale multiple Jibri recoding instance with Docker on Single VM


Scale multiple Jibri instance with Docker (2020 steps )

1. Requirements  

  • Any linux distrobution with Alsa/Pulseaudio support.
  • Proper Internet access.
  • Docker installed.
  • Required kernel module for playback interfaces
  • Valid SSL certificate for jitsi-web instance.

1.1 Install required module for the kernel

Keep in mind, after installation maybe required to reboot.

# install the module
apt update && apt install linux-image-extra-virtual
# configure 5 capture/playback interfaces
echo "options snd-aloop enable=1,1,1,1,1 index=0,1,2,3,4" > /etc/modprobe.d/alsa-loopback.conf
# setup autoload the module
echo "snd-aloop" >> /etc/modules
# check that the module is loaded
lsmod | grep snd_aloop

2. Deploy jitsi-meet stack.

 Prerequisite to  deploy whole jitsi meet based on official documentation, You should have working version of jitsi-meet stack with ability to record at least one session.

3. Scale Jibri instances

you can scale container of Jibri with following commands 

Let's assume we want to have 4 concurrent recording

docker-compose -f docker-compose.yml -f jibri.yml  up -d --scale jibri=4

Then you will see something like this:

root@test:~/docker-jitsi-meet# docker-compose -f docker-compose.yml -f jibri.yml  up -d --scale jibri=4
dockerjitsimeet_prosody_1 is up-to-date
dockerjitsimeet_web_1 is up-to-date
dockerjitsimeet_jicofo_1 is up-to-date
dockerjitsimeet_jvb_1 is up-to-date
Starting dockerjitsimeet_jibri_1 ... done
Creating dockerjitsimeet_jibri_2 ...
Creating dockerjitsimeet_jibri_3 ...
Creating dockerjitsimeet_jibri_4 ...
Creating dockerjitsimeet_jibri_2 ... done
Creating dockerjitsimeet_jibri_3 ... done
Creating dockerjitsimeet_jibri_4 ... done

Then you should **change the loopback device in /home/jibri/.asoundrc **

docker exec -t dockerjitsimeet_jibri_2 sed -i 's/Loopback/2/g' /home/jibri/.asoundrc
docker exec -t dockerjitsimeet_jibri_3 sed -i 's/Loopback/3/g' /home/jibri/.asoundrc
docker exec -t dockerjitsimeet_jibri_4 sed -i 's/Loopback/4/g' /home/jibri/.asoundrc

Now restart the containers:

docker stop dockerjitsimeet_jibri_{2,3,4}
docker start dockerjitsimeet_jibri_{2,3,4}z

Comments

Popular posts from this blog

how to install jibri recording server within a hour in ubuntu 16.04 (Xenial)

To configuring the jibri recording server from below easy steps  Note: Please put the more focus on highlighted line and words   :        Pre-requisite for jibri recording server  :         OS-VM:  Ubuntu 16.04 VMs on your cloud server (Azure,GC,AWS,Vultr, digitalOcean).         CPU: 2.0         RAM: 4 GB         SSD or HDD :20 GB Update the Ubuntu package   sudo -s apt update Allow to require ports  ufw status => “Active or inactive does not matter” ufw allow ssh ufw allow 80/tcp ufw allow 443/tcp ufw allow 10000:60000/tcp ufw allow 10000:60000/udp ufw allow 5222 ufw allow 5347 netstat -tunlp // list out the all open ports  Installing kernel modules apt -y install linux-image-extra-virtual uname -a  Note : After uname -a command  there are two possibilities A and B ....