blindsidenetworks / scalelite

Scalable load balancer for BigBlueButton.
GNU Affero General Public License v3.0
465 stars 249 forks source link

Updating the lazy installation, stuck on version 1.2.0.1 #900

Closed parreitu closed 1 year ago

parreitu commented 1 year ago

Since summer 2020 we have been using scalelite with the lazy installation. We have been using the version installed in July 2020 without any problems ( https://github.com/jfederico/scalelite-run/commit/6e8cb56a9f76c7ae8c581bda4a8c149c79171cf2?diff=split )

Now, when installing Moodle 4, we have stopped seeing the list of recordings of BigBlueButton sessions made from Moodle, and looking for the cause I found this link (https://groups.google.com/g/bigbluebutton-dev/c/FU8oFqhjADE/m/7-EGT8VBAQAJ), which points to the origin of the problem is that I am using a very old version of scalelite. That's right, I was using version 1.1.6

I started to update by modifying the value of the variable SCALELITE_TAG in the .env file and starting again through a "docker-compose up", and in 4 steps I have updated without problems to the version 1.2.0.1

SCALELITE_TAG=v1.1.7 SCALELITE_TAG=v1.1.8 SCALELITE_TAG=v1.2.2 SCALELITE_TAG=v1.2.0.1

The problem comes when I try to upgrade to version 1.3. When I start with a "docker-compose up" I get the error "/srv/scalelite is not writable" in the scalelite-api and scalelite-recording-importer docker containers.

I see that both the docker-compose.yml and the rest of the files in the https://github.com/jfederico/scalelite-run repository have changed quite a lot in these almost 3 years, and I would like to upgrade to the latest version, but I can't find any documentation on how to do it.

Is there any guide that shows the steps to upgrade between versions of the lazy installation ?

I would appreciate any advice you can give me.

Additional context

OS: Ubuntu 18.04.6 LTS Docker version 19.03.13, build 4484c46d9d docker-compose version 1.25.4, build 8d51620a

Docker Images:

blindsidenetwks/scalelite:v1.2.0.1-recording-importer blindsidenetwks/scalelite:v1.2.0.1-nginx blindsidenetwks/scalelite:v1.2.0.1-poller blindsidenetwks/scalelite:v1.2.0.1-api certbot/certbot redis:5.0-alpine postgres:11.5-alpine

JeanPluzo commented 1 year ago

Hi, as stated in the v1.2 release you should run a migration script. Have you done that?

Regards, J.

parreitu commented 1 year ago

Yes, I did it.

Thanks

parreitu commented 1 year ago

Hi @jfederico , any advice ?

jfederico commented 1 year ago

I think your issue with recordings is unrelated to Scalelite. More likely is an issue with the newest version of the plugin that now has its own model and needs to import the recording metadata from BBB. There is a known issue reported here https://tracker.moodle.org/browse/MDL-76339

But if your recordings are already in that state, you need to update the database either with the adhoc task or directly in the database.

Now the issue with the tag is a different story. You should be able to update the version just by changing the tag in the .env file

It all depends what script you have. The scalelite-run scripts based on docker compose are not versioned and have changed big time over time. You will be better off by pulling the latest version and adjust it to your needs.

We have plans to make the docker-compose deployment the official one (over the systemd deployment) but we have not come to advance the project at the level we need. That would be part of version 2.

parreitu commented 1 year ago

Hi ! I have solved the problem by upgrading to the latest version of scalelite-run. With this the old recordings have reappeared in our Moodle server (4.0.7 version), and also the new recordings are displayed without problems.

These are the steps I have taken to upgrade:

# Stop all containers
cd scalelite-run
docker-compose down
cd ..

# Make a backup
cp -Rf scalelite-run scalelite-run-orig

# Get the last version of lazy install
wget -c https://codeload.github.com/jfederico/scalelite-run/zip/refs/heads/master
mv master master.zip
unzip master.zip 

# Delete all content of the scalelite-run except the original .env
cd scalelite-run
rm -Rf *
rm -Rf .git*
mv .env .env-orig

# Move the last version files and folders to the scalelite-run folder
mv ../scalelite-run-master/* .
mv ../scalelite-run-master/.gitignore .
cp dotenv .env

# Change the .env parameters

nano .env

# copy certbot data folder from the backup
cp -Rf ../scalelite-run-orig/data/certbot /root/scalelite-run/data/

# Start 
docker-compose up
docker exec -t scalelite-api bundle exec rake db:migrate

# Add and enable BBB servers

docker exec -i scalelite-api bundle exec rake servers:add[https://bbb2.mydomain.eus/bigbluebutton/api/,XXXXXXXXXXXXXXXXXXXX]
docker exec -i scalelite-api bundle exec rake servers:enable[YYYYYYYYYYYYYYYYYYYYYYYYYYY]

Thanks @jfederico