OK, I tried the lazy way and failed, so i tried the long run .. but failed again.
I will show you MY way and maybe someone is willing to help (or immediately knows what my error is.
Ich suche zur Not auch deutschsprachigen kommerziellen Support um das zum Laufen zu bekommen.
********************************************************************************
4 Machines with enough ressources:
Basic Install Ubuntu 16.04 LTS for BBB, Greenlight and 18.04 LTS for scaler
2 running instances of BBB
Hostnames: bbb1, bbb2
DNS-Names:
tele.domain.com,
tele2.domain.com
1 host für greenlight:
Hostname: conf
1 host for the scalelite/redis/postgrsql stuff:
Hostname: scaler
DNS-Name for IP:
scaler.domain.com******************************************************************************
Following the first step - setup of NFS:
On bbb1,bbb2:
# Create a new group with GID 2000
groupadd -g 2000 scalelite-spool
# Add the bigbluebutton user to the group
usermod -a -G scalelite-spool bigbluebuttonOn scaler:
sudo apt install nfs-kernel-server
vi /etc/exportsadd line: /mnt/scalelite-recordings *(rw,sync,no_root_squash)
# Create the spool directory for recording transfer from BigBlueButton
mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/spool
chown 1000:2000 /mnt/scalelite-recordings/var/bigbluebutton/spool
chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/spool
# Create the temporary (working) directory for recording import
mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/recording/scalelite
chown 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/recording/scalelite
chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/recording/scalelite
# Create the directory for published recordings
mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/published
chown 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/published
chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/published
# Create the directory for unpublished recordings
mkdir -p /mnt/scalelite-recordings/var/bigbluebutton/unpublished
chown 1000:1000 /mnt/scalelite-recordings/var/bigbluebutton/unpublished
chmod 0775 /mnt/scalelite-recordings/var/bigbluebutton/unpublished
sudo systemctl start nfs-kernel-server.serviceAt this point NFS should be complete except configuring recording importer***************
Postgres installation
***************
sudo apt-get install postgresql postgresql-contrib We need a user and a DB so:
su postgres
createuser scalelite
createdb scaleliteQUESTION: Do I need to setup this user with a password?( I dont think so because we run a localhost installation)In postesql.conf die listen adressen freigeben
vi /etc/postgresql/10/main/postgresql.conflisten_addresses = ‘*'
vi /etc/postgresql/10/main/postgresql.confhost scalelite scalelite
172.18.0.2/32 trust
host scalelite scalelite
172.18.0.3/32 trust
*************
Setup redis
*************
I found a document about the redis installation but again I am uncertain what to do.
I can install and autoenable redis using the below commands (it will *NOT* work from default repository for unknown reason)
sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt -install redis-server
sudo systemctl enable redis-server.service I did configure Redis by editing
vi redis.confbind 127.0.0.1 ::1
supervised systemd
After that redis-server starts:
root@scaler:/usr/local/bin# sudo systemctl status redis-server● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-08-23 21:50:07 UTC; 18min ago
Docs:
http://redis.io/documentation,
man:redis-server(1)
Main PID: 4834 (redis-server)
Tasks: 5 (limit: 4622)
CGroup: /system.slice/redis-server.service
└─4834 /usr/bin/redis-server
127.0.0.1:6379Aug 23 21:50:07 scaler systemd[1]: Starting Advanced key-value store...
Aug 23 21:50:08 scaler systemd[1]: Started Advanced key-value store.
But then there are these 2 points mentioned within the linked pdf:
You
can easily install Redis using docker allowing access only from
Scalelite docker network and enabling persistence on your Redis server:
First create Redis’s .env file /etc/default/redis
vi /etc/default/redis
with content of:
REDIS_DATA_DIR=/mnt/redis
Then run the docker container:
/usr/bin/docker
run --name redis --env-file /etc/default/redis --network scalelite
--hostname redis -v ${REDIS_DATA_DIR}:/data redis redis-server
--appendonly yes
This will save alot of time you would have spent why Redis is not persisting the servers you configure on Scalelite.
Set the redis_url in Scalelite env file /etc/default/scalelite:
REDIS_URL=redis://redis
Question: Do I need to do all the steps to start redis-server.service or do I ONLY need the /usr/bin/docker run ... ?However, after a reboot i get this:
CONTAINER
ID IMAGE COMMAND
CREATED STATUS PORTS NAMES
f7f8e3479162
redis "docker-entrypoint.s…" 13 minutes ago
Created redis
IS this correct? I dont know... Because if i do:
/usr/bin/docker
run --name redis --env-file /etc/default/redis-server --network
scalelite --hostname redis -v ${REDIS_DATA_DIR}:/data redis redis-server
--appendonly yes
docker: Error response from daemon:
Conflict. The container name "/redis" is already in use by container
"f7f8e3479162026c7492fbed3d054173ee8ccbf306634263b7ccadfdc8be8b5c". You
have to remove (or rename) that container to be able to reuse that name.
The next step within the manual is to install the scalelite-docker containers.
At first create the network:
docker network create scalelite
create the /etc/default/scalelite file:
vi /etc/default/scaleliteURL_HOST=
scaler.domain.comSECRET_KEY_BASE=xxxxx
LOADBALANCER_SECRET=yyyyy
DATABASE_URL=postgresql://
127.0.0.1:5432REDIS_URL=redis://redis
SCALELITE_TAG=v1
SCALELITE_RECORDING_DIR=/mnt/scalelite-recordings/var/bigbluebutton
NGINX_SSL=true
SCALELITE_NGINX_EXTRA_OPTS=--mount type=bind,source=/etc/letsencrypt,target=/etc/nginx/ssl,readonly
******************************************
Getting nginx to obtain SSL certificates:
apt install nginx
apt install letsencrypt
apt install certbotsudo mkdir -p /etc/nginx/sslsudo certbot --webroot -w /var/www/html/ -d scaler.domain.com certonly --agree-tos --email hostm...@domain.com --no-eff-emailSaving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
scaler.domain.comUsing the webroot path /var/www/html for all unmatched domains.
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/
scaler.domain.com/fullchain.pem Your key file has been saved at:
/etc/letsencrypt/live/
scaler.domain.com/privkey.pem Your cert will expire on 2020-11-21. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
Afterwards remove nginx:
apt-get remove nginx nginx-common *****************************************************************
Scalelite Container configuration:
Next
you should Create a file /etc/systemd/system/scalelite.target with the
content found in the scalelite.target file. This unit is a helper to
allow starting and stopping all of the Scalelite containers together.
vi /etc/systemd/system/scalelite.target[Unit]
Description=Scalelite
[Install]
WantedBy=multi-user.target
And enable the target by running:
systemctl enable scalelite.targetCreated symlink /etc/systemd/system/multi-user.target.wants/scalelite.target → /etc/systemd/system/scalelite.target.
************************************
Create a systemd unit file /etc/systemd/system/scalelite-api.service with the content found in the scalelite-api.service file.
vi /etc/systemd/system/scalelite-api.service<snipped>
And enable it by running:
systemctl enable scalelite-api.serviceCreated symlink /etc/systemd/system/scalelite.target.wants/scalelite-api.service → /etc/systemd/system/scalelite-api.service.
*************************************
Create
a systemd unit file /etc/systemd/system/scalelite-nginx.service with
the content found in the scalelite-nginx.service file.
vi /etc/systemd/system/scalelite-nginx.service<snipped>
And enable it by running systemctl
Created
symlink
/etc/systemd/system/scalelite.target.wants/scalelite-nginx.service →
/etc/systemd/system/scalelite-nginx.service.
*************************************
You can now restart all scalelite services by running
systemctl restart scalelite.targetAfterwards, check the status with
systemctl status scalelite-api.service scalelite-nginx.service
to verify that the containers started correctly:
This is my output:root@scaler:/home/it# systemctl status scalelite-api.service scalelite-nginx.service
● scalelite-api.service - Scalelite API
Loaded: loaded (/etc/systemd/system/scalelite-api.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-08-23 23:18:00 UTC; 1min 29s ago
Process: 3051 ExecStartPre=/usr/bin/docker pull blindsidenetwks/scalelite:${SCALELITE_TAG}-api (code=exited, status=0/SUCCESS)
Process: 3042 ExecStartPre=/usr/bin/docker rm scalelite-api (code=exited, status=1/FAILURE)
Process: 3017 ExecStartPre=/usr/bin/docker kill scalelite-api (code=exited, status=1/FAILURE)
Main PID: 3071 (docker)
Tasks: 10 (limit: 4622)
CGroup: /system.slice/scalelite-api.service
└─3071 /usr/bin/docker run --name scalelite-api --env-file
/etc/default/scalelite --network scalelite --mount type=bind,source
Aug 23 23:18:00 scaler docker[3051]: Digest: sha256:90449bc6793c643e4fabdc148ecf4d7af13039d59927974b40691d04acf0fd32
Aug 23 23:18:00 scaler docker[3051]: Status: Image is up to date for blindsidenetwks/scalelite:v1-api
Aug 23 23:18:00 scaler docker[3051]:
docker.io/blindsidenetwks/scalelite:v1-apiAug 23 23:18:00 scaler systemd[1]: Started Scalelite API.
Aug 23 23:18:05 scaler docker[3071]: Puma starting in single mode...
Aug 23 23:18:05 scaler docker[3071]: * Version 4.3.5 (ruby 2.6.6-p146), codename: Mysterious Traveller
Aug 23 23:18:05 scaler docker[3071]: * Min threads: 5, max threads: 5
Aug 23 23:18:05 scaler docker[3071]: * Environment: production
Aug 23 23:18:10 scaler docker[3071]: * Listening on tcp://
0.0.0.0:3000Aug 23 23:18:10 scaler docker[3071]: Use Ctrl-C to stop
● scalelite-nginx.service - Scalelite Nginx
Loaded: loaded (/etc/systemd/system/scalelite-nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-08-23 23:18:01 UTC; 1min 27s ago
Process: 3115 ExecStartPre=/usr/bin/docker pull
blindsidenetwks/scalelite:${SCALELITE_TAG}-nginx (code=exited,
status=0/SUCCESS)
Process: 3106 ExecStartPre=/usr/bin/docker rm scalelite-nginx (code=exited, status=1/FAILURE)
Process: 3072 ExecStartPre=/usr/bin/docker kill scalelite-nginx (code=exited, status=1/FAILURE)
Main PID: 3195 (docker)
Tasks: 10 (limit: 4622)
CGroup: /system.slice/scalelite-nginx.service
└─3195 /usr/bin/docker run --name scalelite-nginx --env-file
/etc/default/scalelite --network scalelite --publish 80:80 --publ
Aug 23 23:18:01 scaler docker[3115]: v1-nginx: Pulling from blindsidenetwks/scalelite
Aug 23 23:18:01 scaler docker[3115]: Digest: sha256:fb80a8288b7a9d4b99daf938761d367f071621915ab696cb36e110be43e9c693
Aug 23 23:18:01 scaler docker[3115]: Status: Image is up to date for blindsidenetwks/scalelite:v1-nginx
Aug 23 23:18:01 scaler docker[3115]:
docker.io/blindsidenetwks/scalelite:v1-nginxAug 23 23:18:01 scaler systemd[1]: Started Scalelite Nginx.
Aug 23 23:18:04 scaler docker[3195]: Startup script was run as init, re-execing using tini.
Aug 23 23:18:04 scaler docker[3195]: Generating templated nginx configuration...
Aug 23 23:18:04 scaler docker[3195]: Using SSL configuration template.
Aug 23 23:18:05 scaler docker[3195]: Starting nginx periodic reload process...
Aug 23 23:18:05 scaler docker[3195]: Starting nginx...
******************
***************
On firt run I should initiliace the database, it looks like that failed:
root@scaler:/home/it# docker exec -it scalelite-api bin/rake db:setup
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
Couldn't create 'scalelite' database. Please check your configuration.
rake aborted!
PG::ConnectionBad: could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
/srv/scalelite/vendor/bundle/ruby/2.6.0/gems/pg-1.2.2/lib/pg.rb:58:in `initialize'
****
snipped many more of these gems... messages
*****
/railties/databases.rake:39:in `block (2 levels) in <main>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create
(See full trace by running task with --trace)
BUT If i open a browser on https://scaler.domain.com<response>
<returncode>SUCCESS</returncode>
<version>2.0</version>
<build>v1.0.5</build>
</response>
Adding a server:
docker exec -i scalelite-api bundle exec rake servers:add[
https://tele1.domain.com/bigbluebutton/api/,<long ----- secret>]
rake aborted!
Name does not resolve
/srv/scalelite/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/connection/hiredis.rb:19:in `connect'
/srv/scalelite/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/connection/hiredis.rb:19:in `connect'
*** snipped****
/srv/scalelite/lib/tasks/servers.rake:33:in `block (2 levels) in <main>'
/srv/scalelite/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
/usr/bin/bundle:23:in `load'
/usr/bin/bundle:23:in `<main>'
Tasks: TOP => servers:add
(See full trace by running task with --trace)
Well, I am stucked right now and dont know where to look at.