diff --git a/.gitignore b/.gitignore index d3819d0..6993ba5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ coverage.out /terraform-provider-llmgw/terraform-provider-llmgw /terraform-provider-llmgw/examples/.terraform* /terraform-provider-llmgw/examples/terraform.tfstate* +# What a development server run from the checkout writes beside it. +/secrets/ diff --git a/CHANGELOG.md b/CHANGELOG.md index f3cda0c..240adf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,16 @@ APIs change between minors without a deprecation period. ### Added +- **An install guide with every screen, at `/install`.** From three bare + Ubuntu machines to a first answer: what each machine needs and how to + check it, the release fetched and checked, the setup screens one by one, + the system's state, and a first request with a key from the account page. + The screens are a real three-machine install, recorded and kept as + terminal frames — sharp at any size and a few kilobytes — with each + session played back on request; the administrator's password and every + key were masked before it was kept. `/about` says more of what llmgw does + (documents, guardrails, sign-in, high availability, pictures and 3D), and + its install steps are the ones of today, leading to the guide. - **The company's MCP tools under the guardrails, a rate and a breaker.** - **The answer:** the caller's policies read a tool's answer as the prompt it becomes. An instruction planted in a ticket is withheld as a pasted one would be, and personal data is redacted. diff --git a/internal/router/handlers.go b/internal/router/handlers.go index ef2ba52..0188ddf 100644 --- a/internal/router/handlers.go +++ b/internal/router/handlers.go @@ -204,6 +204,9 @@ func (r *Router) Handler() http.Handler { // What llmgw is and how to install it: about the software, not this // installation, so it needs no key either. mux.HandleFunc("GET /about", web.About(version.Version)) + // The install guide, recorded on a real install: as public as /about. + mux.HandleFunc("GET /install", web.Install(version.Version)) + mux.HandleFunc("GET /install/cast/{file}", web.InstallCast) mux.Handle("GET /_static/", web.Static()) // The language switcher at the foot of every page, which has to work // before anyone has signed in. @@ -366,7 +369,7 @@ func (r *Router) Handler() http.Handler { r.selfHandler.Store(&h) return h } - exempt := []string{"/health", "/ready", "/leader", "/v1/openapi.json", "/", "/about", "/_static/", "/_lang/", "/claim/", + exempt := []string{"/health", "/ready", "/leader", "/v1/openapi.json", "/", "/about", "/install", "/install/", "/_static/", "/_lang/", "/claim/", "/signup", "/login", "/login/", "/logout", "/profile", "/profile/", "/scim/", "/admin", "/admin/", "/chat", "/chat/", "/images", "/images/", "/3d", "/3d/", "/org", "/org/", "/setup/"} // The docs are public unless the site said otherwise, and then guarded by diff --git a/internal/web/about.go b/internal/web/about.go index aaaa759..d7f5164 100644 --- a/internal/web/about.go +++ b/internal/web/about.go @@ -2,6 +2,7 @@ package web import ( "embed" + "html/template" "io" "net/http" "regexp" @@ -40,6 +41,20 @@ type AboutData struct { Site bool } +// InstallURL is the install guide: on a gateway its /install, on the website +// the page beside this one. +func (d AboutData) InstallURL() string { + if d.Site { + return "install.html" + } + return "/install" +} + +// Still is a screen of the install guide's recording, for the steps here. +func (d AboutData) Still(name string) template.HTML { + return InstallData{Site: d.Site}.Still(name) +} + // releaseTag is a version the releases page has files for. var releaseTag = regexp.MustCompile(`^v\d+\.\d+\.\d+$`) diff --git a/internal/web/guide/guide.json.gz b/internal/web/guide/guide.json.gz new file mode 100644 index 0000000..6da2028 Binary files /dev/null and b/internal/web/guide/guide.json.gz differ diff --git a/internal/web/install.go b/internal/web/install.go new file mode 100644 index 0000000..cdbedbf --- /dev/null +++ b/internal/web/install.go @@ -0,0 +1,249 @@ +package web + +import ( + "bytes" + "compress/gzip" + "crypto/sha256" + _ "embed" + "encoding/hex" + "encoding/json" + "html/template" + "io" + "net/http" + "regexp" + "strings" +) + +// The install guide: every step from bare machines to a first answer, each +// shown as the screen it was on. The screens are a real install, recorded on +// three fresh Ubuntu machines, kept as terminal frames rather than pictures: +// crisp at any size, a few kilobytes, text a reader can select — and played +// back, where the reader asks for it, as the session it was. +// +// The recording is guide/guide.json.gz, made by the scripts that drove the +// install; the administrator's password and every key in it were masked +// before it was written. Like /about, the page says nothing about this +// installation, only about the software, and is served without a key. + +//go:embed guide/guide.json.gz +var guideGz []byte + +// guideCast is one recorded session: its frames, and its last screen to show +// before anyone presses play. +type guideCast struct { + Cols int `json:"cols"` + Rows int `json:"rows"` + Frames []json.RawMessage `json:"frames"` + Poster []string `json:"poster"` +} + +// guideStill is one screen of a session, picked for the step it shows. +type guideStill struct { + Cast string `json:"cast"` + Frame int `json:"frame"` + Lines []string `json:"lines"` +} + +type guideFile struct { + Casts map[string]guideCast `json:"casts"` + Stills map[string]guideStill `json:"stills"` +} + +// guide is read once, when the binary starts: a recording that does not +// parse is a build that should not ship, and the tests say so first. +var guide = func() guideFile { + zr, err := gzip.NewReader(bytes.NewReader(guideGz)) + if err != nil { + panic("web: the install guide's recording is damaged: " + err.Error()) + } + b, err := io.ReadAll(zr) + if err != nil { + panic("web: the install guide's recording is damaged: " + err.Error()) + } + var g guideFile + if err := json.Unmarshal(b, &g); err != nil { + panic("web: the install guide's recording does not parse: " + err.Error()) + } + return g +}() + +// castFiles are the recordings as the player fetches them, compressed once: +// the page itself carries only each one's last screen, and a session is +// downloaded when someone presses play. +var castFiles = func() map[string][]byte { + out := map[string][]byte{} + for name, c := range guide.Casts { + b, err := json.Marshal(struct { + Rows int `json:"rows"` + Frames []json.RawMessage `json:"frames"` + }{c.Rows, c.Frames}) + if err != nil { + panic(err) + } + var z bytes.Buffer + zw, _ := gzip.NewWriterLevel(&z, gzip.BestCompression) + _, _ = zw.Write(b) + _ = zw.Close() + out[name] = z.Bytes() + } + return out +}() + +// CastView is what the page needs of a recording: the screen it opens on, +// and where the player fetches the whole session. +type CastView struct { + Name string + Cols, Rows int + Poster template.HTML + Src string +} + +// InstallData is what the guide is rendered with. +type InstallData struct { + Version, Release string + Site bool +} + +// recorded is when the guide's install was made, and with which release: the +// screens are that release's, whatever version serves the page. +const recorded = "v0.14.9 · 2026-10-23" + +// Recorded says which release the screens are of, and when they were taken. +func (InstallData) Recorded() string { return recorded } + +// AboutURL is the page about llmgw: on a gateway its /about, on the website +// the site's front page beside this one. +func (d InstallData) AboutURL() string { + if d.Site { + return "./" + } + return "/about" +} + +// Img is a picture of the portal, served by the gateway or, on the website, +// beside the page. +func (d InstallData) Img(name string) string { + if d.Site { + return "guide/" + name + } + return assetURL("guide/" + name) +} + +// ShotView is one setup screen and the label over it. +type ShotView struct { + Label string + Screen template.HTML +} + +// Shot is the setup screen called name, labelled for its step. +func (d InstallData) Shot(name, label string) ShotView { + return ShotView{Label: label, Screen: d.Still(name)} +} + +// Cast is the recording called name, ready for the page. On a gateway it is +// fetched from /install/cast/, named by its content so a cache never plays an +// old one; on the website, from beside the page. +func (d InstallData) Cast(name string) CastView { + c, ok := guide.Casts[name] + if !ok { + panic("web: the install guide has no recording " + name) + } + v := CastView{Name: name, Cols: c.Cols, Rows: c.Rows, Poster: screen(c.Poster)} + if d.Site { + v.Src = "guide/" + name + ".json" + } else { + sum := sha256.Sum256(castFiles[name]) + v.Src = "/install/cast/" + name + ".json?v=" + hex.EncodeToString(sum[:4]) + } + return v +} + +// CastFile is a recording as the website serves it beside the page: JSON, +// compressed, for the website's build to write out under guide/. +func CastFile(name string) ([]byte, bool) { + b, ok := castFiles[name] + return b, ok +} + +// CastNames are the recordings the guide plays. +func CastNames() []string { + var names []string + for n := range guide.Casts { + names = append(names, n) + } + return names +} + +// InstallCast serves one recording at /install/cast/{name}.json, compressed +// when the browser takes it so, as nearly every one does. +func InstallCast(w http.ResponseWriter, r *http.Request) { + name := strings.TrimSuffix(r.PathValue("file"), ".json") + b, ok := castFiles[name] + if !ok || !strings.HasSuffix(r.PathValue("file"), ".json") { + http.NotFound(w, r) + return + } + w.Header().Set("Content-Type", "application/json") + w.Header().Set("Cache-Control", "public, max-age=86400") + w.Header().Set("Vary", "Accept-Encoding") + if strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") { + w.Header().Set("Content-Encoding", "gzip") + _, _ = w.Write(b) + return + } + zr, err := gzip.NewReader(bytes.NewReader(b)) + if err != nil { + http.Error(w, "the recording is damaged", http.StatusInternalServerError) + return + } + _, _ = io.Copy(w, zr) +} + +// Still is the screen of a step, as the recording showed it. +func (InstallData) Still(name string) template.HTML { + s, ok := guide.Stills[name] + if !ok { + panic("web: the install guide has no screen " + name) + } + return screen(s.Lines) +} + +// screen joins a frame's lines. They are HTML the recording's builder made +// from the terminal's own colours — spans and escaped text, nothing a visitor +// supplied — which is why they are trusted here. +// +// Blank rows at the foot are left off: a shell session that filled a third +// of the terminal would otherwise sit above a block of black. The player +// gives the screen its full height once it plays. +func screen(lines []string) template.HTML { + n := len(lines) + for n > 0 && strings.TrimSpace(tagText.ReplaceAllString(lines[n-1], "")) == "" { + n-- + } + return template.HTML(strings.Join(lines[:n], "\n")) +} + +// tagText matches the markup in a screen's line, to see whether any text is left. +var tagText = regexp.MustCompile(`<[^>]*>`) + +// NewInstallData fills the guide's data for a version. +func NewInstallData(version string) InstallData { + d := InstallData{Version: version} + if releaseTag.MatchString(version) { + d.Release = version + } + return d +} + +// RenderInstall writes the guide, for the website's build as much as for Install. +func RenderInstall(w io.Writer, d InstallData) error { + return tmpl.ExecuteTemplate(w, "install", d) +} + +// Install serves the guide at /install. +func Install(version string) http.HandlerFunc { + d := NewInstallData(version) + return func(w http.ResponseWriter, r *http.Request) { + render(w, r, "install", d) + } +} diff --git a/internal/web/install_test.go b/internal/web/install_test.go new file mode 100644 index 0000000..a4366bb --- /dev/null +++ b/internal/web/install_test.go @@ -0,0 +1,106 @@ +package web + +import ( + "bytes" + "net/http" + "net/http/httptest" + "regexp" + "strings" + "testing" +) + +func TestInstallGuideShowsEveryStepAndRecording(t *testing.T) { + code, body := get(t, Install("v1.2.3"), "http://llmgw.example/install", nil) + if code != http.StatusOK { + t.Fatalf("status %d", code) + } + for _, want := range []string{ + "", + `id="before"`, `id="binary"`, `id="setup"`, `id="check"`, `id="use"`, `id="trouble"`, + "sha256sum -c --ignore-missing", + "sudo llmgw server init", + `href="/about"`, + "/_static/guide/admin.png?v=", + // The recording's own screens, not a description of them. + "High availability", "All three are ready.", "The control plane is up", + } { + if !strings.Contains(body, want) { + t.Errorf("the guide does not have %q", want) + } + } + if n := strings.Count(body, `class="tty" data-src="/install/cast/`); n != len(guide.Casts) { + t.Errorf("%d players on the page, %d recordings", n, len(guide.Casts)) + } +} + +// The recording was of a real install, with a real administrator's password +// and a real key on screen. Neither may reach the page. +func TestInstallGuideCarriesNoSecret(t *testing.T) { + _, body := get(t, Install("v1.2.3"), "http://llmgw.example/install", nil) + for _, rx := range []*regexp.Regexp{ + regexp.MustCompile(`sk-llmgw-[A-Za-z0-9_-]{8,}`), + regexp.MustCompile(`password(\s|<[^>]*>)+[a-z0-9]{16,}`), + } { + if m := rx.FindString(body); m != "" { + t.Errorf("the guide shows %q", m) + } + } +} + +func TestEveryGuideStepHasItsScreen(t *testing.T) { + for _, name := range []string{"setup-start", "setup-choices", "setup-admin", "setup-machines", + "setup-checks", "setup-plan", "setup-install", "setup-done"} { + s, ok := guide.Stills[name] + if !ok || len(s.Lines) == 0 { + t.Errorf("no screen %s", name) + continue + } + if _, ok := guide.Casts[s.Cast]; !ok { + t.Errorf("screen %s is of a recording, %s, the guide does not have", name, s.Cast) + } + } +} + +func TestInstallGuideAsTheWebsite(t *testing.T) { + d := NewInstallData("v1.2.3") + d.Site = true + var b bytes.Buffer + if err := RenderInstall(&b, d); err != nil { + t.Fatal(err) + } + body := b.String() + for _, not := range []string{"", "/_static/", `href="/about"`} { + if strings.Contains(body, not) { + t.Errorf("the website's guide has %q", not) + } + } + if !strings.Contains(body, `src="guide/admin.png"`) { + t.Error("the website's guide does not take its pictures from beside it") + } +} + +func TestTheRecordingsAreServedCompressed(t *testing.T) { + r := httptest.NewRequest("GET", "http://llmgw.example/install/cast/2-setup.json", nil) + r.SetPathValue("file", "2-setup.json") + r.Header.Set("Accept-Encoding", "gzip, br") + w := httptest.NewRecorder() + InstallCast(w, r) + if w.Code != http.StatusOK || w.Header().Get("Content-Encoding") != "gzip" { + t.Fatalf("%d %v", w.Code, w.Header()) + } + // And plain to a client that does not take gzip. + r = httptest.NewRequest("GET", "http://llmgw.example/install/cast/2-setup.json", nil) + r.SetPathValue("file", "2-setup.json") + w = httptest.NewRecorder() + InstallCast(w, r) + if !strings.HasPrefix(w.Body.String(), `{"rows":`) { + t.Errorf("plain body starts %.20q", w.Body.String()) + } + r = httptest.NewRequest("GET", "http://llmgw.example/install/cast/nothing.json", nil) + r.SetPathValue("file", "nothing.json") + w = httptest.NewRecorder() + InstallCast(w, r) + if w.Code != http.StatusNotFound { + t.Errorf("an unknown recording answered %d", w.Code) + } +} diff --git a/internal/web/locales/en/about.json b/internal/web/locales/en/about.json index c5c375b..4901f99 100644 --- a/internal/web/locales/en/about.json +++ b/internal/web/locales/en/about.json @@ -9,7 +9,6 @@ "about.nav.download": "Download", "about.nav.source": "Source", "about.nav.gateway": "This gateway", - "about.hero.eyebrow": "Self-hosted LLM gateway · %s", "about.hero.title": "One endpoint in front of your own GPUs.", "about.hero.lede": "llmgw runs vLLM, SGLang and llama.cpp across your servers and serves them behind one OpenAI-compatible API. It knows which GPUs share an NVLink domain or an InfiniBand fabric, and a model split across machines never straddles two.", @@ -22,7 +21,6 @@ "about.schem.title": "Clients reach one llmgw address. llmgw places a model's shards on GPUs inside one fabric at a time.", "about.schem.editor": "editor agent", "about.schem.caption": "A replica spanning nodes goes into one NVLink domain if one has room, otherwise onto one InfiniBand fabric. Two fabrics that cannot see each other are never bridged: the all-reduce would hang.", - "about.what.title": "What it does", "about.what.intro": "One static binary. It runs as the control plane, as the agent on every GPU node, and as the weights mirror.", "about.what.api.title": "OpenAI API, your hardware", @@ -34,7 +32,7 @@ "about.what.keys.title": "Keys, budgets, rate limits", "about.what.keys.text": "Organisations, teams and projects, each with limits. Priority bands decide who waits when the cluster is full. Managers see their organisation's spend; people see their own.", "about.what.editors.title": "Editors connect from the account page", - "about.what.editors.text": "Pick Continue, Codex or Cline and a model. The page makes a key and hands over the config, filled in, or a one-line command that writes it.", + "about.what.editors.text": "Continue, Codex or Cline from the account page: a key, and the configuration filled in or a one-line command that writes it. Claude Code and OpenCode work with the same key, over the Anthropic and OpenAI APIs.", "about.what.chat.title": "A chat page for quick questions", "about.what.chat.text": "Markdown and maths rendered, stop mid-reply, tokens per second and time to first token, a system prompt and a temperature. The gateway keeps no conversations.", "about.what.mirror.title": "A mirror you browse", @@ -45,7 +43,6 @@ "about.what.upgrades.text": "Upgrade the control plane, then the agents. A restarted agent adopts the engines it was running instead of reloading them, so replicas stay up throughout.", "about.what.dashboard.title": "A dashboard with nothing to set up", "about.what.dashboard.text": "/admin shows capacity per GPU class, CPU and memory per node, who is using what, each node's page and logs. It fits a phone. Prometheus is optional.", - "about.fabrics.title": "InfiniBand and NVLink, several of each", "about.fabrics.intro": "A site may have independent InfiniBand fabrics, eight-GPU HGX boards and NVL72 racks side by side. llmgw tells them apart by what the adapters report, not by what a config file calls them.", "about.fabrics.guide": "Fabrics and NVLink guide", @@ -66,20 +63,18 @@ "about.fabrics.racks.text": "/admin/nvlink shows which trays are joined, whose IMEX is down, which link runs degraded.", "about.fabrics.ports.title": "Ports re-read every heartbeat", "about.fabrics.ports.text": "A port that goes down takes its fabric off the node within seconds. Counters and rates are exported to Prometheus.", - "about.install.title": "From nothing to a first request", - "about.install.intro": "Debian, Ubuntu or RHEL 10. NVIDIA drivers and the InfiniBand stack are yours to install; llmgw does the rest.", - "about.install.guide": "The full guide covers the mirror, GPUs and what to do when something does not work.", + "about.install.intro": "Three machines for high availability, or one. Ubuntu, Debian or RHEL 10; llmgw installs its engines, Python and CUDA itself.", + "about.install.guide": "The install guide shows every step on the screens of a real install, recorded.", "about.install.binary.title": "Put the binary on every machine", "about.install.binary.text": "Static, no dependencies, the same file everywhere.", - "about.install.server.title": "Set up the control plane", - "about.install.server.text": "Creates the user, the certificate authority, the certificate, server.yaml and your administrator account, then starts the service. Safe to run again. Add --host for any name nodes use that the machine cannot see itself.", - "about.install.node.title": "Add a node", - "about.install.node.text": "From the control plane, which holds the authority. The node gets its certificate, the binary and the agent, and installs its engine by itself.", + "about.install.server.title": "Run the setup screens", + "about.install.server.text": "With nothing installed, sudo llmgw opens the setup: one machine or three, what to install, the other machines' logins. It checks every machine first, shows the plan, and installs. From a script, llmgw server init does the same.", + "about.install.node.title": "Add GPU nodes", + "about.install.node.text": "From the control plane, over SSH. The node gets llmgw, is checked by llmgw doctor, receives its certificate and starts its agent; it installs its engines by itself.", "about.install.node.output_label": "Example output of llmgw ctl nodes", "about.install.model.title": "Add a model and send a request", - "about.install.model.text": "No restart. If it does not place, llmgw ctl explain-placement names every node and why it was turned down.", - + "about.install.model.text": "From /admin/mirror, what your nodes can run, downloaded once for the cluster; or by name. If it does not place, llmgw ctl explain-placement says why.", "about.proxy.title": "Behind a reverse proxy", "about.proxy.intro": "Port 8080 is plain HTTP. Put it behind Caddy or nginx with a public certificate. Only 8080 goes through the proxy: agents reach 7443 directly, because it is mutual TLS with the cluster's own authority.", "about.proxy.loopback": "Bind llmgw to loopback when the proxy is on the same machine: listen: \"127.0.0.1:8080\".", @@ -93,7 +88,6 @@ "about.proxy.headers.text": "llmgw marks session cookies Secure from X-Forwarded-Proto and shows X-Forwarded-Host as the base URL.", "about.proxy.body.title": "Body limit matches the router", "about.proxy.body.text": "32 MiB, so an oversized request is refused before it is uploaded.", - "about.download.title": "Download", "about.download.intro": "Built by CI from the tag and checked against checksums.txt. Every release is on the releases page with its changelog.", "about.download.released": "Released %s", @@ -109,7 +103,6 @@ "about.download.checksums": "Checksums", "about.download.checksums_note": "SHA-256 of every file above.", "about.download.dev": "This is a development build (%s). Take a release from the releases page, where every file is listed with its checksum.", - "about.status.title": "Where it stands", "about.status.intro": "Pre-1.0: configuration formats may change between minor versions. This is what has run on real hardware, and what has not yet.", "about.status.proven": "Run on real clusters", @@ -122,8 +115,21 @@ "about.status.open": "Not yet proven", "about.status.open.fabrics": "InfiniBand and NVLink on a real site: written and tested against the real output of sminfo, ibnetdiscover and nvidia-smi, but not yet run on the hardware. Run llmgw doctor --json on a few nodes first.", "about.status.open.planes": "Two control planes over long periods", - "about.status.open.weights": "Nodes do not share downloaded weights; the mirror keeps each download local", - + "about.status.open.weights": "The model mirror on one machine: the last single point in a high-availability install", "about.footer.changelog": "Changelog", - "about.footer.reference": "Configuration reference" + "about.footer.reference": "Configuration reference", + "about.what.knowledge.title": "Answers from your documents", + "about.what.knowledge.text": "People add PDF, Office and mail from their own machines with llmgw-kb; only text and vectors are sent. Each organisation, team and project sees only its own collections, down to the database row.", + "about.what.guard.title": "Guardrails on every request", + "about.what.guard.text": "Personal data, secrets, prompt injection and deny patterns, with a judge model on CPUs. Policies observe or enforce, per organisation, team or project; an answer nobody could check is refused.", + "about.what.signin.title": "Sign-in your company already has", + "about.what.signin.text": "Entra ID, Active Directory or any OIDC provider; users and groups by SCIM; staff roles, and an audit log of every change.", + "about.what.ha.title": "High availability from the first install", + "about.what.ha.text": "Three machines: each can run the gateway, PostgreSQL under Patroni keeps the store on two, etcd votes on all three. Setup builds it; losing any one machine loses nothing.", + "about.what.media.title": "Pictures and 3D models too", + "about.what.media.text": "ComfyUI on the same cards: pictures and meshes as jobs, queued, followed and returned as files, each carrying the licence it was made under.", + "about.install.cta": "Every step, with its screens", + "about.status.proven.ha": "Three-machine high availability built by the setup screens; a lost store primary cost no requests", + "about.status.proven.signin": "Sign-in with Active Directory, tried against a Samba domain controller, and with OIDC", + "about.status.proven.kb": "Knowledge bases of over 100,000 passages, answered from with their sources" } diff --git a/internal/web/locales/en/install.json b/internal/web/locales/en/install.json new file mode 100644 index 0000000..ba91672 --- /dev/null +++ b/internal/web/locales/en/install.json @@ -0,0 +1,113 @@ +{ + "install.meta.description": "Installing llmgw, step by step: what each machine needs, then every screen of a real three-machine install, recorded.", + "install.title": "Install guide", + "install.nav.label": "Install guide", + "install.nav.before": "Before you start", + "install.nav.binary": "Get llmgw", + "install.nav.setup": "Set up", + "install.nav.check": "Check it", + "install.nav.use": "First request", + "install.nav.next": "What next", + "install.nav.trouble": "If it goes wrong", + "install.nav.about": "About llmgw", + "install.step": "Step %s", + "install.hero.eyebrow": "Install guide · recorded with %s", + "install.hero.title": "From three bare machines to a first answer.", + "install.hero.lede": "Every screen on this page is from a real install: three fresh Ubuntu 24.04 machines and the release anyone can download. The only change made beforehand was turning SSH password login on, as a stock Ubuntu server has it. Read the step, see the screen, or press play and watch the session as it ran.", + "install.hero.machines": "machines, high availability", + "install.hero.steps": "steps, after the checks", + "install.hero.time": "of installing, once the questions are answered", + "install.hero.hidden": "screens left out", + "install.before.title": "Before you start", + "install.before.intro": "One machine, or three for high availability. Check each one first; the setup screens check them again before they install anything.", + "install.before.commands": "The same checks by hand, on each machine:", + "install.req.machines": "Machines", + "install.req.machines.text": "One, or three for high availability: each of the three can run the gateway, two keep the store replicated, and losing any one loses nothing.", + "install.req.system": "System", + "install.req.system.text": "Ubuntu 22.04 or 24.04, Debian 12 or RHEL 10; x86-64 or ARM64.", + "install.req.size": "Size", + "install.req.size.text": "At least 2 CPUs and 3.5 GB of memory on each; 15 GB of free disk on the first machine and 30 GB on the two that keep the store.", + "install.req.clock": "Clock", + "install.req.clock.text": "Synchronised: the machines must agree within a second.", + "install.req.network": "Network", + "install.req.network.text": "The machines reach one another. Users reach the gateway on 8080; nodes reach 7443 and 8081. Internet access to download engines and models, or an offline bundle.", + "install.req.access": "Access", + "install.req.access.text": "sudo on every machine. SSH from the first machine to the other two, with a password, a key or the ssh agent; a machine nothing may log into joins with a code instead.", + "install.req.names": "Names", + "install.req.names.text": "A hostname of its own on each machine. It becomes the machine's name in the cluster.", + "install.req.gpus": "GPU nodes", + "install.req.gpus.text": "Added later, with the NVIDIA driver installed. llmgw installs llama.cpp, vLLM, Python and CUDA itself.", + "install.req.memory_note": "Memory, when the first machine also serves models. In this recording it runs the starter model and both guardrail judges. With 8 GB there was no room left for the starter model; with 12 GB everything fits.", + "install.binary.title": "Get llmgw", + "install.binary.intro": "One static file, the same on every machine. Only the first needs it: setup copies it to the others.", + "install.binary.text": "The latest release, its checksum checked. sha256sum must say OK; if it does not, the download is damaged.", + "install.setup.title": "Set up", + "install.setup.intro": "With nothing installed, llmgw opens its setup screens. They ask, check every machine, show the plan, and install.", + "install.setup.text": "On the first machine:", + "install.setup.keys": "Keyboard only: arrows to move, Space to turn a part on or off, Enter to open its settings or go on, Esc to go back. It works over a serial console too.", + "install.sc1.tab": "One or three", + "install.sc1.text": "One machine or three. Nothing of llmgw is installed yet, so the setup starts here. One machine runs everything; three are high availability.", + "install.sc2.tab": "What to install", + "install.sc2.text": "Every part, on or off. Enter on a part opens its settings and says what it does. Here this machine is also a node, with the small starter model, so there is something to ask the moment the install ends.", + "install.sc3.tab": "Administrator", + "install.sc3.text": "The control plane's settings. The administrator's email (a password is made for it and shown once, at the end), other names nodes reach this machine by, the portal's language, and whether people may sign up.", + "install.sc4.tab": "The other two", + "install.sc4.text": "The machines that keep the store. Address, user, and how to log in: the ssh agent, a key file, a password or a join code. Passwords are kept in memory only, for this setup.", + "install.sc5.tab": "Checks", + "install.sc5.text": "Every machine, checked before anything is installed: login, system, processor, CPUs, memory, disk, clock, ports, internet and whether the machines reach one another. Fix what fails and press R.", + "install.sc6.tab": "Plan", + "install.sc6.text": "What will be installed, and what is left out. Esc goes back to change it; Enter installs.", + "install.sc7.tab": "Install", + "install.sc7.text": "Installed while you watch: the certificate authority and certificates, etcd on all three, PostgreSQL under Patroni on the other two, the control plane on all three, the mirror, the guardrails' judges and the starter model.", + "install.sc8.tab": "Done", + "install.sc8.text": "The administrator's password, shown once. Copy it now. Below it, the same install as one command, for a script.", + "install.setup.whole": "The whole setup, as it ran", + "install.setup.script.title": "The same, from a script", + "install.setup.script.intro": "What the last screen prints. Safe to run again: it keeps what exists and finishes what is missing.", + "install.check.title": "Check it", + "install.check.intro": "From any of the three machines.", + "install.check.text": "llmgw status is the whole system in a few lines: nodes, replicas, models, which control plane leads, and the store. Run again, sudo llmgw is the console. In a browser, http://<first machine>:8080 is the portal; sign in with the password from the last setup screen.", + "install.use.title": "The first request", + "install.use.intro": "With a key from the account page.", + "install.use.text": "On the account page, Create a key: it is shown once. Any OpenAI client works with it; only the base URL changes, to http://<first machine>:8080/v1. The chat page answers too, with the same models.", + "install.cast.0-prereq": "The checks on the first machine, then a name for each of the three.", + "install.cast.1-binary": "The latest release, its checksum checked, installed.", + "install.cast.2-setup": "Every screen of the setup, from the first question to the administrator's password. Long waits are shortened; nothing is left out.", + "install.cast.3-check": "The system's state, then the console.", + "install.cast.4-request": "A key from the account page, and the starter model answering.", + "install.shot.login": "The portal's sign-in, at port 8080 of the first machine.", + "install.shot.admin": "The cluster page: the node, its memory and disk, and the models with what each holds.", + "install.shot.newkey": "A key made on the account page, shown once, with a request to copy.", + "install.shot.chat": "The chat page, with the starter model.", + "install.next.title": "What next", + "install.next.intro": "Each is in the console, under Do, as well as on the command line.", + "install.next.nodes.title": "GPU nodes", + "install.next.nodes.text": "sudo llmgw node add <user>@<address> logs in, installs llmgw, checks the node with llmgw doctor, and starts its agent. The node installs its engines itself.", + "install.next.models.title": "Models", + "install.next.models.text": "/admin/mirror → Explore models: what your nodes can run, downloaded once into the mirror, then served always on or on demand.", + "install.next.people.title": "People", + "install.next.people.text": "Accounts, organisations and projects, budgets and limits; single sign-on with Entra ID, Active Directory or OIDC.", + "install.next.https.title": "HTTPS", + "install.next.https.text": "Put Caddy or nginx in front of port 8080 before anyone outside a trusted network uses it. The configurations are on the about page.", + "install.trouble.title": "If it goes wrong", + "install.trouble.intro": "What this install met, and what else is common.", + "install.trouble.see": "What you see", + "install.trouble.do": "What to do", + "install.trouble.starter.see": "starter model … has nowhere to run at the end of the install", + "install.trouble.starter.do": "The first machine has no room left after the judges. llmgw ctl explain-placement <model> says what it lacks. Give it more memory, or add a node, then run sudo llmgw again: it finishes what is missing.", + "install.trouble.judge.see": "An answer comes back empty, with \"finish_reason\": \"content_filter\"", + "install.trouble.judge.do": "The guardrails' judge gave no verdict in time, and an unchecked answer is refused, not let through. The judge needs free cores; on a machine shared with a model it can miss its budget. Give the judges more cores, or a machine of their own.", + "install.trouble.ssh.see": "The checks cannot log in to another machine", + "install.trouble.ssh.do": "Many cloud images turn SSH password login off. Use a key file or the ssh agent instead, or a join code: llmgw join <code> on that machine.", + "install.trouble.check.see": "A check fails: ports, clock, disk", + "install.trouble.check.do": "Each says what it found. Fix it on that machine and press R on the checks screen.", + "install.trouble.node.see": "Anything else about a machine", + "install.trouble.node.do": "sudo llmgw doctor on it. --json writes everything it read, to send to whoever helps you.", + "install.footer.recorded": "screens recorded with %s", + "install.footer.full": "The full install guide", + "install.play": "Play", + "install.pause": "Pause", + "install.again": "Play again", + "install.tty_label": "A terminal screen, recorded", + "install.hero.time_value": "~3 min" +} diff --git a/internal/web/locales/tr/about.json b/internal/web/locales/tr/about.json index 3ba065e..7999c1e 100644 --- a/internal/web/locales/tr/about.json +++ b/internal/web/locales/tr/about.json @@ -9,7 +9,6 @@ "about.nav.download": "İndir", "about.nav.source": "Kaynak kod", "about.nav.gateway": "Bu ağ geçidi", - "about.hero.eyebrow": "Kendi sunucunuzda çalışan LLM ağ geçidi · %s", "about.hero.title": "Kendi GPU'larınızın önünde tek bir uç nokta.", "about.hero.lede": "llmgw; vLLM, SGLang ve llama.cpp'yi sunucularınızda çalıştırır ve hepsini OpenAI uyumlu tek bir API'nin arkasından sunar. Hangi GPU'ların aynı NVLink alanını ya da aynı InfiniBand fabric'ini paylaştığını bilir; makinelere bölünmüş bir model hiçbir zaman iki fabric'e birden yayılmaz.", @@ -22,7 +21,6 @@ "about.schem.title": "İstemciler tek bir llmgw adresine ulaşır. llmgw bir modelin parçalarını her seferinde tek bir fabric içindeki GPU'lara yerleştirir.", "about.schem.editor": "editör ajanı", "about.schem.caption": "Birden çok düğüme yayılan bir replika, yeri varsa tek bir NVLink alanına, yoksa tek bir InfiniBand fabric'ine yerleşir. Birbirini göremeyen iki fabric arasında asla köprü kurulmaz: all-reduce takılıp kalırdı.", - "about.what.title": "Ne yapar", "about.what.intro": "Tek bir statik ikili dosya. Kontrol düzlemi olarak, her GPU düğümünde ajan olarak ve ağırlık aynası olarak çalışır.", "about.what.api.title": "OpenAI API'si, sizin donanımınız", @@ -34,7 +32,7 @@ "about.what.keys.title": "Anahtarlar, bütçeler, hız sınırları", "about.what.keys.text": "Kuruluşlar, ekipler ve projeler; her birinin kendi sınırları var. Küme dolduğunda kimin bekleyeceğine öncelik bantları karar verir. Yöneticiler kuruluşlarının harcamasını, kişiler kendi harcamalarını görür.", "about.what.editors.title": "Editörler hesap sayfasından bağlanır", - "about.what.editors.text": "Continue, Codex ya da Cline'ı ve bir model seçin. Sayfa bir anahtar oluşturur ve yapılandırmayı doldurulmuş olarak ya da onu yazan tek satırlık bir komut olarak verir.", + "about.what.editors.text": "Hesap sayfasından Continue, Codex ya da Cline: bir anahtar ve doldurulmuş yapılandırma ya da onu yazan tek satırlık bir komut. Claude Code ve OpenCode aynı anahtarla, Anthropic ve OpenAI API'leri üzerinden çalışır.", "about.what.chat.title": "Hızlı sorular için bir sohbet sayfası", "about.what.chat.text": "Markdown ve matematik biçimlenmiş gösterilir, yanıt yarıda durdurulabilir; saniyede token ve ilk token süresi görünür, bir sistem istemi ve sıcaklık ayarlanabilir. Ağ geçidi hiçbir sohbeti saklamaz.", "about.what.mirror.title": "Göz atabileceğiniz bir ayna", @@ -45,7 +43,6 @@ "about.what.upgrades.text": "Önce kontrol düzlemini, sonra ajanları yükseltin. Yeniden başlatılan bir ajan, çalıştırdığı motorları yeniden yüklemek yerine devralır; böylece replikalar baştan sona ayakta kalır.", "about.what.dashboard.title": "Hiçbir kurulum gerektirmeyen bir pano", "about.what.dashboard.text": "/admin; GPU sınıfı başına kapasiteyi, düğüm başına CPU ve belleği, kimin neyi kullandığını, her düğümün sayfasını ve günlüklerini gösterir. Telefona sığar. Prometheus isteğe bağlıdır.", - "about.fabrics.title": "InfiniBand ve NVLink, her birinden birkaç tane", "about.fabrics.intro": "Bir sahada bağımsız InfiniBand fabric'leri, sekiz GPU'lu HGX kartları ve NVL72 kabinleri yan yana bulunabilir. llmgw bunları bir yapılandırma dosyasındaki adlarına göre değil, adaptörlerin bildirdiklerine göre ayırt eder.", "about.fabrics.guide": "Fabric ve NVLink kılavuzu", @@ -66,20 +63,18 @@ "about.fabrics.racks.text": "/admin/nvlink hangi tepsilerin katıldığını, hangisinin IMEX'inin çöktüğünü, hangi bağlantının düşük hızda çalıştığını gösterir.", "about.fabrics.ports.title": "Portlar her yaşam sinyalinde yeniden okunur", "about.fabrics.ports.text": "Kapanan bir port, saniyeler içinde fabric'ini düğümden düşürür. Sayaçlar ve hızlar Prometheus'a aktarılır.", - "about.install.title": "Sıfırdan ilk isteğe", - "about.install.intro": "Debian, Ubuntu ya da RHEL 10. NVIDIA sürücülerini ve InfiniBand yığınını siz kurarsınız; gerisini llmgw yapar.", - "about.install.guide": "Ayrıntılı kılavuz aynayı, GPU'ları ve bir şey çalışmadığında ne yapılacağını anlatır.", + "about.install.intro": "Yüksek erişilebilirlik için üç makine ya da tek makine. Ubuntu, Debian ya da RHEL 10; motorları, Python'u ve CUDA'yı llmgw kendisi kurar.", + "about.install.guide": "Kurulum rehberi her adımı gerçek bir kurulumun kaydedilmiş ekranlarıyla gösterir.", "about.install.binary.title": "İkili dosyayı her makineye koyun", "about.install.binary.text": "Statik, bağımlılıksız; her yerde aynı dosya.", - "about.install.server.title": "Kontrol düzlemini kurun", - "about.install.server.text": "Kullanıcıyı, sertifika yetkilisini, sertifikayı, server.yaml dosyasını ve yönetici hesabınızı oluşturur, ardından hizmeti başlatır. Yeniden çalıştırmak güvenlidir. Düğümlerin kullandığı ama makinenin kendi adı olarak göremediği her ad için --host ekleyin.", - "about.install.node.title": "Bir düğüm ekleyin", - "about.install.node.text": "Sertifika yetkilisini barındıran kontrol düzleminden. Düğüm sertifikasını, ikili dosyayı ve ajanı alır, motorunu da kendisi kurar.", + "about.install.server.title": "Kurulum ekranlarını çalıştırın", + "about.install.server.text": "Hiçbir şey kurulu değilken sudo llmgw kurulumu açar: tek makine ya da üç, ne kurulacağı, diğer makinelerin girişleri. Önce her makineyi denetler, planı gösterir ve kurar. Bir betikten llmgw server init aynısını yapar.", + "about.install.node.title": "GPU düğümleri ekleyin", + "about.install.node.text": "Kontrol düzleminden, SSH ile. Düğüm llmgw'yi alır, llmgw doctor ile denetlenir, sertifikasını alır ve ajanını başlatır; motorlarını kendisi kurar.", "about.install.node.output_label": "llmgw ctl nodes çıktısından bir örnek", "about.install.model.title": "Bir model ekleyin ve istek gönderin", - "about.install.model.text": "Yeniden başlatma gerekmez. Model yerleşmezse llmgw ctl explain-placement her düğümü ve neden geri çevrildiğini tek tek söyler.", - + "about.install.model.text": "/admin/mirror sayfasından düğümlerinizin çalıştırabildikleri, küme için bir kez indirilir; ya da adıyla. Model yerleşmezse nedenini llmgw ctl explain-placement söyler.", "about.proxy.title": "Ters proxy arkasında", "about.proxy.intro": "8080 portu düz HTTP'dir. Onu genel geçer bir sertifikayla Caddy ya da nginx arkasına koyun. Proxy'den yalnızca 8080 geçer: ajanlar 7443'e doğrudan ulaşır, çünkü orası kümenin kendi sertifika yetkilisiyle karşılıklı TLS'dir.", "about.proxy.loopback": "Proxy aynı makinedeyse llmgw'yi loopback adresine bağlayın: listen: \"127.0.0.1:8080\".", @@ -93,7 +88,6 @@ "about.proxy.headers.text": "llmgw oturum çerezlerini X-Forwarded-Proto başlığına göre Secure olarak işaretler ve X-Forwarded-Host değerini temel URL olarak gösterir.", "about.proxy.body.title": "Gövde sınırı yönlendiricininkiyle aynıdır", "about.proxy.body.text": "32 MiB; böylece fazla büyük bir istek daha yüklenmeden reddedilir.", - "about.download.title": "İndir", "about.download.intro": "CI tarafından etiketten derlenir ve checksums.txt ile doğrulanır. Her sürüm, değişiklik günlüğüyle birlikte sürümler sayfasında yer alır.", "about.download.released": "Yayın tarihi: %s", @@ -109,7 +103,6 @@ "about.download.checksums": "Sağlama toplamları", "about.download.checksums_note": "Yukarıdaki her dosyanın SHA-256 özeti.", "about.download.dev": "Bu bir geliştirme derlemesidir (%s). Her dosyanın sağlama toplamıyla listelendiği sürümler sayfasından bir sürüm edinin.", - "about.status.title": "Proje ne durumda", "about.status.intro": "1.0 öncesi: yapılandırma biçimleri ara sürümler arasında değişebilir. Aşağıda gerçek donanımda çalışmış olanlar ve henüz çalışmamış olanlar var.", "about.status.proven": "Gerçek kümelerde çalıştı", @@ -122,8 +115,21 @@ "about.status.open": "Henüz kanıtlanmadı", "about.status.open.fabrics": "Gerçek bir sahada InfiniBand ve NVLink: sminfo, ibnetdiscover ve nvidia-smi komutlarının gerçek çıktısına göre yazıldı ve sınandı, ama henüz o donanımda çalıştırılmadı. Önce birkaç düğümde llmgw doctor --json çalıştırın.", "about.status.open.planes": "Uzun süre boyunca iki kontrol düzlemi", - "about.status.open.weights": "Düğümler indirilen ağırlıkları paylaşmaz; ayna her indirmeyi yerel tutar", - + "about.status.open.weights": "Model aynası tek makinede: yüksek erişilebilir bir kurulumdaki son tek nokta", "about.footer.changelog": "Değişiklik günlüğü", - "about.footer.reference": "Yapılandırma başvurusu" + "about.footer.reference": "Yapılandırma başvurusu", + "about.what.knowledge.title": "Belgelerinizden yanıtlar", + "about.what.knowledge.text": "Kişiler PDF, Office ve e-postaları kendi makinelerinden llmgw-kb ile ekler; yalnızca metin ve vektörler gönderilir. Her kuruluş, ekip ve proje veritabanı satırına kadar yalnızca kendi koleksiyonlarını görür.", + "about.what.guard.title": "Her istekte koruma", + "about.what.guard.text": "Kişisel veriler, gizli bilgiler, istem enjeksiyonu ve yasaklı kalıplar; işlemcilerde çalışan bir hakem modeliyle. Politikalar kuruluş, ekip ya da proje başına izler ya da uygular; kimsenin denetleyemediği bir yanıt reddedilir.", + "about.what.signin.title": "Şirketinizin zaten kullandığı oturum açma", + "about.what.signin.text": "Entra ID, Active Directory ya da herhangi bir OIDC sağlayıcısı; kullanıcılar ve gruplar SCIM ile; yönetici rolleri ve her değişikliğin denetim kaydı.", + "about.what.ha.title": "İlk kurulumdan yüksek erişilebilirlik", + "about.what.ha.text": "Üç makine: her biri ağ geçidini çalıştırabilir, veritabanını ikisinde Patroni altında PostgreSQL tutar, etcd üçünde de oy verir. Kurulum bunu kendisi kurar; herhangi bir makinenin kaybı hiçbir şey kaybettirmez.", + "about.what.media.title": "Görseller ve 3D modeller de", + "about.what.media.text": "Aynı kartlarda ComfyUI: görseller ve 3D modeller iş olarak kuyruğa alınır, izlenir ve dosya olarak döner; her biri üretildiği lisansı taşır.", + "about.install.cta": "Her adım, ekranlarıyla", + "about.status.proven.ha": "Kurulum ekranlarının kurduğu üç makineli yüksek erişilebilirlik; veritabanının birincil makinesinin kaybı hiçbir isteğe mal olmadı", + "about.status.proven.signin": "Bir Samba etki alanı denetleyicisine karşı denenmiş Active Directory ile ve OIDC ile oturum açma", + "about.status.proven.kb": "100.000'den fazla parçalık, kaynaklarıyla yanıt veren bilgi tabanları" } diff --git a/internal/web/locales/tr/install.json b/internal/web/locales/tr/install.json new file mode 100644 index 0000000..22cff1d --- /dev/null +++ b/internal/web/locales/tr/install.json @@ -0,0 +1,113 @@ +{ + "install.meta.description": "llmgw kurulumu adım adım: her makinenin neye ihtiyacı olduğu, ardından gerçek bir üç makineli kurulumun her ekranı, kayıt olarak.", + "install.title": "Kurulum rehberi", + "install.nav.label": "Kurulum rehberi", + "install.nav.before": "Başlamadan önce", + "install.nav.binary": "llmgw'yi edinin", + "install.nav.setup": "Kurun", + "install.nav.check": "Kontrol edin", + "install.nav.use": "İlk istek", + "install.nav.next": "Sonrası", + "install.nav.trouble": "Bir şey ters giderse", + "install.nav.about": "llmgw hakkında", + "install.step": "Adım %s", + "install.hero.eyebrow": "Kurulum rehberi · %s ile kaydedildi", + "install.hero.title": "Üç boş makineden ilk yanıta.", + "install.hero.lede": "Bu sayfadaki her ekran gerçek bir kurulumdan: üç yeni Ubuntu 24.04 makinesi ve herkesin indirebildiği sürüm. Önceden yapılan tek değişiklik, standart bir Ubuntu sunucusundaki gibi SSH'ta parolayla girişi açmaktı. Adımı okuyun, ekranı görün ya da oynatıp oturumu olduğu gibi izleyin.", + "install.hero.machines": "makine, yüksek erişilebilirlik", + "install.hero.steps": "adım, kontrollerden sonra", + "install.hero.time": "kurulum, sorular yanıtlandıktan sonra", + "install.hero.hidden": "atlanan ekran", + "install.before.title": "Başlamadan önce", + "install.before.intro": "Tek makine ya da yüksek erişilebilirlik için üç makine. Önce her birini kontrol edin; kurulum ekranları da bir şey kurmadan önce hepsini yeniden denetler.", + "install.before.commands": "Aynı kontroller elle, her makinede:", + "install.req.machines": "Makineler", + "install.req.machines.text": "Bir, ya da yüksek erişilebilirlik için üç: üçünün her biri ağ geçidini çalıştırabilir, ikisi veritabanını eşlenmiş tutar ve herhangi birinin kaybı hiçbir şey kaybettirmez.", + "install.req.system": "Sistem", + "install.req.system.text": "Ubuntu 22.04 ya da 24.04, Debian 12 ya da RHEL 10; x86-64 ya da ARM64.", + "install.req.size": "Boyut", + "install.req.size.text": "Her birinde en az 2 işlemci çekirdeği ve 3,5 GB bellek; ilk makinede 15 GB, veritabanını tutan iki makinede 30 GB boş disk.", + "install.req.clock": "Saat", + "install.req.clock.text": "Eşzamanlı: makineler arasındaki fark bir saniyeyi geçmemeli.", + "install.req.network": "Ağ", + "install.req.network.text": "Makineler birbirine ulaşır. Kullanıcılar ağ geçidine 8080 üzerinden, düğümler 7443 ve 8081 üzerinden ulaşır. Motorları ve modelleri indirmek için internet erişimi ya da çevrimdışı bir paket.", + "install.req.access": "Erişim", + "install.req.access.text": "Her makinede sudo. İlk makineden diğer ikisine parola, anahtar ya da ssh ajanı ile SSH; kimsenin giriş yapamadığı bir makine bunun yerine bir kodla katılır.", + "install.req.names": "Adlar", + "install.req.names.text": "Her makinenin kendine ait bir adı (hostname). Kümede makinenin adı bu olur.", + "install.req.gpus": "GPU düğümleri", + "install.req.gpus.text": "Sonradan, NVIDIA sürücüsü kurulu olarak eklenir. llama.cpp, vLLM, Python ve CUDA'yı llmgw kendisi kurar.", + "install.req.memory_note": "İlk makine model de çalıştırıyorsa bellek. Bu kayıtta ilk makine başlangıç modelini ve iki koruma hakemini birlikte çalıştırıyor. 8 GB ile başlangıç modeline yer kalmadı; 12 GB ile hepsi sığıyor.", + "install.binary.title": "llmgw'yi edinin", + "install.binary.intro": "Tek bir statik dosya, her makinede aynı. Yalnızca ilk makinede gerekir: kurulum onu diğerlerine kendisi kopyalar.", + "install.binary.text": "Son sürüm, sağlama toplamı denetlenerek. sha256sum OK demelidir; demiyorsa indirme bozuktur.", + "install.setup.title": "Kurun", + "install.setup.intro": "Hiçbir şey kurulu değilken llmgw kurulum ekranlarını açar. Sorar, her makineyi denetler, planı gösterir ve kurar.", + "install.setup.text": "İlk makinede:", + "install.setup.keys": "Yalnızca klavye: ok tuşlarıyla gezinin, boşluk tuşuyla bir parçayı açıp kapatın, Enter ile ayarlarını açın ya da ilerleyin, Esc ile geri dönün. Seri konsoldan da çalışır.", + "install.sc1.tab": "Bir ya da üç", + "install.sc1.text": "Bir makine ya da üç. Henüz llmgw'nin hiçbir parçası kurulu olmadığı için kurulum buradan başlar. Tek makine her şeyi çalıştırır; üç makine yüksek erişilebilirliktir.", + "install.sc2.tab": "Ne kurulacak", + "install.sc2.text": "Her parça, açık ya da kapalı. Bir parçanın üzerinde Enter, ayarlarını açar ve ne işe yaradığını anlatır. Burada bu makine aynı zamanda küçük başlangıç modeliyle bir düğüm; böylece kurulum biter bitmez soracak bir şey olur.", + "install.sc3.tab": "Yönetici", + "install.sc3.text": "Kontrol düzleminin ayarları. Yöneticinin e-postası (onun için bir parola üretilir ve en sonda bir kez gösterilir), düğümlerin bu makineye ulaştığı diğer adlar, portalın dili ve kişilerin kendi kendine kaydolup olamayacağı.", + "install.sc4.tab": "Diğer ikisi", + "install.sc4.text": "Veritabanını tutan makineler. Adres, kullanıcı ve giriş yolu: ssh ajanı, anahtar dosyası, parola ya da katılım kodu. Parolalar yalnızca bu kurulum için, bellekte tutulur.", + "install.sc5.tab": "Kontroller", + "install.sc5.text": "Bir şey kurulmadan önce her makine denetlenir: giriş, sistem, işlemci mimarisi, çekirdekler, bellek, disk, saat, portlar, internet ve makinelerin birbirine ulaşıp ulaşmadığı. Başarısız olanı düzeltip R'ye basın.", + "install.sc6.tab": "Plan", + "install.sc6.text": "Nelerin kurulacağı ve nelerin dışarıda kalacağı. Değiştirmek için Esc ile geri dönün; Enter kurar.", + "install.sc7.tab": "Kurulum", + "install.sc7.text": "Siz izlerken kurulanlar: sertifika yetkilisi ve sertifikalar, üçünde de etcd, diğer ikisinde Patroni altında PostgreSQL, üçünde de kontrol düzlemi, model aynası, koruma hakemleri ve başlangıç modeli.", + "install.sc8.tab": "Bitti", + "install.sc8.text": "Yöneticinin parolası, bir kez gösterilir. Hemen kopyalayın. Altında aynı kurulum, bir betik için tek komut olarak.", + "install.setup.whole": "Kurulumun tamamı, olduğu gibi", + "install.setup.script.title": "Aynısı, bir betikten", + "install.setup.script.intro": "Son ekranın yazdığı komut. Yeniden çalıştırmak güvenlidir: var olanı korur, eksik olanı tamamlar.", + "install.check.title": "Kontrol edin", + "install.check.intro": "Üç makinenin herhangi birinden.", + "install.check.text": "llmgw status tüm sistemi birkaç satırda gösterir: düğümler, kopyalar, modeller, hangi kontrol düzleminin önde olduğu ve veritabanı. Yeniden çalıştırıldığında sudo llmgw konsoldur. Tarayıcıda http://<ilk makine>:8080 portaldır; son kurulum ekranındaki parolayla giriş yapın.", + "install.use.title": "İlk istek", + "install.use.intro": "Hesap sayfasından alınan bir anahtarla.", + "install.use.text": "Hesap sayfasında Anahtar oluştur: anahtar bir kez gösterilir. Her OpenAI istemcisi onunla çalışır; yalnızca temel adres http://<ilk makine>:8080/v1 olarak değişir. Sohbet sayfası da aynı modellerle yanıt verir.", + "install.cast.0-prereq": "İlk makinedeki kontroller, ardından üç makinenin her birine bir ad.", + "install.cast.1-binary": "Son sürüm, sağlama toplamı denetlenmiş ve kurulmuş.", + "install.cast.2-setup": "Kurulumun ilk sorudan yöneticinin parolasına kadar her ekranı. Uzun beklemeler kısaltıldı; hiçbir şey atlanmadı.", + "install.cast.3-check": "Sistemin durumu, ardından konsol.", + "install.cast.4-request": "Hesap sayfasından bir anahtar ve yanıt veren başlangıç modeli.", + "install.shot.login": "Portalın giriş sayfası, ilk makinenin 8080 portunda.", + "install.shot.admin": "Küme sayfası: düğüm, belleği ve diski, ve her birinin ne tuttuğuyla modeller.", + "install.shot.newkey": "Hesap sayfasında üretilen, bir kez gösterilen anahtar ve kopyalanacak bir istek.", + "install.shot.chat": "Başlangıç modeliyle sohbet sayfası.", + "install.next.title": "Sonrası", + "install.next.intro": "Hepsi komut satırında olduğu gibi konsolda da, Do altında var.", + "install.next.nodes.title": "GPU düğümleri", + "install.next.nodes.text": "sudo llmgw node add <kullanıcı>@<adres> giriş yapar, llmgw'yi kurar, düğümü llmgw doctor ile denetler ve ajanını başlatır. Düğüm motorlarını kendisi kurar.", + "install.next.models.title": "Modeller", + "install.next.models.text": "/admin/mirror → Modelleri keşfet: düğümlerinızın çalıştırabildikleri, aynaya bir kez indirilir, sonra sürekli açık ya da istek geldikçe sunulur.", + "install.next.people.title": "Kişiler", + "install.next.people.text": "Hesaplar, kuruluşlar ve projeler, bütçeler ve sınırlar; Entra ID, Active Directory ya da OIDC ile tek oturum açma.", + "install.next.https.title": "HTTPS", + "install.next.https.text": "Güvenilir bir ağın dışından biri kullanmadan önce 8080 portunun önüne Caddy ya da nginx koyun. Yapılandırmalar tanıtım sayfasında.", + "install.trouble.title": "Bir şey ters giderse", + "install.trouble.intro": "Bu kurulumun karşılaştıkları ve sık görülen diğerleri.", + "install.trouble.see": "Gördüğünüz", + "install.trouble.do": "Yapılacak", + "install.trouble.starter.see": "Kurulumun sonunda starter model … has nowhere to run", + "install.trouble.starter.do": "İlk makinede hakemlerden sonra yer kalmamış. Neyin eksik olduğunu llmgw ctl explain-placement <model> söyler. Belleğini artırın ya da bir düğüm ekleyin, sonra sudo llmgw komutunu yeniden çalıştırın: eksik olanı tamamlar.", + "install.trouble.judge.see": "Yanıt boş geliyor, \"finish_reason\": \"content_filter\" ile", + "install.trouble.judge.do": "Koruma hakemi zamanında karar vermedi; denetlenemeyen bir yanıt geçirilmez, reddedilir. Hakemin boş çekirdeğe ihtiyacı var; bir modelle paylaşılan makinede süresini aşabilir. Hakemlere daha çok çekirdek ya da kendilerine ait bir makine verin.", + "install.trouble.ssh.see": "Kontroller diğer bir makineye giriş yapamıyor", + "install.trouble.ssh.do": "Birçok bulut imajı SSH'ta parolayla girişi kapatır. Bunun yerine anahtar dosyası ya da ssh ajanı kullanın, ya da o makinede bir katılım koduyla: llmgw join <kod>.", + "install.trouble.check.see": "Bir kontrol başarısız: portlar, saat, disk", + "install.trouble.check.do": "Her biri ne bulduğunu söyler. O makinede düzeltin ve kontroller ekranında R'ye basın.", + "install.trouble.node.see": "Bir makineyle ilgili başka her şey", + "install.trouble.node.do": "O makinede sudo llmgw doctor. --json okuduğu her şeyi, size yardım edecek kişiye göndermek için yazar.", + "install.footer.recorded": "ekranlar %s ile kaydedildi", + "install.footer.full": "Ayrıntılı kurulum rehberi", + "install.play": "Oynat", + "install.pause": "Duraklat", + "install.again": "Yeniden oynat", + "install.tty_label": "Kaydedilmiş bir terminal ekranı", + "install.hero.time_value": "~3 dk" +} diff --git a/internal/web/static/guide/admin.png b/internal/web/static/guide/admin.png new file mode 100644 index 0000000..040d976 Binary files /dev/null and b/internal/web/static/guide/admin.png differ diff --git a/internal/web/static/guide/chat.png b/internal/web/static/guide/chat.png new file mode 100644 index 0000000..7218ad9 Binary files /dev/null and b/internal/web/static/guide/chat.png differ diff --git a/internal/web/static/guide/login.png b/internal/web/static/guide/login.png new file mode 100644 index 0000000..928fe01 Binary files /dev/null and b/internal/web/static/guide/login.png differ diff --git a/internal/web/static/guide/newkey.png b/internal/web/static/guide/newkey.png new file mode 100644 index 0000000..08c8bd6 Binary files /dev/null and b/internal/web/static/guide/newkey.png differ diff --git a/internal/web/templates/about.html b/internal/web/templates/about.html index 97fddc0..c9f7ac1 100644 --- a/internal/web/templates/about.html +++ b/internal/web/templates/about.html @@ -3,179 +3,7 @@ {{end}}llmgw -{{if .Site}} - - -{{end}} +{{template "sitestyle" .}} {{if not .Site}}{{end}}
@@ -205,7 +33,7 @@ footer a{color:var(--muted)}

