blindsidenetworks / scalelite

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

Install Greenlight on Scalelite #990

Open thoschi opened 1 year ago

thoschi commented 1 year ago

Problem to solve: From load and logic the scalelite server seems a good place for the greenlight frontend. As scalelite acts like a bbb server this should be possible without problems. Anyway the install script does not work, as the necessary ports are occupied by the NGINX Docker Containe.

It might be possible to install Greenlight manually and fuzz with the container by hand. Anyway this seems to break the idea of a container based install of scalelite.

Purposed solution: Offer documentation or an install switch to allow installing the Greenlight container besides Scalelite without hacking the scalelite containers

Additional context: The easiest way to deploy some BBB infrastructure is to aquire some server ressources an install scalelite and bbb as suggested. This was a GREAT help to us during pandemic times as we had a complete infrastructure ready within less than a day. Now we are reducing the number of servers and the only constand will be the Scalelite-server. So this seems just the best place to host Greenlight too. There just seems to be no easy/well-documented way to get there.

Of course any hint is welcome too.

Thank you for this great project and best regards Thomas

JeanPluzo commented 1 year ago

Hi thoschi, we have the exact setup you're describing: SL with GL (and some other stuff). Since GL (v2/v3) is mainly setup with docker or docker compose, you could build your own docker-compose.yml file. This is what I've done, both for GLv2 and GLv3. BBB secret and all necessary settings can be included in a .env file. There's also a gl-install.sh script. This one I have not used, since I needed some customization for our servers, but it's worth taking a look at.

Regards, J.

thoschi commented 1 year ago

Hey J., thank you for your reply - I understand the general idea to install Greenlight, but the scalelite-nginx-container is listening on port 443 already.

So isn't it necessary to add a configuration to the running container at least or how did you solve the problem of the concurring services?

Thank you and best regards Thomas

thoschi commented 1 year ago

So just to add the solution I am working with now (nested nginx, hardly tested):

Anyway I wished, there would be an "officially documented way" how to do it that ideally works without nested nginx. But let's see if this works for now :-)

JeanPluzo commented 1 year ago

So isn't it necessary to add a configuration to the running container at least or how did you solve the problem of the concurring services?

Exactly. Take a look at the .env file. The file referenced by DOCKER_PROXY_NGINX_TEMPLATE is in scalelite/data/proxy/nginx. You can add your necessary configuration/customization to this file, save it, and restart the scalelite-prox container. In the GL docker-compose.yml file don't map port 80 to the outside world (ports: 127.0.0.1:5000:80). Instead expose port 80 only to localhost (expose: 80). Since the proxy container (nginx) will be communicating with the GL container through localhost, you don't really need to use port 443 or certificates. However, I just noticed I'm using scalelite-run, which you can find here.

Regards, J.