fix(configuration): require containers.image instead of a private-registry default (#2054)
applyContainerDefaults no longer fills containers.image with a hard-coded private-registry reference. An unset image now fails configuration validation with 'containers.image is required for autonomous workflow workers', so a fresh instance is told at startup (and via the readiness probe at runtime) instead of at the first failed container pull. Configs that relied on the default now set it explicitly: dev.toml (the local task image:agent build, which e2e also overlays), plus commented [containers] blocks in config.example.toml and standalone.toml. The deploy docs no longer describe a code-level default.
This commit is contained in:
7 files changed
+45
-17
No files matched your search
@@ -98,6 +98,15 @@ target = "127.0.0.1:9090"
|
|||||||
# catalogue = "registry.example/owner/archipelago/catalogue"
|
# catalogue = "registry.example/owner/archipelago/catalogue"
|
||||||
# catalogue_key = "base64 public key"
|
# catalogue_key = "base64 public key"
|
||||||
|
|
||||||
|
# The image task containers run. There is no default: the daemon reports a
|
||||||
|
# missing containers.image at startup instead of guessing a registry, so set
|
||||||
|
# your own pinned reference -- see
|
||||||
|
# deployments/systemd-user-service.md#6-pinning-the-archie-agent-image.
|
||||||
|
# [containers]
|
||||||
|
# image = "registry.example.com/archie/archie-agent@sha256:<digest>"
|
||||||
|
# pull_policy = "missing"
|
||||||
|
# registry_auth = { engine = "env", key = "ARCHIE_REGISTRY_AUTH" } # when the registry needs a login
|
||||||
|
|
||||||
# Long-running agent loops that maintain memory, skills and — in dry run —
|
# Long-running agent loops that maintain memory, skills and — in dry run —
|
||||||
# file follow-up issues from recent runs. Definitions are data: the server
|
# file follow-up issues from recent runs. Definitions are data: the server
|
||||||
# validates them and the gateway applies them live.
|
# validates them and the gateway applies them live.
|
||||||
|
|||||||
@@ -16,10 +16,12 @@ of its own (`deployments/systemd-user-service.md`).
|
|||||||
|
|
||||||
`archie-agent` (the per-task sandboxed runtime) has no unit of its own. The
|
`archie-agent` (the per-task sandboxed runtime) has no unit of its own. The
|
||||||
agent image is a separate thing, pulled for the containers `archied` spawns
|
agent image is a separate thing, pulled for the containers `archied` spawns
|
||||||
per task: `[containers].image` defaults to
|
per task: `[containers].image` has no default, and the daemon reports it as
|
||||||
`git.catlow.cloud/sam/archie-agent:latest`, while this archive's `release.json`
|
missing at startup. This archive's `release.json` pins the digest the release
|
||||||
pins the digest the release published. Set `[containers].registry_auth` when
|
published, and the deploy step passes it to the install, so a release install
|
||||||
that reference is on a registry that needs a login -- see
|
needs nothing by hand; a from-source install sets the image itself. Set
|
||||||
|
`[containers].registry_auth` when the reference is on a registry that needs a
|
||||||
|
login -- see
|
||||||
`deployments/systemd-user-service.md#6-pinning-the-archie-agent-image`.
|
`deployments/systemd-user-service.md#6-pinning-the-archie-agent-image`.
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
|||||||
@@ -31,6 +31,14 @@ listen = "127.0.0.1:8484"
|
|||||||
mode = "embedded"
|
mode = "embedded"
|
||||||
url = ""
|
url = ""
|
||||||
|
|
||||||
|
# Task containers run the agent image `task image:agent` builds locally
|
||||||
|
# (docker-compose.yml tags it git.catlow.cloud/sam/archie-agent:latest), and
|
||||||
|
# the "missing" pull policy never pulls over the local build. There is no
|
||||||
|
# code-level default image: an unset containers.image fails validation at
|
||||||
|
# startup.
|
||||||
|
[containers]
|
||||||
|
image = "git.catlow.cloud/sam/archie-agent:latest"
|
||||||
|
|
||||||
# `task dev` runs archie-state-store via dev:state-store, which passes no
|
# `task dev` runs archie-state-store via dev:state-store, which passes no
|
||||||
# -listen, so the listen below is the port the store binds. It must agree with
|
# -listen, so the listen below is the port the store binds. It must agree with
|
||||||
# the target: these two lines are the only place that pair is stated. Move them
|
# the target: these two lines are the only place that pair is stated. Move them
|
||||||
|
|||||||
@@ -58,3 +58,11 @@ models = [
|
|||||||
[budgets]
|
[budgets]
|
||||||
max_steps = 60
|
max_steps = 60
|
||||||
wall_clock = "30m"
|
wall_clock = "30m"
|
||||||
|
|
||||||
|
# The image task containers run. There is no default: the daemon refuses to
|
||||||
|
# start without it and names the key, so set your own pinned reference here --
|
||||||
|
# see deployments/systemd-user-service.md#6-pinning-the-archie-agent-image.
|
||||||
|
# [containers]
|
||||||
|
# image = "registry.example.com/archie/archie-agent@sha256:<digest>"
|
||||||
|
# pull_policy = "missing"
|
||||||
|
# registry_auth = { engine = "env", key = "ARCHIE_REGISTRY_AUTH" } # when the registry needs a login
|
||||||
@@ -132,13 +132,14 @@ interactive chat keeps the host access the operator configured, while every
|
|||||||
autonomous repository workflow runs in a task-scoped Docker container. No
|
autonomous repository workflow runs in a task-scoped Docker container. No
|
||||||
Compose service or host `archie-agent` binary is required.
|
Compose service or host `archie-agent` binary is required.
|
||||||
|
|
||||||
Docker must be installed and reachable by the service user. With no explicit
|
Docker must be installed and reachable by the service user. `containers.image`
|
||||||
broker or container settings, Archie defaults `containers.image` to
|
has no default: with it unset the daemon refuses to start and names the key,
|
||||||
`git.catlow.cloud/sam/archie-agent:latest`. `single-forge-github.toml` and
|
so a fresh install learns about it at startup, not at the first failed pull.
|
||||||
`docker-nats-stack.toml` override that default with a pinned reference
|
`single-forge-github.toml` and `docker-nats-stack.toml` set a pinned
|
||||||
(`standalone.toml` and `dev.toml` leave it) -- see
|
reference; `standalone.toml` and `dev.toml` leave it for the operator to set
|
||||||
|
-- see
|
||||||
[Pinning the archie-agent image](#6-pinning-the-archie-agent-image) below. An
|
[Pinning the archie-agent image](#6-pinning-the-archie-agent-image) below. An
|
||||||
explicit equivalent, pinned the same way, is:
|
explicit reference, pinned the same way, is:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[nats]
|
[nats]
|
||||||
|
|||||||
@@ -734,7 +734,9 @@ type OpenShellConfig struct {
|
|||||||
|
|
||||||
// ContainerConfig configures Docker sandbox execution of archie-agent.
|
// ContainerConfig configures Docker sandbox execution of archie-agent.
|
||||||
type ContainerConfig struct {
|
type ContainerConfig struct {
|
||||||
// Image is the Docker image to run (e.g. "git.catlow.cloud/sam/archie-agent:latest").
|
// Image is the Docker image task workers run (e.g. "registry.example.com/archie/archie-agent:v1").
|
||||||
|
// There is no default: validation requires it so a fresh instance is told
|
||||||
|
// at startup rather than at the first failed pull.
|
||||||
Image string `toml:"image" yaml:"image"`
|
Image string `toml:"image" yaml:"image"`
|
||||||
// MaxConcurrency limits simultaneous daemon tasks and containers.
|
// MaxConcurrency limits simultaneous daemon tasks and containers.
|
||||||
// Tasks from the same repository remain serialized. 0 = no limit.
|
// Tasks from the same repository remain serialized. 0 = no limit.
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ const (
|
|||||||
defaultContainerUptime = 5 * time.Hour
|
defaultContainerUptime = 5 * time.Hour
|
||||||
defaultVolumeTTL = 72 * time.Hour
|
defaultVolumeTTL = 72 * time.Hour
|
||||||
defaultPullPolicy = "missing"
|
defaultPullPolicy = "missing"
|
||||||
defaultContainerImage = "git.catlow.cloud/sam/archie-agent:latest"
|
|
||||||
|
|
||||||
// defaultMaxResultChars bounds one tool result.
|
// defaultMaxResultChars bounds one tool result.
|
||||||
defaultMaxResultChars = 50_000
|
defaultMaxResultChars = 50_000
|
||||||
@@ -322,12 +321,11 @@ func DefaultBotEmail(forgeType, user, email string) string {
|
|||||||
return email
|
return email
|
||||||
}
|
}
|
||||||
|
|
||||||
// applyContainerDefaults makes managed task workers usable without an explicit
|
// applyContainerDefaults fills the optional [containers] values. There is
|
||||||
// [containers] section. A negative VolumeTTL is left for validation to reject.
|
// deliberately no default image: validateContainers reports a missing
|
||||||
|
// containers.image at startup instead of pointing task workers at one
|
||||||
|
// registry. A negative VolumeTTL is left for validation to reject.
|
||||||
func applyContainerDefaults(cfg *config.Config) {
|
func applyContainerDefaults(cfg *config.Config) {
|
||||||
if cfg.Containers.Image == "" {
|
|
||||||
cfg.Containers.Image = defaultContainerImage
|
|
||||||
}
|
|
||||||
if cfg.Containers.MaxUptime == 0 {
|
if cfg.Containers.MaxUptime == 0 {
|
||||||
cfg.Containers.MaxUptime = config.Duration(defaultContainerUptime)
|
cfg.Containers.MaxUptime = config.Duration(defaultContainerUptime)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user