Files
rpmbuilder/rpms/puppet-initial
unkin-agent 11f70be98b
ci/woodpecker/push/deploy-fedora42 Pipeline was successful
ci/woodpecker/push/deploy-fedora44 Pipeline was successful
ci/woodpecker/push/deploy-almalinux8 Pipeline was successful
ci/woodpecker/push/deploy-almalinux9 Pipeline was successful
ci/woodpecker/push/deploy-fedora43 Pipeline was successful
ci: use container-rpmbuilder image (#186)
CI images move off the packer-images monorepo to semver-released container-* repos.

- run CI steps on docker-internal/rpmbuilder:0.1.0-<distro>
- build el9 packages from docker-internal/rpmbuilder:0.1.0-alma9

Reviewed-on: #186
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-09 22:25:11 +11:00
..

puppet-initial

A firstrun bootstrap script and oneshot systemd service that initialises a freshly-provisioned host into Puppet:

  1. Sets the FQDN under .main.unkin.net.
  2. Fetches the Puppet CA certificate from the CA service.
  3. Registers the node with a noop agent run against the CA.
  4. Runs the agent a few times against the compile master, then enables the puppet service and disables itself.

Puppet CA endpoint

The CA endpoint defaults to the in-cluster puppetserver CA service puppetca.k8s.syd1.au.unkin.net:8140 (serving the standard /puppet-ca/v1/certificate/ca API).

It is overridable via the environment. The puppet-initial.service unit reads /etc/sysconfig/puppet-initial (EnvironmentFile=-, so the file is optional), which the RPM ships as a commented %config(noreplace) example:

Variable Default Purpose
PUPPETCA_HOST puppetca.k8s.syd1.au.unkin.net CA hostname (CA cert fetch + --server for registration).
PUPPETCA_PORT 8140 CA API port.

Overriding from kickstart

A kickstart %post can point a host at a different CA without rebuilding the RPM by writing the sysconfig file before the service starts:

%post
cat > /etc/sysconfig/puppet-initial <<'EOF'
PUPPETCA_HOST=puppetca.k8s.syd1.au.unkin.net
PUPPETCA_PORT=8140
EOF