Automate PuppetDB reality backfill into NetBox #1

Open
opened 2026-08-05 19:42:19 +10:00 by unkinben · 1 comment
Owner

Problem

ci/puppetdb_backfill.py can only run in-cluster or locally: PuppetDB is unreachable from CI runners. The endpoint is http://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.py for prodnxsr0001-prodnxsr0013 and 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

## Problem `ci/puppetdb_backfill.py` can only run in-cluster or locally: PuppetDB is unreachable from CI runners. The endpoint is `http://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.py` for `prodnxsr0001`-`prodnxsr0013` and 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
Author
Owner

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.

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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/terraform-infra#1