{{t "about.hero.lede"}}

{{t "about.hero.download"}}{{with .Release}} {{.}}{{end}} - {{t "about.hero.guide"}} + {{t "about.hero.guide"}}
$ sudo llmgw server init --admin you@example.com @@ -290,6 +118,16 @@ footer a{color:var(--muted)}

{{t "about.what.upgrades.text"}}

{{t "about.what.dashboard.title"}}

{{th "about.what.dashboard.text"}}

+

{{t "about.what.knowledge.title"}}

+

{{th "about.what.knowledge.text"}}

+

{{t "about.what.guard.title"}}

+

{{t "about.what.guard.text"}}

+

{{t "about.what.signin.title"}}

+

{{t "about.what.signin.text"}}

+

{{t "about.what.ha.title"}}

+

{{t "about.what.ha.text"}}

+

{{t "about.what.media.title"}}

+

{{t "about.what.media.text"}}

@@ -335,7 +173,8 @@ footer a{color:var(--muted)}

{{t "about.install.title"}}

{{t "about.install.intro"}}

-

{{th "about.install.guide"}}

+

{{th "about.install.guide" .InstallURL}}

+

{{t "about.install.cta"}} →

  1. @@ -350,13 +189,13 @@ sudo install -m0755 llmgw-$VERSION-linux-amd64 /usr/local/bin/llmgw
  2. {{t "about.install.server.title"}}

    {{th "about.install.server.text"}}

    -
    sudo llmgw server init --admin you@example.com
    +
    sudo llmgw
    +
    {{.Still "setup-checks"}}
  3. {{t "about.install.node.title"}}

    -

    {{t "about.install.node.text"}}

    -
    deploy/bootstrap/onboard-node.sh --node gpu01 --addr 10.0.0.141 \
    -  --server https://10.0.0.140:7443 --fabric ib-a:mlx5_0,mlx5_1
    +

    {{th "about.install.node.text"}}

    +
    sudo llmgw node add ubuntu@10.0.0.21 --fabric ib-a:mlx5_0,mlx5_1
    $ llmgw ctl nodes
     NODE   STATE  GPUS      MEM   CLASSES   FABRICS  REPLICAS  LAST SEEN
     gpu01  ready  8/8 free  503G  h100-80g  ib-a     0         2s
    @@ -364,9 +203,7 @@ gpu01 ready 8/8 free 503G h100-80g ib-a 0
  4. {{t "about.install.model.title"}}

    {{th "about.install.model.text"}}

    -
    llmgw ctl model add -f qwen-coder-3b.yaml
    -
    -curl https://llm.example.com/v1/chat/completions \
    +        
    curl https://llm.example.com/v1/chat/completions \
       -H "Authorization: Bearer $LLMGW_API_KEY" \
       -H "Content-Type: application/json" \
       -d '{"model": "coder", "messages": [{"role": "user", "content": "hello"}]}'
    @@ -456,6 +293,9 @@ curl https://llm.example.com/v1/chat/completions \
  5. {{t "about.status.proven.upgrades"}}
  6. {{t "about.status.proven.stores"}}
  7. {{t "about.status.proven.chat"}}
  8. +
  9. {{t "about.status.proven.ha"}}
  10. +
  11. {{t "about.status.proven.signin"}}
  12. +
  13. {{t "about.status.proven.kb"}}
  14. diff --git a/internal/web/templates/install.html b/internal/web/templates/install.html new file mode 100644 index 0000000..e7b68a3 --- /dev/null +++ b/internal/web/templates/install.html @@ -0,0 +1,367 @@ +{{define "install"}}{{if not .Site}} + + + +{{end}}{{t "install.title"}} · llmgw +{{template "sitestyle" .}} + +{{if not .Site}}{{end}} + +
    +
    + + + llmgw + + +
    + +
    +
    +

    {{t "install.hero.eyebrow" .Recorded}}

    +

    {{th "install.hero.title"}}

    +

    {{t "install.hero.lede"}}

    +
    + 3{{t "install.hero.machines"}} + 4{{t "install.hero.steps"}} + {{t "install.hero.time_value"}}{{t "install.hero.time"}} + 0{{t "install.hero.hidden"}} +
    +
      +
    1. 0{{t "install.nav.before"}}
    2. +
    3. 1{{t "install.nav.binary"}}
    4. +
    5. 2{{t "install.nav.setup"}}
    6. +
    7. 3{{t "install.nav.check"}}
    8. +
    9. 4{{t "install.nav.use"}}
    10. +
    11. →{{t "install.nav.next"}}
    12. +
    +
    +
    + +
    +
    +
    +

    {{t "install.step" "0"}}

    +

    {{t "install.before.title"}}

    +

    {{t "install.before.intro"}}

    +
    +
    +
    + + + + + + + + + + + +
    {{t "install.req.machines"}}{{t "install.req.machines.text"}}
    {{t "install.req.system"}}{{t "install.req.system.text"}}
    {{t "install.req.size"}}{{t "install.req.size.text"}}
    {{t "install.req.clock"}}{{t "install.req.clock.text"}}
    {{t "install.req.network"}}{{th "install.req.network.text"}}
    {{t "install.req.access"}}{{th "install.req.access.text"}}
    {{t "install.req.names"}}{{t "install.req.names.text"}}
    {{t "install.req.gpus"}}{{t "install.req.gpus.text"}}
    +
    +

    {{th "install.req.memory_note"}}

    +

    {{t "install.before.commands"}}

    +
    grep PRETTY_NAME /etc/os-release; uname -m; nproc; free -h | grep Mem; df -h /
    +timedatectl | grep synchronized; curl -sI https://gitea.mynodes.xyz | head -1
    +ping -c1 <second machine>; ping -c1 <third machine>
    +sudo -v && echo "sudo works"
    +sudo hostnamectl set-hostname llm-1          # a name of its own, on each machine
    +
    +
    + {{template "tty" (.Cast "0-prereq")}} +
    + +
    +
    +
    +

    {{t "install.step" "1"}}

    +

    {{t "install.binary.title"}}

    +

    {{t "install.binary.intro"}}

    +
    +
    +

    {{th "install.binary.text"}}

    +
    VERSION=$(curl -fsSL https://gitea.mynodes.xyz/api/v1/repos/ilker/llmgw/releases/latest \
    +  | grep -o '"tag_name":"[^"]*"' | cut -d'"' -f4)
    +U=https://gitea.mynodes.xyz/ilker/llmgw/releases/download/$VERSION
    +curl -fsSLO $U/llmgw-$VERSION-linux-amd64          # -linux-arm64 on ARM
    +curl -fsSL $U/checksums.txt | sha256sum -c --ignore-missing
    +sudo install -m0755 llmgw-$VERSION-linux-amd64 /usr/local/bin/llmgw
    +llmgw --version
    +
    +
    + {{template "tty" (.Cast "1-binary")}} +
    + +
    +
    +
    +

    {{t "install.step" "2"}}

    +

    {{t "install.setup.title"}}

    +

    {{t "install.setup.intro"}}

    +
    +
    +

    {{t "install.setup.text"}}

    +
    sudo llmgw
    +

    {{t "install.setup.keys"}}

    +
    +
    + +
    + + + +
    {{template "still" (.Shot "setup-start" "2.1")}}

    {{th "install.sc1.text"}}

    +
    {{template "still" (.Shot "setup-choices" "2.2")}}

    {{th "install.sc2.text"}}

    +
    {{template "still" (.Shot "setup-admin" "2.3")}}

    {{th "install.sc3.text"}}

    +
    {{template "still" (.Shot "setup-machines" "2.4")}}

    {{th "install.sc4.text"}}

    +
    {{template "still" (.Shot "setup-checks" "2.5")}}

    {{th "install.sc5.text"}}

    +
    {{template "still" (.Shot "setup-plan" "2.6")}}

    {{th "install.sc6.text"}}

    +
    {{template "still" (.Shot "setup-install" "2.7")}}

    {{th "install.sc7.text"}}

    +
    {{template "still" (.Shot "setup-done" "2.8")}}

    {{th "install.sc8.text"}}

    +
    + +
    +

    {{t "install.setup.whole"}}

    + {{template "tty" (.Cast "2-setup")}} +
    + +
    +

    {{t "install.setup.script.title"}}

    {{t "install.setup.script.intro"}}

    +
    sudo --preserve-env=SSH_AUTH_SOCK llmgw server init \
    +    --admin you@example.com \
    +    --patroni <user>@<second machine> \
    +    --patroni <user>@<third machine> \
    +    --standbys
    +
    +sudo llmgw server init --admin you@example.com       # one machine
    +
    +
    + +
    +
    +
    +

    {{t "install.step" "3"}}

    +

    {{t "install.check.title"}}

    +

    {{t "install.check.intro"}}

    +
    +
    +

    {{th "install.check.text"}}

    +
    sudo llmgw status
    +sudo llmgw                                       # the console
    +
    +
    + {{template "tty" (.Cast "3-check")}} +
    +
    {{t
    {{t "install.shot.login"}}
    +
    {{t
    {{t "install.shot.admin"}}
    +
    +
    + +
    +
    +
    +

    {{t "install.step" "4"}}

    +

    {{t "install.use.title"}}

    +

    {{t "install.use.intro"}}

    +
    +
    +

    {{th "install.use.text"}}

    +
    export LLMGW_API_KEY=sk-llmgw-…                   # from the account page
    +curl http://<first machine>:8080/v1/chat/completions \
    +  -H "Authorization: Bearer $LLMGW_API_KEY" \
    +  -H "Content-Type: application/json" \
    +  -d '{"model": "qwen-0.5b", "messages": [{"role": "user", "content": "hello"}]}'
    +
    +
    +
    +
    {{t
    {{t "install.shot.newkey"}}
    +
    {{t
    {{t "install.shot.chat"}}
    +
    + {{template "tty" (.Cast "4-request")}} +
    + +
    +
    +
    +

    {{t "install.next.title"}}

    +

    {{t "install.next.intro"}}

    +
    +
    +

    {{t "install.next.nodes.title"}}

    {{th "install.next.nodes.text"}}

    +

    {{t "install.next.models.title"}}

    {{th "install.next.models.text"}}

    +

    {{t "install.next.people.title"}}

    {{th "install.next.people.text"}}

    +

    {{t "install.next.https.title"}}

    {{th "install.next.https.text" .AboutURL}}

    +
    +
    +
    + +
    +
    +
    +

    {{t "install.trouble.title"}}

    +

    {{t "install.trouble.intro"}}

    +
    +
    + + + + + + + + + +
    {{t "install.trouble.see"}}{{t "install.trouble.do"}}
    {{th "install.trouble.starter.see"}}{{th "install.trouble.starter.do"}}
    {{th "install.trouble.judge.see"}}{{th "install.trouble.judge.do"}}
    {{th "install.trouble.ssh.see"}}{{th "install.trouble.ssh.do"}}
    {{th "install.trouble.check.see"}}{{th "install.trouble.check.do"}}
    {{th "install.trouble.node.see"}}{{th "install.trouble.node.do"}}
    +
    +
    +
    + + +
    + + +{{if not .Site}}{{end}}{{end}} + +{{define "tty"}}
    +
    + ilker@llm-1 · {{.Cols}}×{{.Rows}} +
    +
    {{.Poster}}
    +
    +
    {{t (print "install.cast." .Name)}}
    +
    {{end}} + +{{define "still"}}
    +
    + sudo llmgw · {{.Label}}
    +
    {{.Screen}}
    +
    {{end}} diff --git a/internal/web/templates/site.html b/internal/web/templates/site.html new file mode 100644 index 0000000..b245342 --- /dev/null +++ b/internal/web/templates/site.html @@ -0,0 +1,176 @@ +{{/* The look /about and /install share: their fonts, from this binary or, + for the published website, from Google; and one stylesheet. */}} +{{define "sitestyle"}}{{if .Site}} + + +{{end}} +{{end}}