Repository navigation
feat(akka-apps): read secret, service URLs and database hosts from the environment - #26171
Conversation
…e environment
Use the HOCON ${?VAR} style of http.interface/port for services.sharedSecret
(SHARED_SECRET), services.bbbWebAPI (BBB_WEB_API), services.graphqlMiddlewareAPI
(GRAPHQL_MIDDLEWARE_API), redis.host (REDIS_HOST) and postgres serverName/password
(POSTGRES_HOST, POSTGRES_PASSWORD). Unset variables change nothing, and
/etc/bigbluebutton/bbb-apps-akka.conf still overrides them.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 4
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The rest checked out: the one-line form survives every consumer I could find - the |
|
Align the precedence with #26170 and the components that already read env today (webhooks, webrtc-sfu, webrtc-recorder, livekit): environment above the operator file, not below it. As written, SHARED_SECRET et al. are dead on any install where /etc/bigbluebutton/bbb-apps-akka.conf sets the same keys - which is every package install, since the preinst writes that file - while bbb-web after #26170 honors the env var in the same situation; a deployment setting the secret by env for both services ends up with a checksum mismatch. Smallest fix: extend the heredoc in akka-bbb-apps/src/debian/DEBIAN/preinst (the services block it writes) with the same optional substitutions after the literals, e.g. |
The services block that preinst writes to /etc/bigbluebutton/bbb-apps-akka.conf
now ends each line with the optional substitution (bbbWebAPI=${?BBB_WEB_API},
sharedSecret=${?SHARED_SECRET}), so a set variable wins over the file while the
file keeps its values otherwise. Also read redis.password from REDIS_PASSWORD.
Only fresh installs get the new lines; existing files are not rewritten.
The sharedSecret line that preinst writes now ends with
", sharedSecret=${?SHARED_SECRET}". Take the value after the first "="
and stop at the comma, so the script prints the secret again.
|
Thanks for the review, both points make sense. |
|
Re-checked the new head against the packaging consumers rather than the PR description: the changeme detectors in bbb-config/after-install.sh and bbb-conf still print the bare literal on the combined lines, the --setsecret/--setip seds rewrite only the quoted literal and leave the |
✅ Automated tests have passed! |
3ca4602
into
bigbluebutton:v4.1.x-develop
akka-apps can now take its shared secret, service URLs and database hosts from environment variables, using optional HOCON substitutions like the existing
http.interface = ${?INTERFACE}.Change
services.sharedSecret(SHARED_SECRET),services.bbbWebAPI(BBB_WEB_API),services.graphqlMiddlewareAPI(GRAPHQL_MIDDLEWARE_API).redis.host(REDIS_HOST),redis.password(REDIS_PASSWORD),postgres.properties.serverName(POSTGRES_HOST) andpostgres.properties.password(POSTGRES_PASSWORD)./etc/bigbluebutton/bbb-apps-akka.conf: theservicesblock thatpreinstwrites there ends each line with the same optional substitution.Package installs
${?VAR}drops the assignment, so the resolved config is the same as before, with and without the/etcoverride file.bbbWebAPIandsharedSecretuse the one-line formkey = "default", key = ${?VAR}, so the grep/sed inbbb-config/after-install.sh,bbb-conf(--setsecret,--setip) and the packagepreinstgive the same output as before.bigbluebutton-tests/gns3/testcreds.shnow stops at the comma.Tested
env -i, alone and with an override file aspreinstwrites it: identical.Question
after-install.shandpreinst(for example on^\s*sharedSecret\s*=\s*") and use the plain two-line form; that is a larger packaging change.Image follow-up: v4.1.x-develop...tibroc:bigbluebutton:images/akka-apps-env, which removes the image's own
/etc/bigbluebutton/bbb-apps-akka.confthat only adds these${?VAR}lines. Images: #26141.Details
changemecheck still printschangeme, and itssed -istill replaces the quoted value.after-install.sh:79prints every line that containssharedSecret. Any second line or comment with that key name inapplication.confmakes the output differ fromchangeme, and the secret sync is then skipped silently. That is why the new comment does not repeat the key names.