Automate PuppetDB reality backfill into NetBox #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
ci/puppetdb_backfill.pycan only run in-cluster or locally: PuppetDB is unreachable from CI runners. The endpoint ishttp://puppetdb.puppet.svc.cluster.local:8080/pdb/query/v4/facts(no auth needed). This means NetBox reality data (serials, models, UUIDs, interfaces) for the existing fleet is not populated automatically.Proposal
Run the backfill as a Kubernetes CronJob (or a one-shot Job) inside the cluster. It should run
ci/puppetdb_backfill.pyforprodnxsr0001-prodnxsr0013and push serial, model, uuid, and interfaces (including MACs and overlay IPs) to the NetBox reality side.Acceptance
NetBox interfaces and inventory data are populated for the 13 existing hosts without requiring a reboot of any of them.
https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
Per Ben: the backfill should query pdbmux (the PuppetDB multiplexer) rather than PuppetDB directly — use pdbmux's endpoint/auth as the fact source for the reality backfill. See unkin/pdbmux for the API surface; node-lookup already consumes it and can serve as the client reference.