Repository navigation
feat: a native builder, with buildkit as a host service - #41
Merged
Merged
Conversation
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.
--mode native --role builderwas refused ("Its BuildKit runs in a container"). It now installs the Builder directly on the server, as root, without Docker or Podman.What it installs
ansibleforms-rte-builder_linux_<arch>from the ansibleforms/builder release at the controller's version, checked against that release'sSHA256SUMS(published from feat: the builder's binaries on each release builder#24 on)BuildkitVersion(v0.35.1, the same as the builder image's pin), checked against a SHA-256 pinned per architecture in the code (moby/buildkit publishes no checksum files; the pinned sums are GitHub's asset digests)ansibleforms-buildkitdrunsbuildkitd --addr unix:///run/buildkit/buildkitd.sock --group <name>as root with the OCI worker (Type=notify), and<name>runs the builder as the system user<name>,Requires=/After=BuildKitbuilder.envwithCONTROLLER_URL,RTE_NAME,RTE_TOKEN,RTE_JOIN_TOKENwhen given,CONTROLLER_TLS_VERIFY=0when the certificate is trusted,BUILDER_WORK_PATHondata/,BUILDKIT_HOST, and its probes on 127.0.0.1The layout mirrors the native Runner's:
releases/<version>/(the binary and a link to its BuildKit),current,runtime/buildkit-<v>/,data/,buildkit/(buildkitd's state and cache, root's),home/.Upgrade, rollback, uninstall, takeover
current, starts both and waits for the builder's port; old releases and unused BuildKits are prunedcurrentback, so BuildKit goes back with itWithout root
Refused, in every language: a Builder installed directly needs root, its BuildKit runs as a root service; run the installer with sudo, or use Docker, Podman or Kubernetes.
Tests
bin/buildkitd,bin/buildkit-runc,bin/buildkit-qemu-*,bin/buildctl) matches the strip the code uses, and its SHA-256 matches GitHub's digestsbuilder.envwritten by this code,systemctl enable --nowof both. buildkitd reported ready, its socketroot:bx 0660, the builder started on it and answered/live. As the builder's user,buildctlbuilt for amd64 and arm64 (the archive's QEMU), another user was refused the socket, and the builder's ownTestRealBuildbuilt and pushed to a registry through that socket.README (roles table, Builder notes), CONTRIBUTING (how BuildKit's pin is bumped), CHANGELOG (Unreleased > Added) and the texts in all eleven languages.