Skip to content

build: bundle the atlas CLI binary alongside the formae installer#479

Open
JeroenSoeters wants to merge 1 commit into
mainfrom
feat/bundle-atlas-binary
Open

build: bundle the atlas CLI binary alongside the formae installer#479
JeroenSoeters wants to merge 1 commit into
mainfrom
feat/bundle-atlas-binary

Conversation

@JeroenSoeters

@JeroenSoeters JeroenSoeters commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a pinned atlas CLI binary to the formae installer's distribution tree, mirroring the existing pkl-reader-helm pattern used by the k8s plugin.
  • New scripts/install-atlas.sh (platform detection for darwin/linux amd64/arm64) downloads the binary into the repo root on make build; pkg-bin copies it to dist/pel/bin/ so it lands next to the formae binary at $INSTALL_DIR/bin/atlas on the agent host.
  • ATLAS_VERSION defaults to latest because release.ariga.io currently only serves a latest URL. Once Ariga exposes versioned paths (e.g. .../atlas-linux-amd64-v0.39.1), the default should switch to a real semver pin. Override per-build with ATLAS_VERSION=<ver>.

Why

formae-plugin-atlas (and any future plugin wrapping atlas's CLI) shells out to the atlas binary at runtime via ariga.io/atlas-go-sdk/atlasexec, discovering it through exec.LookPath. Today every consumer of the plugin has to install atlas themselves on every agent host — the hub does it via curl -sSf https://atlasgo.sh | sh in its custom Dockerfile, but that doesn't scale to other operators. Bundling atlas in the installer gives every plugin user atlas on $PATH for free.

formae-plugin-atlas (and any future plugin that wraps atlas's CLI
surface) shells out to the `atlas` binary at runtime via
ariga.io/atlas-go-sdk/atlasexec, discovering it through exec.LookPath.
Today operators have to install atlas themselves on every agent host —
the hub does it via `curl -sSf https://atlasgo.sh | sh` in its custom
Dockerfile, but every other consumer of the plugin reinvents that step.

This change mirrors the pkl-reader-helm pattern (already used by the
k8s plugin): pin a version, install the binary into the repo root on
`make build`, and ship it in dist/pel/bin/ via `pkg-bin` so the formae
installer drops it next to the formae binary on \$INSTALL_DIR/bin.

ATLAS_VERSION defaults to "latest" because release.ariga.io currently
only serves a `latest` URL — once Ariga exposes versioned paths
(e.g. .../atlas-linux-amd64-v0.39.1) switch the default to a real semver
pin. The install script supports platform detection for darwin/linux
amd64/arm64.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant