ILIAS-7-Install-Tutorial for Ubuntu 20.04

Scalelite - Loadbalancer

  • It is possible to use a vserver for this or an existing BBB server
  • I recomend a mid scale vserver for this

Written for: Ubuntu 18.04

Thanks to: https://jffederico.medium.com/scalelite-lazy-deployment-745a7be849f6

Ad a swap file (not recommended for vservers)

Install Docker

  • apt install apt-transport-https ca-certificates curl software-properties-common
  • apt install apt-transport-https ca-certificates curl software-properties-common
  • curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  • add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
  • apt update
  • apt install docker-ce

Install Docker Compose

  • curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
  • chmod +x /usr/local/bin/docker-compose

Installation

  • git clone https://github.com/jfederico/scalelite-run
  • cd scalelite-run
  • cp dotenv .env
  • nano .env
  • Change the following lines:
1
2
3
4
SECRET_KEY_BASE=BBBSecret
LOADBALANCER_SECRET=BBBsecret
URL_HOST=sl.bbs-ilias.de
NGINX_SSL=true

I use for every server the same secret. That may be a security issue but it works for now. Dünnes Eis. 

  • Get letsencrypt cert: ./init-letsencrypt.sh
  • Start service: docker-compose up -d
  • Initialize the database: docker exec -i scalelite-api bundle exec rake db:setup

Configuration

  • cd /root/scalelite-run
  • Check server status: docker exec -i scalelite-api bundle exec rake status
  • Show list of servers with load index: docker exec -i scalelite-api bundle exec rake servers
  • Add a server: 
    • docker exec -i scalelite-api bundle exec rake servers:add[https://bbb1.example.com/bigbluebutton/api/,bbb-secret,1]
      • The last value 1 means: Load multiplier is 1
    • After that, an ID is shown. Use it for the following command:docker exec -i scalelite-api bundle exec rake servers:enable[...id...]
  • Remove a Server:
    • Get a server out of the pool: docker exec -i scalelite-api bundle exec rake servers:panic[...id...]
    • Remove a server: docker exec -i scalelite-api bundle exec rake servers:remove[...id...]

Use the server in ILIAS

  • For the IILIAS-BBB plugins we do not use ../api/
  • MultiVC does not seem to work well with Scalelite
  • URL: 
    • Public URL: https://scalelite.example.com/bigbluebutton/
    • Private URL: https://scalelite.example.com/bigbluebutton/
  • Secret: LOADBALANCER_SECRET

Options

  • Start:
    • Normal: docker-compose up -d
    • With log output: docker-compose up
  • Stop: docker-compose down 
  • Status: docker exec -i scalelite-api bundle exec rake status
  • Logfiles:
    • docker logs scalelite-api
    • ..?

Enable recordings

https://jffederico.medium.com/scalelite-lazy-deployment-part-ii-ca3e4bf82f8d

Monitoring

  • If you perform this script below, a html file will be created in /opt/scripts/sload/slload.html
  • apt install txt2html
  • Crontab line: */1 *   * * *   root    /opt/scripts/slload.sh > /dev/null 2>&1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash
path=/opt/scripts/slload
refresh="<meta http-equiv="refresh" content="5" >"

for ((i=1;i<=30;i++));

do

docker exec -i scalelite-api bundle exec rake status > ${path}/slload.txt
txt2html --outfile ${path}/slload.html ${path}/slload.txt
echo ${refresh} >> ${path}/slload.html
#exit
sleep 2;

: $i;

done
  • Get the file via ssh in the webserver:
1
2
3
4
5
6
7
8
9
pass=123
port=22
user=root
host=vsl.kivinet.de
projectpath=/opt/scripts/slload
localpath=/var/www/html

echo ${projectpath}
sshpass -p "${pass}" rsync -av --rsh=ssh --progress -e "ssh -T -o Compression=no -x -p ${port}" ${user}@${host}:${projectpath} ${localpath}


No comment has been posted yet.