Offline sites and Kubernetes: llmgw bundle create, import and trust, offline.mirror, server init --bundle; a Helm chart for the control plane
A bundle carries what a cluster would download — llmgw's release with its signed checksums, every llama.cpp build per architecture with GitHub's checksums, model files pinned and checked against Hugging Face's — into a directory or a tar whose manifest sha256 is carried apart. Import checks everything, the release against the signing key, before anything is put in the mirror. With offline.mirror set, nodes install llama.cpp from the mirror against checksums the control plane holds and sends over the agent stream; releases default to the mirror for node add, ctl upgrade and agent upgrades. server init and the setup form install from a bundle. The Helm chart runs one control plane with SQLite on a claim or an external PostgreSQL, Secrets for the agent certificate and admin token, Services, Ingress and ServiceMonitor; deploy/container/Dockerfile builds its image. GPU nodes stay outside Kubernetes, as docs/kubernetes.md explains. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e59ff52932
commit
bae16426a2
51 files changed
+4177
-63
No files matched your search
@@ -32,6 +32,7 @@ import (
|
||||
|
||||
llmgwv1 "gitea.mynodes.xyz/ilker/llmgw/api/gen/llmgw/v1"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/audit"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/bundle"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/config"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/control"
|
||||
"gitea.mynodes.xyz/ilker/llmgw/internal/control/adminapi"
|
||||
@@ -100,6 +101,12 @@ func newServerCmd() *cobra.Command {
|
||||
return errors.New("nothing to serve: declare models with profiles, " +
|
||||
"or give --endpoint for a router-only run")
|
||||
}
|
||||
// Offline, nothing is asked of the internet: releases come from
|
||||
// the mirror's copy, and no registry is asked about newer weights.
|
||||
if cfg.Offline.Enabled() {
|
||||
cfg.Releases = cfg.ReleasesBase()
|
||||
cfg.Mirror.UpdateCheck = 0
|
||||
}
|
||||
|
||||
// Before the router, so its tracer is the configured one.
|
||||
shutdownTracing, err := obs.SetupTracing(cmd.Context(), obs.TracingOptions{
|
||||
@@ -654,6 +661,21 @@ func startControlPlane(ctx context.Context, cfg config.Server, cat *catalog.Live
|
||||
return cfg.EnginesFor(n.ID, slices.Sorted(maps.Keys(n.GPUsByClass())), n.Labels)
|
||||
})
|
||||
log.Info("nodes install these engines", "engines", cfg.WantedEngines(), "overrides", len(cfg.EngineOverrides))
|
||||
if cfg.Offline.Enabled() {
|
||||
// From the mirror, each file held to the checksum the bundle gave,
|
||||
// which this control plane keeps and the mirror has no say in.
|
||||
trusted := bundle.NewTrusted(cfg.Offline.ChecksumsFile())
|
||||
svc.SetOffline(func(engine, version string) (string, map[string]string) {
|
||||
return bundle.EngineBase(cfg.Offline.Mirror, engine, version), trusted.For(engine, version)
|
||||
})
|
||||
if v, ok := cfg.WantedEngines()["llamacpp"]; ok && len(trusted.For("llamacpp", v)) == 0 {
|
||||
log.Warn("offline, and no bundle imported here carries llama.cpp at this version: nodes cannot "+
|
||||
"install it until one does (llmgw bundle create --engine llamacpp="+v+", then bundle import or trust)",
|
||||
"version", v, "checksums", cfg.Offline.ChecksumsFile(), "err", trusted.Err())
|
||||
}
|
||||
log.Info("offline: nodes install engines from the mirror", "mirror", cfg.Offline.Mirror,
|
||||
"releases", cfg.Releases)
|
||||
}
|
||||
if ch := ctl.EngineChoices(); ch != nil {
|
||||
svc.SetEngineChoices(ch.For)
|
||||
ch.OnChange(svc.Reprovision)
|
||||
|
||||
Reference in new issue
Block a user