v0.3.0 — rebrand: PXEForge → OpenPXE, Gated → Queued Deployment
Full rename to match the openpxe.com brand. The product now reads as a
polished open-source project rather than a personal-tool nickname:
the anvil/forge metaphor is gone, replaced with the rainbow-horizon
brand mark from the marketing site.
## Naming changes
**PXEForge → OpenPXE** everywhere it's user-visible or developer-
facing:
- All 8 crate package names (`pxeforge-*` → `openpxe-*`).
- The bin crate dir + binary (`crates/pxeforge` → `crates/openpxe`,
`bin = "openpxe"`).
- Env vars: `PXEFORGE_*` → `OPENPXE_*` (no compat shim — pre-beta).
- Tracing targets: `pxeforge::*` → `openpxe::*`.
- Prometheus metrics: `pxeforge_*` → `openpxe_*` (pre-beta; nobody
has dashboards on these yet).
- Container image: `gitea.milesward.dev/mward4/openpxe:0.3.0`.
- All in-tree paths: `/var/lib/openpxe/{isos,work,smb}`,
`/usr/share/openpxe/ipxe`, `/etc/openpxe/...`.
- Unraid template renamed `pxeforge.xml` → `openpxe.xml`.
- README, NEXT_PHASE.md, architecture.md, comments, and the WebUI
brand string.
**Gated Deployment → Queued Deployment** as the user-facing concept:
- `Settings::TimeoutAction::GatedDeployment` →
`QueuedDeployment` (with `#[serde(alias = "gated_deployment")]`
so v0.2.0 settings.json files keep deserializing).
- Rust types: `Gate` → `QueueEntry`, `GateQueue` → `DeploymentQueue`,
`GateInner` → `QueueEntryInner`.
- File: `crates/core/src/gate.rs` → `crates/core/src/queue.rs`.
- HTTP routes: `/api/gate/*` → `/api/queue/*`. The JSON list key
flipped from `"gates"` to `"entries"` to match.
- iPXE shortcut: `/boot/_gate.ipxe` → `/boot/_queue.ipxe`. The
top-level menu's item id is now `queue` instead of `gate`.
- WebUI sidebar tab: "Forge Gate" → "Queue".
- Field on `AppState`: `gates` → `queue`.
## Brand assets
The anvil + forging-sparks logos are dropped:
- `logo.svg` is now a 24×24 medallion filled with the
`rainbow-horizon` gradient from openpxe.com (sliding hue rotation
via SMIL on the gradient stops, no JS needed).
- `anvil-forge.svg` renamed to `loader.svg` and rebuilt as a 64×64
louder version of the same disc — used for page-load transitions
and the imaging-progress widget. Adds a subtle scale pulse and a
white inner-glow so it has dimensionality on either theme.
## CSS rename
- `.forge-progress` → `.queue-progress`
- `.forge-progress .anvil` → `.queue-progress .mark`
- `@keyframes forge-sheen` → `queue-sheen`
- `.loader .anvil` → `.loader .mark`
- "Heating the forge…" loader text → "Loading…"
The rest of the layout is untouched. Light/dark theme tokens and the
sidebar/topbar structure carry over from v0.2.0 unchanged — the
brief was "keeping the UI similar."
## Validation
- `cargo build --workspace` — clean.
- `cargo clippy --workspace --all-targets` — no warnings.
- `cargo test --workspace` — **66 tests passing**, same as v0.2.0.
- Local smoke run against the rebuilt release binary verifies:
- `/boot.ipxe` emits `Queued Deployment` + `item queue` + chains
`/boot/_queue.ipxe`
- `/api/queue` returns `{count, entries}`
- `/metrics` emits `openpxe_queue_count` (renamed)
- `/assets/logo.svg` and `/assets/loader.svg` serve the new
rainbow brand SVGs
- `/api/status` reports version `0.3.0`
## Migration notes for operators on v0.2.0
- Container image path changed: pull
`gitea.milesward.dev/mward4/openpxe:0.3.0` (not `pxeforge:`).
- Bind mounts: `/var/lib/openpxe/{isos,work,smb}` (not `pxeforge`).
Move the host path or update the template.
- Env vars: replace `PXEFORGE_*` with `OPENPXE_*`. The Unraid
template at `deploy/unraid/openpxe.xml` is already updated.
- `settings.json` carries over transparently — the
`gated_deployment` value is accepted as an alias.
- HTTP API: any external scripts that hit `/api/gate/*` need to
switch to `/api/queue/*`. The JSON envelope key is `entries`
instead of `gates`.
This commit is contained in:
+51
-51
@@ -1,21 +1,21 @@
|
||||
//! Tiny lock-free Prometheus-compatible metrics.
|
||||
//!
|
||||
//! We don't pull in `prometheus` or `metrics-rs` for this — they bring
|
||||
//! their own runtime, registry, and complexity. PXEForge has a fixed,
|
||||
//! their own runtime, registry, and complexity. OpenPXE has a fixed,
|
||||
//! tiny set of counters/gauges and the exposition format is plain text.
|
||||
//! A handful of `AtomicU64`s and a `Display` impl gets us everything
|
||||
//! Prometheus / Grafana / VictoriaMetrics needs to scrape:
|
||||
//!
|
||||
//! pxeforge_dhcp_replies_total counter (per arch label)
|
||||
//! pxeforge_tftp_transfers_total counter (per status label)
|
||||
//! pxeforge_tftp_bytes_total counter
|
||||
//! pxeforge_http_requests_total counter (per route label)
|
||||
//! pxeforge_iso_count gauge
|
||||
//! pxeforge_client_count gauge
|
||||
//! pxeforge_gate_count gauge
|
||||
//! pxeforge_gate_imaging gauge
|
||||
//! pxeforge_uptime_seconds gauge
|
||||
//! pxeforge_build_info{version} gauge (always 1)
|
||||
//! openpxe_dhcp_replies_total counter (per arch label)
|
||||
//! openpxe_tftp_transfers_total counter (per status label)
|
||||
//! openpxe_tftp_bytes_total counter
|
||||
//! openpxe_http_requests_total counter (per route label)
|
||||
//! openpxe_iso_count gauge
|
||||
//! openpxe_client_count gauge
|
||||
//! openpxe_queue_count gauge
|
||||
//! openpxe_queue_imaging gauge
|
||||
//! openpxe_uptime_seconds gauge
|
||||
//! openpxe_build_info{version} gauge (always 1)
|
||||
//!
|
||||
//! Cheap to clone — internal state is a couple of arcs. Counters use
|
||||
//! `Relaxed` ordering: we don't synchronise across counters, just need
|
||||
@@ -47,8 +47,8 @@ struct Inner {
|
||||
// Gauges (set explicitly; not cumulative)
|
||||
iso_count: AtomicU64,
|
||||
client_count: AtomicU64,
|
||||
gate_count: AtomicU64,
|
||||
gate_imaging: AtomicU64,
|
||||
queue_count: AtomicU64,
|
||||
queue_imaging: AtomicU64,
|
||||
nfs_mounts_active: AtomicU64,
|
||||
}
|
||||
|
||||
@@ -113,9 +113,9 @@ impl Metrics {
|
||||
self.inner.client_count.store(n, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
pub fn set_gate_counts(&self, total: u64, imaging: u64) {
|
||||
self.inner.gate_count.store(total, Ordering::Relaxed);
|
||||
self.inner.gate_imaging.store(imaging, Ordering::Relaxed);
|
||||
pub fn set_queue_counts(&self, total: u64, imaging: u64) {
|
||||
self.inner.queue_count.store(total, Ordering::Relaxed);
|
||||
self.inner.queue_imaging.store(imaging, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
pub fn set_nfs_active(&self, n: u64) {
|
||||
@@ -151,58 +151,58 @@ impl Metrics {
|
||||
};
|
||||
|
||||
// Counters with one HELP/TYPE per metric name and per-label rows.
|
||||
let _ = writeln!(out, "# HELP pxeforge_dhcp_replies_total Number of proxyDHCP replies sent, by client architecture.");
|
||||
let _ = writeln!(out, "# TYPE pxeforge_dhcp_replies_total counter");
|
||||
let _ = writeln!(out, "# HELP openpxe_dhcp_replies_total Number of proxyDHCP replies sent, by client architecture.");
|
||||
let _ = writeln!(out, "# TYPE openpxe_dhcp_replies_total counter");
|
||||
let _ = writeln!(
|
||||
out,
|
||||
"pxeforge_dhcp_replies_total{{arch=\"bios\"}} {}",
|
||||
"openpxe_dhcp_replies_total{{arch=\"bios\"}} {}",
|
||||
i.dhcp_replies_legacy.load(Ordering::Relaxed)
|
||||
);
|
||||
let _ = writeln!(
|
||||
out,
|
||||
"pxeforge_dhcp_replies_total{{arch=\"uefi\"}} {}",
|
||||
"openpxe_dhcp_replies_total{{arch=\"uefi\"}} {}",
|
||||
i.dhcp_replies_uefi.load(Ordering::Relaxed)
|
||||
);
|
||||
let _ = writeln!(
|
||||
out,
|
||||
"pxeforge_dhcp_replies_total{{arch=\"arm64\"}} {}",
|
||||
"openpxe_dhcp_replies_total{{arch=\"arm64\"}} {}",
|
||||
i.dhcp_replies_arm64.load(Ordering::Relaxed)
|
||||
);
|
||||
let _ = writeln!(
|
||||
out,
|
||||
"pxeforge_dhcp_replies_total{{arch=\"unknown\"}} {}",
|
||||
"openpxe_dhcp_replies_total{{arch=\"unknown\"}} {}",
|
||||
i.dhcp_replies_unknown.load(Ordering::Relaxed)
|
||||
);
|
||||
write_counter(
|
||||
&mut out,
|
||||
"pxeforge_dhcp_declined_total",
|
||||
"openpxe_dhcp_declined_total",
|
||||
"DHCP requests we saw but did not reply to (mac filter, arch unsupported, etc).",
|
||||
i.dhcp_declined.load(Ordering::Relaxed),
|
||||
"",
|
||||
);
|
||||
|
||||
let _ = writeln!(out, "# HELP pxeforge_tftp_transfers_total TFTP transfers, by status.");
|
||||
let _ = writeln!(out, "# TYPE pxeforge_tftp_transfers_total counter");
|
||||
let _ = writeln!(out, "# HELP openpxe_tftp_transfers_total TFTP transfers, by status.");
|
||||
let _ = writeln!(out, "# TYPE openpxe_tftp_transfers_total counter");
|
||||
let _ = writeln!(
|
||||
out,
|
||||
"pxeforge_tftp_transfers_total{{status=\"ok\"}} {}",
|
||||
"openpxe_tftp_transfers_total{{status=\"ok\"}} {}",
|
||||
i.tftp_transfers_ok.load(Ordering::Relaxed)
|
||||
);
|
||||
let _ = writeln!(
|
||||
out,
|
||||
"pxeforge_tftp_transfers_total{{status=\"err\"}} {}",
|
||||
"openpxe_tftp_transfers_total{{status=\"err\"}} {}",
|
||||
i.tftp_transfers_err.load(Ordering::Relaxed)
|
||||
);
|
||||
write_counter(
|
||||
&mut out,
|
||||
"pxeforge_tftp_bytes_total",
|
||||
"openpxe_tftp_bytes_total",
|
||||
"Total bytes successfully delivered over TFTP.",
|
||||
i.tftp_bytes.load(Ordering::Relaxed),
|
||||
"",
|
||||
);
|
||||
|
||||
let _ = writeln!(out, "# HELP pxeforge_http_requests_total HTTP requests served, by route family.");
|
||||
let _ = writeln!(out, "# TYPE pxeforge_http_requests_total counter");
|
||||
let _ = writeln!(out, "# HELP openpxe_http_requests_total HTTP requests served, by route family.");
|
||||
let _ = writeln!(out, "# TYPE openpxe_http_requests_total counter");
|
||||
for (label, counter) in [
|
||||
("boot_script", &i.http_boot_script),
|
||||
("iso_range", &i.http_iso_range),
|
||||
@@ -212,22 +212,22 @@ impl Metrics {
|
||||
] {
|
||||
let _ = writeln!(
|
||||
out,
|
||||
"pxeforge_http_requests_total{{route=\"{label}\"}} {}",
|
||||
"openpxe_http_requests_total{{route=\"{label}\"}} {}",
|
||||
counter.load(Ordering::Relaxed)
|
||||
);
|
||||
}
|
||||
|
||||
// Gauges.
|
||||
write_gauge(&mut out, "pxeforge_iso_count", "ISOs currently registered (local + NFS).", i.iso_count.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "pxeforge_client_count", "PXE clients seen this process lifetime.", i.client_count.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "pxeforge_gate_count", "Clients currently waiting at the deployment gate.", i.gate_count.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "pxeforge_gate_imaging", "Clients currently imaging (gate + assigned target).", i.gate_imaging.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "pxeforge_nfs_mounts_active", "NFS shares currently mounted.", i.nfs_mounts_active.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "pxeforge_uptime_seconds", "Seconds since this PXEForge instance started.", uptime_secs, "");
|
||||
write_gauge(&mut out, "openpxe_iso_count", "ISOs currently registered (local + NFS).", i.iso_count.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "openpxe_client_count", "PXE clients seen this process lifetime.", i.client_count.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "openpxe_queue_count", "Clients currently waiting at the deployment queue.", i.queue_count.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "openpxe_queue_imaging", "Clients currently imaging (queue + assigned target).", i.queue_imaging.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "openpxe_nfs_mounts_active", "NFS shares currently mounted.", i.nfs_mounts_active.load(Ordering::Relaxed), "");
|
||||
write_gauge(&mut out, "openpxe_uptime_seconds", "Seconds since this OpenPXE instance started.", uptime_secs, "");
|
||||
|
||||
let _ = writeln!(out, "# HELP pxeforge_build_info Build metadata. Always 1; the version is in the label.");
|
||||
let _ = writeln!(out, "# TYPE pxeforge_build_info gauge");
|
||||
let _ = writeln!(out, "pxeforge_build_info{{version=\"{version}\"}} 1");
|
||||
let _ = writeln!(out, "# HELP openpxe_build_info Build metadata. Always 1; the version is in the label.");
|
||||
let _ = writeln!(out, "# TYPE openpxe_build_info gauge");
|
||||
let _ = writeln!(out, "openpxe_build_info{{version=\"{version}\"}} 1");
|
||||
|
||||
out
|
||||
}
|
||||
@@ -259,16 +259,16 @@ mod tests {
|
||||
m.record_http(HttpRoute::Api);
|
||||
m.set_iso_count(3);
|
||||
let out = m.render("0.2.0", 42);
|
||||
assert_eq!(out.matches("# TYPE pxeforge_dhcp_replies_total counter").count(), 1);
|
||||
assert_eq!(out.matches("# TYPE pxeforge_iso_count gauge").count(), 1);
|
||||
assert!(out.contains("pxeforge_dhcp_replies_total{arch=\"uefi\"} 1"));
|
||||
assert!(out.contains("pxeforge_dhcp_replies_total{arch=\"bios\"} 1"));
|
||||
assert!(out.contains("pxeforge_tftp_transfers_total{status=\"ok\"} 1"));
|
||||
assert!(out.contains("pxeforge_tftp_bytes_total 1024"));
|
||||
assert!(out.contains("pxeforge_http_requests_total{route=\"api\"} 1"));
|
||||
assert!(out.contains("pxeforge_iso_count 3"));
|
||||
assert!(out.contains("pxeforge_uptime_seconds 42"));
|
||||
assert!(out.contains("pxeforge_build_info{version=\"0.2.0\"} 1"));
|
||||
assert_eq!(out.matches("# TYPE openpxe_dhcp_replies_total counter").count(), 1);
|
||||
assert_eq!(out.matches("# TYPE openpxe_iso_count gauge").count(), 1);
|
||||
assert!(out.contains("openpxe_dhcp_replies_total{arch=\"uefi\"} 1"));
|
||||
assert!(out.contains("openpxe_dhcp_replies_total{arch=\"bios\"} 1"));
|
||||
assert!(out.contains("openpxe_tftp_transfers_total{status=\"ok\"} 1"));
|
||||
assert!(out.contains("openpxe_tftp_bytes_total 1024"));
|
||||
assert!(out.contains("openpxe_http_requests_total{route=\"api\"} 1"));
|
||||
assert!(out.contains("openpxe_iso_count 3"));
|
||||
assert!(out.contains("openpxe_uptime_seconds 42"));
|
||||
assert!(out.contains("openpxe_build_info{version=\"0.2.0\"} 1"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -278,6 +278,6 @@ mod tests {
|
||||
a.record_dhcp_reply("bios");
|
||||
b.record_dhcp_reply("bios");
|
||||
let out = a.render("test", 0);
|
||||
assert!(out.contains("pxeforge_dhcp_replies_total{arch=\"bios\"} 2"));
|
||||
assert!(out.contains("openpxe_dhcp_replies_total{arch=\"bios\"} 2"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user