blindsidenetworks / scalelite

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

Poll & list BBB server version (if revealed) #1058

Closed Ithanil closed 2 months ago

Ithanil commented 2 months ago

This PR enables polling for the BBB version of registered servers (if they reveal it) and shows the result in all relevant outputs.

Description

When managing SL deployments with large server pools, it comes in handy to easily see which servers are running which version, directly from Scalelite. This is obviously useful in upgrade scenarios, but would also be handy when using the new server tags to differentiate between versions.

Of course administrators can achieve something similar by leveraging SSH + Bash scripting, but maybe not all admin want to expose their servers that way or put in the extra effort to write the scripts.

This feature was requested twice https://github.com/blindsidenetworks/scalelite/issues/793 https://github.com/blindsidenetworks/scalelite/issues/1021 .

TODO:

Testing Steps

Deployed with at least two BBB servers and only one revealed the version (see below).

"Screenshots"

$ rake poll:versions
D, [2024-04-09T11:07:29.818244 #174] DEBUG -- : Checking versions
D, [2024-04-09T11:07:29.929042 #174] DEBUG -- : Checking Version of id=bbb-xyz-1.net
D, [2024-04-09T11:07:29.929161 #174] DEBUG -- : Checking Version of id=bbb-xyz-2.net

$ rake status
    HOSTNAME     STATE   STATUS  MEETINGS  USERS  LARGEST MEETING  VIDEOS  LOAD   BBB VERSION    TAG 
 bbb-xyz-1.net  enabled  online  0         0      0                0        0.0  3.0.0-alpha.5       
 bbb-xyz-2.net  enabled  online  0         0      0                0        0.0                 test 

$ rake servers
id: bbb-xyz-1.net
    url: https://bbb-xyz-1.net/bigbluebutton/api
    secret: SECRET1
    enabled
    load: 0.0
    load multiplier: 1.0
    bbb version: 
    tag: test
    online
id: bbb-xyz-2.net
    url: https://bbb-xyz-2.net/bigbluebutton/api
    secret: SECRET2
    enabled
    load: 0.0
    load multiplier: 1.0
    bbb version: 3.0.0-alpha.5
    tag: 
    online

$ rake servers:yaml[verbose]
---
servers:
  bbb-xyz-1.net:
    url: https://bbb-xyz-1.net/bigbluebutton/api
    secret: SECRET1
    load_multiplier: 1.0
    tag: test
    enabled: true
    state: enabled
    load: 0.0
    bbb_version: ''
    online: true
  bbb-xyz-2.net:
    url: https://bbb-xyz-2.net/bigbluebutton/api
    secret: SECRET2
    load_multiplier: 1.0
    tag: ''
    enabled: true
    state: enabled
    load: 0.0
    bbb_version: 3.0.0-alpha.5
    online: true

Fixed Issues

https://github.com/blindsidenetworks/scalelite/issues/793 https://github.com/blindsidenetworks/scalelite/issues/1021

Other notes

Since this feature is only useful when one actively enables the corresponding setting in BBB, I thought about hiding it behind a configuration flag in Scalelite as well. But ultimately, I thought it's not worth the extra hassle and would hide the feature too much.

antobinary commented 2 months ago

Hi @Ithanil Thank you for this contribution!

hiding it behind a configuration flag in Scalelite

@farhatahmad What do you think about this part? Also does this implementation line up overall with your initial thoughts of how to do it?

farhatahmad commented 2 months ago

I don't think it needs to be behind a flag in SL if it's already behind a flag in BBB