Building from source
You can build each release’s tarball and container image yourself from the repository. Then run them with the steps for Docker or Linux by hand.
Before you start
Заголовок раздела «Before you start»-
Clone the repository and work in its folder.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
-
For the image, Docker Engine 23 or later, or Docker Desktop, with BuildKit, which both use by default.
make image SOURCE=fromdistalso needs the--build-contextflag that BuildKit adds todocker build. -
Free disk for the build cache, which takes about 15 GB, and for the image. A first build compiles the Rust services, the gateway and the web app, and is slow on a laptop.
-
For the release tarball, an Ubuntu 22.04 machine, or Docker as for the image.
Build the image
Заголовок раздела «Build the image»make image builds everything inside Docker and tags the image fluxer:dev, or with the tag you set in the IMAGE variable.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
BUILD_VERSION gives the image a version. Use the version of the release you build from. Without one, the image is a development build, which never looks for new releases. The build cache stays until docker builder prune deletes it.
Check the result before you run it.
Для Squad скачайте исходники и конфигурацию сборки. Команда получения готового пакета для этой платформы отсутствует.
The first prints the version you passed, and the second the list of fluxerd commands. Tagging the image with the published name and the release’s version lets that release’s compose file and the docker run line run it as they are. To use another name, change the image line in compose.yaml or the last line of docker run.
The compose.yaml in the source tree takes its version from FLUXER_VERSION. Put it in a .env file next to compose.yaml, which Docker Compose loads for every command.
FLUXER_VERSION=<version>The upgrade command in the admin panel pulls the published image. To show your own steps there, add a line like this to fluxer.env, with {version} where the version goes.
FLUXER_UPGRADE_COMMAND=Build Squad {version}, set FLUXER_VERSION={version} in .env and run docker compose up -dBuild the release tarball
Заголовок раздела «Build the release tarball»Build on Ubuntu 22.04 with the same architecture as the machine that will run Squad, amd64 or arm64, as a user who can use sudo. A tarball built there runs on every supported Debian and Ubuntu release, and the build refuses other releases.
make toolchain native-deps distmake toolchain installs the build packages with apt and puts the rest in dist/toolchain. The build writes dist/fluxer-<version>-linux-<arch>.tar.zst and dist/SHA256SUMS. Check the tarball against the checksum file, then copy it to the machine that will run Squad. There, install it by hand from the tarball.
On any other machine, build the tarball inside Docker instead. It ends up in dist.
docker buildx build -f packaging/monolith/Dockerfile --target export --output dist .To turn a tarball you already built into an image, run make image SOURCE=fromdist. It packages the tarball in dist without building again.