Skip to content

Batch puppet config#144

Open
MirandaStreeter wants to merge 5 commits into
OpenVoxProject:mainfrom
MirandaStreeter:batch_puppet_config
Open

Batch puppet config#144
MirandaStreeter wants to merge 5 commits into
OpenVoxProject:mainfrom
MirandaStreeter:batch_puppet_config

Conversation

@MirandaStreeter

Copy link
Copy Markdown
Contributor

Short description

This replaces the various puppet config commands with a small helper library that takes the values and manipulates them directly via Puppet::Settings::IniFile, saving us a huge chunk of startup time.
Part of #139

At first I tried using a series of export <variable> for readability, but the entrypoint sequence modifies the results partway, and later entries rely on those modifications, of which they cannot inherent each other's environment. So instead we create a cache file and read/write from that.

In the future I strongly believe we should hardcode many of these values. The more immutable the better. :)

Checklist

I have:

Signed-off-by: Miranda Streeter <miranda@mirandastreeter.com>
Signed-off-by: Miranda Streeter <miranda@mirandastreeter.com>
rwaffen
rwaffen previously approved these changes Jun 18, 2026

@rwaffen rwaffen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but one question, but this shouldn't block the merge

Comment thread openvoxserver/files/usr/local/share/openvox/config_lib.sh
@rwaffen rwaffen added the enhancement New feature or request label Jun 18, 2026
rwaffen and others added 2 commits June 19, 2026 09:12
inifile.rb doesn't make any Puppet.* calls, we only need the Puppet::Settings namespace.
As a result we can stub it and speed up the INI manipulator significantly.

Signed-off-by: Miranda Streeter <miranda@mirandastreeter.com>
Comment thread openvoxserver/files/usr/local/share/openvox/config_lib.sh

if [ -n "${CERTNAME}" ]; then
puppet config set certname "$CERTNAME"
config_set main certname "$CERTNAME"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've now gone through all the variables, and this one in particular breaks. Running with CERTNAME=certname.example.com ends up silently missing.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the certificate's CN is correct, puppet.conf looks correct, but the value is stale within the cache and as a result healthcheck.sh fails with the wrong --cert value.

Comment thread openvoxserver/files/container-entrypoint.d/85-setup-storeconfigs.sh
I could always use dot-sourcing but that's just
not nearly as readable.

Signed-off-by: Miranda Streeter <miranda@mirandastreeter.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants