mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-01 20:55:16 +09:00
Cluster G of plan 38 (plan 32) + integration glue. - gpu: complete the core-slim move — remove core app.api.gpu + app.services.gpu_service (+ its blueprint registration), rebuild the probe in the serverkit-gpu builtin extension (nvidia-smi parser, Linux-guarded) - __init__: register dns_cutover + setup_health blueprints - doctor_service: add fleet DNS-vs-IP checks, backup-proof checks (backup_drill_stale/backup_unverified), and the setup-health section into run() - builtin_handlers: seed the host-doctor sweep + weekly setup-health nag - test_jobs: schedule count 15 -> 17 for the two restored schedules Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serverkit-gpu
Live NVIDIA GPU metrics (utilization, VRAM, temperature, power, fan) for servers with a GPU. The first CORE_SLIM slice (plan 32 #7): both halves now live in this extension.
Layout
serverkit-gpu/
plugin.json # entry_point gpu:gpu_bp, url_prefix /api/v1/gpu, sdk_version ^1.0.0
backend/
__init__.py
gpu.py # blueprint (gpu_bp) — thin routing over the service
gpu_service.py # nvidia-smi parsing (no app.* imports)
frontend/
index.jsx # exports GpuMonitorPage (matched by contributions.routes)
components/GpuMonitor.jsx # the page UI (SDK + @/ imports)
The backend loads in-place as app.plugins.serverkit-gpu (mirrors the
CrowdSec/WordPress extraction). The frontend ships baked: pre-bundled into
frontend/src/plugins/serverkit-gpu/ by scripts/sync-builtin-frontends.mjs
(the CI --check drift gate keeps source ↔ artifact in sync).
Shipping as a runtime-ESM bundle (deferred — plan 32 #9)
This slice is intentionally kept on the baked path for one release (CORE_SLIM dual-path guardrail). To later ship it as an external, no-rebuild runtime bundle (the loader plan 32 hardens), follow docs/EXTENSIONS_CI.md:
- Add a
frontend/vite.config.mjs(viascripts/new-extension.mjs --template frontend-esm) that externalizesreact,react-dom,react/jsx-runtime,react-router-dom,serverkit-sdkand emitsdist/index.mjs. - Blocker to resolve first:
GpuMonitor.jsximportsEmptyStateandButtonfrom the host via the@/alias — these are NOT on the SDK surface, so an externalized build can't resolve them. Either promote both intoserverkit-sdk(a deliberate SDK minor bump) or bundle equivalents into the extension._gpu.scss(core design-system SCSS) must likewise move into the bundle's inlined CSS. - Set
frontend_entry: dist/index.mjs, cut a release +sha256, and swap the registry entry — the operator runbook docs/runbooks/extension-release-and-tamper-e2e.md covers publishing + the tamper e2e.
Until then the baked path serves the page and the runtime loader is unaffected.