Initial implementation: host lifecycle + PXE + admin dashboard
Go service for Proxmox homelab cluster provisioning. Handles PXE boot, Proxmox autoinstall (answer file generation), cluster join via SSH, and Infrastructure API registration. - Host state machine (registered → pxe_ready → installing → ready) - dnsmasq supervisor with MAC-based allowlist - iPXE script and Proxmox answer file generation - First-boot phone-home → cluster join → infra registration - Operation locking with expiry (409 on conflict) - SSE event hub for real-time dashboard updates - Admin dashboard (host grid, detail, registration form) - Config-driven server types with hot-reload - Docker deployment (multi-stage fat image) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
FROM golang:1.23-bookworm AS builder
|
||||
|
||||
WORKDIR /src
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -o /provisioning ./cmd/provisioning
|
||||
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
dnsmasq \
|
||||
openssh-client \
|
||||
ipxe \
|
||||
ca-certificates \
|
||||
dmidecode \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /provisioning /usr/local/bin/provisioning
|
||||
|
||||
RUN mkdir -p /data /etc/provisioning/keys
|
||||
|
||||
EXPOSE 8080
|
||||
VOLUME ["/data", "/etc/provisioning"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/provisioning"]
|
||||
CMD ["-config", "/etc/provisioning/provisioning.yaml"]
|
||||
Reference in New Issue
Block a user