Comments (7)
cc @schrd
from bbb-webrtc-sfu.
Doing some digging now.
Turns out there's an easy way to use override files with node-config in its latest version. I've updated the development
branch with the latest node-config version (see #84).
The approach is as follows:
- Set the
$NODE_CONFIG_DIR
environment variable for the service to point to all directories you wish to use as configuration directories. e.g.: $NODE_CONFIG_DIR="/etc/bigbluebutton/bbb-webrtc-sfu/:/usr/local/bigbluebutton/bbb-webrtc-sfu/config/"; - Add an override file in /etc/bigbluebutton/bbb-webrtc-sfu/ respecting node-config's file precedence (see https://github.com/lorenwest/node-config/wiki/Configuration-Files#file-load-order). Our current /usr/local/.../config/default.yml is the lowest precedence order, so anything that goes above it should work. I recommend using
production.yml
as the override file since it is the run environment the package uses AFAIK. So e.g.: /etc/bigbluebutton/bbb-webrtc-sfu/production.yml - When those are properly set, config merging is automagical.
Does that work for you?
from bbb-webrtc-sfu.
This would work. I'd prefer to have all config files in /etc/bigbluebutton
but this is a minor issue if bbb-webrtc-sfu has its own directory. I wonder if the fact that arrays are not merged but replaced might break this override mechanisms for setups with multiple kurentos (see https://github.com/lorenwest/node-config/wiki/Configuration-Files#arrays-are-merged-by-replacement).
The goal is to allow operators to change some configuration values and not having to copy all of the settings, so that developers could add new configuration options and ship defaults which then would be applied automatically. With the way array replacement works, this would IMHO not possible. A workaround would be to change the arrays into objects. One config setting that comes into my mind is the multiplekurentos option.
from bbb-webrtc-sfu.
The goal is to allow operators to change some configuration values and not having to copy all of the settings, so that developers could add new configuration options and ship defaults which then would be applied automatically. With the way array replacement works, this would IMHO not possible. A workaround would be to change the arrays into objects. One config setting that comes into my mind is the multiplekurentos option.
My 2cts is that's not really a problem, but a good thing. IMHO the fact that arrays are merged by replacement is safer than arbitrarily merging them according to a logic which might or might not be clear to the operator.
The operator will not need to copy all of the settings. The operator will need to use a named setting in the override as they would with any other setting. The array configs webrtc-sfu has are named at their root (eg modules:
, kurento:
). Member of the arrays are of the same object type, but unnamed. The arrays are not sorted, so fully merging (instead of replacing) would need to be positionally aware which would need the operator to keep track to any "ordering" changes to upstream configuration arrays, which is weird.
I have the same rationale about the HTML5 settings. Arrays should be replaced, not merged.
The example you give about spinning up multiple KMSs is a good one. A thought experiment:
Scenario 1:
- Upstream ships with default single KMS: kurento: [ kms-entry1 ]
- Operator overrides it with three KMSs: kurento: [ kms-entry1, kms-entry2, kms-entry3 ]. This array will be put in place of the default entirely, either with replacement or merging. Both work.
Scenario 2:
- Upstream turns its default to 3 KMS:
kurento: [ kms-entry1, kms-entry2, kms-entry3 ]
- Operator wants one of the following (which are all possible)
- Roll back to single Kurento:
- with replacement,
kurento: [ kms-entry1 ]
works (and makes sense) - with merging, how do we roll back to a single one?
- with replacement,
- Add a 4th Kurento instance to also handle
mediaType: main
(cameras) and split camera load in 2. This works (and I know for a fact it's a valid use case)- with replacement,
kurento: [ kms-entry1, kms-entry2, kms-entry3, kms-entry4 ]
works (and makes sense) - with merging: what does the operator need to do to add a fourth entry? If they put a single instance which is not in the original config (ie, kurento: [ kms-entry4 ], with the URL different than 1-3 and mediaType: main), the merging will not add a new one, but instead merge entry4 with entry1. The operator will end up having to do as they would with replacement.
- with replacement,
- Roll back to single Kurento:
from bbb-webrtc-sfu.
@schrd ping. Is this good or do you think I need to adjust something/find something else?
from bbb-webrtc-sfu.
@prlanzarin I think this works. You are right regarding the array configuration, replacing is better than merging.
from bbb-webrtc-sfu.
Ok, cool. I'll close this then. Anything else, just ping me.
from bbb-webrtc-sfu.
Related Issues (17)
- LiveKit media server HOT 1
- update(audio): make fullaudio module completely bidirectional HOT 2
- update(audio): create a separate redis channel for fullaudio module HOT 6
- Minor wiki documentation suggestions HOT 1
- bbb-webrtc-sfu: mediasoup routers are being leaked HOT 1
- Too many mediasoup-worker processes on beefy hardware by default. HOT 2
- Connection.js: FSESL connection received error (`EPIPE","errno":-32,"message"`) HOT 2
- Error: EACCES: permission denied, mkdir '/var/log/bbb-webrtc-sfu' HOT 1
- After being updated to mediasoup, the video cannot be used HOT 2
- Build error: mediasoup fails to build HOT 2
- MaxListenersExceededWarning. Possible EventEmitter memory leak detected HOT 2
- Missing 'S' of constant 'WEBSOCKET_MESAGE' HOT 1
- ROUND_ROBIN balancing strategy: make it production ready HOT 6
- v2.2.22 < v2.4.20 HOT 1
- memory leak detected HOT 1
- pegjs post-install script is failing with npm 7.x HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bbb-webrtc-sfu.