Repository navigation
install: serve localhost registry images to the local cluster - #666
Merged
Merged
Conversation
aojea
commented
Nov 20, 2026
aojea
commented
Nov 20, 2026
aojea
commented
Nov 20, 2026
mayawang
approved these changes
Nov 20, 2026
mayawang
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, thanks Andrew! Nice that it only kicks in for localhost refs, so the ghcr path is untouched. Let's get it in before the rc cut
Collaborator
Author
|
@mayawang hold for a moment there are things that are not correct. I will undraft when is ready |
Collaborator
|
no rush, thanks Andrew! we'll pick it up for the next rc |
aojea
force-pushed
the
local-start-loopback-registry
branch
from
November 20, 2026 19:49
35a4c1f to
9b4f7a7
Compare
'ax local start' with an image on a localhost registry, such as localhost:5001/ax-server, could not start ax-server. The Kind node pulled the image from its own localhost, where no registry listens, so the pod stayed Pending in ImagePullBackOff until the rollout wait timed out (#648). The Agent Substrate manifests that 'ax local' installs already make atelet pull the actor images of a loopback registry from kind-registry:5000. That is the registry container of Substrate's hack/create-kind-cluster.sh, which also connects the container to the network of the cluster and adds a containerd mirror on each node. 'ax local start' creates the cluster itself and did neither. So the node could not pull pod images, and atelet could reach the container only when it was already on that network. 'ax local start' now reads that registry from the embedded manifests (installsubstrate.LocalRegistryEndpoint) and gives it to the Kind provider with the image references of the install. For the references on localhost or a loopback address, KindProvider.Up connects the registry container to the network of the nodes and adds the containerd mirror on each node. Before it creates a cluster it checks that the container is running, and stops with the command to start it when it is not. No Go file names the registry. No test ran 'ax local start' on a cluster: E2E installs AX with Substrate's own tools. 'make test-local-install' (hack/test-local-install.sh) builds the images into a registry on localhost, runs 'ax local start' with them, and runs a task from a locally built image. It fails on main without this change. CI runs it as the job local-install in e2e.yml.
aojea
force-pushed
the
local-start-loopback-registry
branch
from
November 20, 2026 20:46
9b4f7a7 to
3d9e1bd
Compare
aojea
commented
Nov 20, 2026
Comment on lines
+94
to
+100
|
|
||
| # The only job that runs `ax local start`: the E2E job above installs AX | ||
| # with Substrate's own tools. It builds the AX images into a registry on | ||
| # localhost, as docs/local_installer.md describes, starts a local cluster | ||
| # from them, and runs a task. The Substrate it installs is the one embedded | ||
| # in ax, so substrate_ref does not apply. | ||
| local-install: |
Collaborator
Author
There was a problem hiding this comment.
This jobs ensures we never regress on the user experience
aojea
marked this pull request as ready for review
November 20, 2026 20:51
rakyll
approved these changes
Nov 20, 2026
Collaborator
Author
|
ok @mayawang fat fingers here should I revert or is ok to be merged ... I apologize I don't understand the workflows yet in this project |
mayawang
added a commit
to mayawang/ax
that referenced
this pull request
Nov 21, 2026
Keep google#666's localhost registry reference from README.md in docs/development.md#build-and-push-images alongside make images. Verification: - export GOTOOLCHAIN=auto && make verify (0 issues) - go build ./cmd/ax ./cmd/ax-server ./cmd/ax-runner - go test -count=1 ./... (all unit packages passed; Postgres and Kind E2E self-skip without env opt-in) Part of google#661 Fixes google#680
aojea
added a commit
that referenced
this pull request
Nov 21, 2026
The local install job fails on main: hack/test-local-install.sh reads bin/ax-task-runner.digest, and 'make images' writes bin/ax-runner.digest since ax-task-runner was renamed to ax-runner (#677). #677 merged after the last CI run of #666, which added the script, and before #666 merged, so neither change saw the other. The guide has the same command in "Using Locally Built Images", and a unit test has the old name in two sample image references. Use the new name in all three. When the script fails before 'ax local start' creates a cluster, it no longer prints the state of a cluster. There is none, and kubectl printed only connection errors.
mayawang
added a commit
to mayawang/ax
that referenced
this pull request
Nov 23, 2026
Keep google#666's localhost registry reference from README.md in docs/development.md#build-and-push-images alongside make images. Verification: - export GOTOOLCHAIN=auto && make verify (0 issues) - go build ./cmd/ax ./cmd/ax-server ./cmd/ax-runner - go test -count=1 ./... (all unit packages passed; Postgres and Kind E2E self-skip without env opt-in) Part of google#661 Fixes google#680
mayawang
added a commit
to mayawang/ax
that referenced
this pull request
Nov 23, 2026
Keep google#666's localhost registry reference from README.md in docs/development.md#build-and-push-images alongside make images. Verification: - export GOTOOLCHAIN=auto && make verify (0 issues) - go build ./cmd/ax ./cmd/ax-server ./cmd/ax-runner - go test -count=1 ./... (all unit packages passed; Postgres and Kind E2E self-skip without env opt-in) Part of google#661 Fixes google#680
mayawang
added a commit
that referenced
this pull request
Nov 23, 2026
…uickstart (#678) ## Summary Prepares zero-flag release `ax-server` installs, Studio bundling, and simplified quickstart docs on `main` (ready to backport onto `release-0.4` for `v0.4.0-rc.2`): - **Release `ax-server` default (#661):** Replace empty `DefaultServerImage` with `axdeploy.DefaultServerImage()`, returning `version.Image("ax-server")` when `version.IsRelease()` is true so `EnsureDigestPinned` pins the multi-arch `@sha256` digest at install time. Unversioned dev builds still require `--server-image` or `$AX_SERVER_IMAGE`, and `imageFlags.register` leaves flag defaults empty so `$AX_SERVER_IMAGE` continues to take precedence over release defaults. `DefaultRunnerVolumeImage` stays empty pending #661 / #625. - **Pin AX Studio in `install.sh`:** Set `PINNED_STUDIO_VERSION="v0.4.0-rc.1"` with verified SHA-256 digests from [`agentexecutor/studio v0.4.0-rc.1` checksums.txt](https://github.com/agentexecutor/studio/releases/tag/v0.4.0-rc.1) for all four release platforms, update the printed next step to `ax local start`, and update `TestInstallShStudioPinning`. - **Move source image builds out of `README.md`:** Simplify `README.md` quick start to `install.sh` (now installing both `ax` and `ax-studio`) + `ax local start` / `ax install`, document that prebuilt agent images with no runner baked in (such as Antigravity) need `--runner-volume-image` from the release notes in `README.md` and `docs/local_installer.md`, move `make images` instructions and the `localhost` registry link from #666 to `docs/development.md#build-and-push-images` (keeping `Using Locally Built Images` in `docs/local_installer.md`), and update `docs/releasing.md`. Part of #661. Fixes #680. ## Verification ```bash export GOTOOLCHAIN=auto make verify # buf, go mod tidy, go fmt, golangci-lint: 0 issues go build ./cmd/ax ./cmd/ax-server ./cmd/ax-runner # passed go test -count=1 ./... # all unit packages passed (Postgres & Kind E2E self-skip without env opt-in) sh -n install.sh # passed go build -ldflags "-X github.com/google/ax/internal/version.Version=v0.4.0-rc.2" -o /tmp/ax-rc2-check ./cmd/ax && /tmp/ax-rc2-check local --help # Verified --server-image prints: (default: "ghcr.io/google/ax/ax-server:v0.4.0-rc.2") ``` cc @MushuEE for release-defaults review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ax local startcannot startax-serverfrom an image on alocalhostregistry. Before release images exist, that is the only registry a developer has without an external one. The symptom is the one in #648:ax-serverstaysPending, andax get tasksfails withpod is not running. Current status=Pending.Reproduce
On
mainat de7de90, Linux, Docker 29.8, kind v0.33:It fails after 4 min 46 s. These commands were run before #647 removed the default task image; on current
main, omit theAX_DEFAULT_TASK_IMAGEline. Onmainat 465cbeb, the smoke test that this PR adds runs the same steps and fails in the same way after 5 min. Since #655 the wait shows the reason:During the wait, in a second terminal (seen on 212bf13, not run again on de7de90):
Cause
In the Kind node,
localhost:5001is the node itself, and no registry listens there. The host resolves the digest without error, because the registry is on the host'slocalhost.The Agent Substrate manifests that
axembeds are Substrate's kind overlay. In them atelet has--localhost-registry-replacement=kind-registry:5000, so actor images on a loopback registry come from a container namedkind-registry. Substrate'shack/create-kind-cluster.shcreates that container, connects it to thekindnetwork, and writes/etc/containerd/certs.d/localhost:<port>/hosts.tomlon each node.ax local startcreates the cluster in Go and does not do the last two steps. So the node cannot pull pod images fromlocalhost, andax-serveris the first one. atelet can reachkind-registryonly when the container is already on that network.Change
ax local startreads the registry that serveslocalhostimages from the embedded Substrate manifests:installsubstrate.LocalRegistryEndpointreturns the value of atelet's--localhost-registry-replacement. It gives that endpoint and the image references of the install to the Kind provider (UpOptions.LocalRegistry,UpOptions.Images). No Go file names the registry.For the references on
localhostor a loopback address,KindProvider.Up:certs.d/<registry>/hosts.tomlon each node, with the endpoint as the host.It does not create the registry, because the images must already be in it.
Test:
make test-local-install(hack/test-local-install.sh) builds the images into a registry onlocalhost, runsax local startwith them, and runs a task from a locally built image. No test ranax local starton a cluster before: E2E installs AX with Substrate's own tools. CI runs it as the joblocal-installine2e.yml, with the triggers of E2E. It is not a required check.Docs: a "Using Locally Built Images" section in
docs/local_installer.md, a pointer to it in the README, the new test indocs/development.mdandAGENTS.md, and a row in the address table of the Substrate skill.The registry container must still have the name and port of Substrate's kind overlay (
kind-registry,5000). The guide gives the command.Result
With this change, rebased on
mainat 465cbeb,ax local start --server-image "$AX_SERVER_IMAGE"gives:kindnetworkspec.profile.imageonlocalhost:5001ax sshran in the gVisor sandbox,/workspacesurvived suspend and resumekind-registrycontainer stoppedmake test-local-installwith this changemainat 465cbeb, without this changeImagePullBackOffreason, exit code 1make verify,go buildof the three binaries, andgo test ./...pass.Not verified: Podman as the cluster engine, and macOS. A server image on a remote registry was not run on a cluster; the unit tests cover that no registry is configured for it.
Not in this PR
A run after a failed run can still fail at once. The
ax-serverDeployment has the defaultprogressDeadlineSecondsof 600. After that time,kubectl rollout statusreturns an error immediately, andkubectl applyof the unchanged manifest starts no new rollout. An earlier revision of this PR restarted the Deployment in that state. This revision does not.Measured with the registry code of this PR, before the rebase on #647, on the failed cluster of the reproduction, 10 minutes after the Deployment was created:
ax local startserves the registry to the cluster, then fails in 4 s withdeployment "ax-server" exceeded its progress deadline.ax local startis ready in 4 s.Updates #648. The reproduction gives the error text of that issue, but the report does not show which image was used, so this is possibly not its cause. #655 covers images in a private registry and hosts without egress.