Bezugsweg als Schalter, schlankes "Image holen", up holt selbst
Drei zusammenhaengende Vereinfachungen aus der Bedienung heraus:
1. CMK_IMAGE_SOURCE bestimmt, woher ein fehlendes Image kommt:
auto erst Registry, dann Downloadportal (Vorgabe)
registry nur Registry
download nur Tarball
"auto" ist die sinnvolle Vorgabe, weil Registries nur die juengsten
Patchstaende vorhalten - genau die aeltere Version, die eine
Migration braucht, liegt dann nur noch im Archiv. Der Wechsel
geschieht ohne Rueckfrage.
2. "image get" holt ueber diesen Weg, ohne dass Edition und Version
erneut abgefragt werden. Im Menue fragt "Image holen" entsprechend
nur noch nach dem Bezugsweg; der eingestellte ist gekennzeichnet.
Der vollstaendige Assistent bleibt als eigener Punkt daneben, fuer
den Fall, dass Edition oder Version geaendert werden sollen.
3. "up" beschafft ein lokal fehlendes Image selbst, bevor compose
startet. Vorher lief compose in einen nackten Pull, der bei einer nur
im Downloadportal vorhandenen Version scheitern musste - genau der
Fall mit 2.4.0p9. Mit "up --no-fetch" bleibt das aus.
Durchgespielt mit einer absichtlich nicht existierenden Version: up
erkennt das fehlende Image, versucht die Registry, weicht auf das
Downloadportal aus, bricht nach beiden Fehlschlaegen ab - und ruft
compose gar nicht erst auf. Mit --no-fetch geht es direkt zu compose.
Nebenbei: im Auswahlmenue erschien der eingestellte Bezugsweg doppelt
(einmal als "wie eingestellt", einmal unter seinem Namen) - zwei
Eintraege mit derselben Kennung. Jetzt wird der eingestellte nur noch
gekennzeichnet.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+43
-2
@@ -546,6 +546,7 @@ The most important settings:
|
||||
| `CMK_RUNTIME` | empty = auto-detect, otherwise `docker` or `podman` |
|
||||
| `CMK_IMAGE` | **the image actually used**, always fully qualified – see [chapter 8](#8-obtaining-the-checkmk-image-raw-enterprise--co) |
|
||||
| `CMK_EDITION`, `CMK_VERSION` | inputs for the image downloader only |
|
||||
| `CMK_IMAGE_SOURCE` | `auto`/`registry`/`download` – where the image is fetched from |
|
||||
| `CMK_REGISTRY_USER/-PASSWORD` | login for `registry.checkmk.com` (Enterprise) |
|
||||
| `CMK_DOWNLOAD_USER/-PASSWORD` | login for the Checkmk download portal |
|
||||
| `CMK_SITE_ID` | the site the container creates and starts |
|
||||
@@ -842,7 +843,46 @@ In the interface there is **image → "Verfügbare Versionen auflisten"**; and
|
||||
when fetching an image the version no longer has to be typed at all – a
|
||||
selection list appears instead.
|
||||
|
||||
### 8.6 Fetching the image – three ways
|
||||
### 8.6 Fetching the image – one command, three routes
|
||||
|
||||
Once edition and version are set, this is enough:
|
||||
|
||||
```bash
|
||||
sudo ./scripts/cmk-manage.sh image get
|
||||
```
|
||||
|
||||
Where it fetches from is controlled by **`CMK_IMAGE_SOURCE`**:
|
||||
|
||||
| Value | Effect |
|
||||
|---|---|
|
||||
| `auto` (default) | registry first, then the download portal |
|
||||
| `registry` | registry only |
|
||||
| `download` | tarball from the download portal only |
|
||||
|
||||
Deviate once with `image get --source download`.
|
||||
|
||||
`auto` is the sensible default because registries only keep the most recent
|
||||
patch levels – an older version needed for a migration then only exists in the
|
||||
download portal. The switch happens automatically, without asking.
|
||||
|
||||
**`up` fetches automatically.** If the image is missing locally and edition and
|
||||
version are set, `up` obtains it first through this route – otherwise compose
|
||||
attempts a plain pull, which must fail for a version that only exists in the
|
||||
archive:
|
||||
|
||||
```
|
||||
[ INFO ] Das Image ist lokal nicht vorhanden - hole es (auto) ...
|
||||
[ INFO ] Bezugsweg 'auto': zuerst die Registry ...
|
||||
[ WARN ] Aus der Registry nicht zu bekommen - versuche das Downloadportal.
|
||||
```
|
||||
|
||||
`up --no-fetch` suppresses it.
|
||||
|
||||
In the interface this is under **image → "Image holen"**. Only the source is
|
||||
asked for there – the configured one is marked. To change edition or version,
|
||||
pick **"Etwas anderes waehlen"** or the wizard directly.
|
||||
|
||||
#### The individual steps
|
||||
|
||||
> **In the interface this is a wizard:** **image → "Image beschaffen"** walks
|
||||
> through edition, version and source in one go, then sets `CMK_EDITION`,
|
||||
@@ -1930,7 +1970,7 @@ A file chooser with directory navigation is built in.
|
||||
|
||||
| Command | Effect |
|
||||
|---|---|
|
||||
| `up` / `down` / `restart` / `pull` | control the stack |
|
||||
| `up [--no-fetch]` / `down` / `restart` / `pull` | control the stack; `up` fetches a missing image itself |
|
||||
| `status` | containers, sites, access addresses |
|
||||
| `logs [-f]` | container logs |
|
||||
| `sites` | list the sites in the container |
|
||||
@@ -1941,6 +1981,7 @@ A file chooser with directory navigation is built in.
|
||||
| `job list\|add\|set\|del\|run\|auto` | scheduled backups (own target path per job) |
|
||||
| `restore …` | restore a backup |
|
||||
| `import …` | import a migration bundle |
|
||||
| `image get` | fetch the image via the configured route |
|
||||
| `image status\|list\|versions\|repos\|why\|test\|pull\|download\|load\|use` | obtain and select the Checkmk image, and explain failures |
|
||||
| `browser [--engine …]` | terminal browser in a container – operate the Proxy Manager locally |
|
||||
| `config list\|get\|set\|edit` | show and change settings in `.env` |
|
||||
|
||||
Reference in New Issue
Block a user