build: bundle the atlas CLI binary alongside the formae installer#479
Open
JeroenSoeters wants to merge 1 commit into
Open
build: bundle the atlas CLI binary alongside the formae installer#479JeroenSoeters wants to merge 1 commit into
JeroenSoeters wants to merge 1 commit into
Conversation
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.
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.
Summary
scripts/install-atlas.sh(platform detection for darwin/linux amd64/arm64) downloads the binary into the repo root onmake build;pkg-bincopies it todist/pel/bin/so it lands next to the formae binary at$INSTALL_DIR/bin/atlason the agent host.ATLAS_VERSIONdefaults tolatestbecause release.ariga.io currently only serves alatestURL. 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 withATLAS_VERSION=<ver>.Why
formae-plugin-atlas (and any future plugin wrapping atlas's CLI) shells out to the
atlasbinary at runtime viaariga.io/atlas-go-sdk/atlasexec, discovering it throughexec.LookPath. Today every consumer of the plugin has to install atlas themselves on every agent host — the hub does it viacurl -sSf https://atlasgo.sh | shin its custom Dockerfile, but that doesn't scale to other operators. Bundling atlas in the installer gives every plugin useratlason$PATHfor free.