Single-node remote execution service

225 views
Skip to first unread message

Oliver Reiche

unread,
May 23, 2023, 8:40:59 AM5/23/23
to bazel-discuss
Hello Bazel users,

Some of you were asking [0] for a simple way to set up a single-node remote execution service, to have a common cache and well-defined execution environment (albeit with only a single execution node). I just wanted to inform you that there is an easy way now. The Justbuild [1] build system provides such a service via a simple subcommand:

  just execute --compatible

or with specific ip/port:

  just execute --compatible -i 0.0.0.0 -p 8980

Note that the "--compatible" option is required for the Bazel compatibility mode, as Justbuild's native remote execution protocol [2] is an extension on top of Bazel's original protocol:
 - using Git hashes, for more efficient handling of Git repositories,
 - treating trees as first class citizens, for more efficient remote communication.
This extension could also be appealing for Bazel, as first-class-citizen trees allow for more efficient communication with only one hash instead of a list of hashes being sent (both for input and output artifacts). The Justbuild authors found this saving useful as they anyway decided to never download any artifacts (neither final nor intermediate) unless explicitly requested by the user.

Note that currently Justbuild (both client and the execution server) does not support symlinks yet, but work on the design [3] is ongoing.

Instructions for bootstrapping Justbuild can be found here: https://github.com/just-buildsystem/justbuild/blob/master/INSTALL.md#bootstrapping-just
Binary packages (amd64/arm64) are available for Ubuntu [4]. Tarballs and packages (rpm/deb) with static binaries are available from my private fork [5]. All binaries were bootstrapped from first principles, requiring only a C++ compiler supporting C++20. Debian users might want to have a look at the preliminary source package [6].

Cheers,
Oliver

[0] https://groups.google.com/g/bazel-discuss/c/5v3R3DTo3s0/m/03gUi8wXAwAJ

Son Luong Ngoc

unread,
May 25, 2023, 12:31:14 PM5/25/23
to bazel-discuss
Hey Oliver,

Does this mean just is now implementing both client and server of the remote apis spec?
Or just the server side in a special mode and the client side is using a different derivative of the API spec?
You should consider adding `just` to https://github.com/bazelbuild/remote-apis#api-users then.

I would also raise an issue in https://github.com/bazelbuild/remote-apis/issues to discuss whether we could improve the API further to support Git-specific use cases.
Sounds very interesting!

Regards,
Son Luong.

Oliver Reiche

unread,
May 26, 2023, 6:33:19 AM5/26/23
to bazel-discuss
Hi Son,

Yes, Justbuild is also a fully compatible client (when the option --compatible is given). It's client and server are both implementing the vanilla remote API spec as well as the derivate spec.

Thanks for the hint! I will raise such an issue and ask them to put Justbuild on the list.

Regards,
Oliver
Reply all
Reply to author
Forward
0 new messages