From c8b7732db0343033600f399888aea5b7e985d253 Mon Sep 17 00:00:00 2001 From: Nils Wireklint Date: Mon, 12 Jun 2023 15:56:41 +0200 Subject: [PATCH] Reflow the README --- README.md | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ad29b45..35a0ad4 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,16 @@ at the top right in the GitHub Actions page. A changelog for each update to `bb-deployments` is maintained in [changelog.md](changelog.md). -The [Meroton blog](https://meroton.com/blog/tags/buildbarn/) describes some of the changes and features in more detail +The [Meroton blog](https://meroton.com/blog/tags/buildbarn/) +describes some of the changes and features in more detail and includes Jsonnet configuration migration examples. # Getting started -This example aims to showcase a very simple build and test with remote execution using docker-compose as the deployment for Buildbarn. We will be compiling examples from the [abseil-hello](https://github.com/abseil/abseil-hello) project using Bazel. +This example aims to showcase a very simple build and test with remote execution +using docker-compose as the deployment for Buildbarn. We will be compiling +examples from the [abseil-hello](https://github.com/abseil/abseil-hello) project +using Bazel. ## Recommended setup @@ -63,13 +67,22 @@ You may see initially see an error message along the lines of: worker-ubuntu22-04_1 | xxxx/xx/xx xx:xx:xx rpc error: code = Unavailable desc = Failed to ...: connection error: desc = "transport: Error while dialing dial tcp xxx.xx.x.x:xxxx: connect: connection refused" ``` -This is usually because container of the worker has started before the scheduler or runner and so it cannot connect to them. After a second or so, this error message should stop. +This is usually because container of the worker has started before the scheduler +or runner and so it cannot connect to them. After a second or so, this error +message should stop. ## Remote execution -Bazel can perform remote builds against these deployments by using toolchains adapted to the remote environment. The script `tools/remote-toolchains/extract-bazel-auto-toolchains.sh` has been used to construct such a C++ toolchain which is activated using `--config=remote-ubuntu-22-04`, see `.bazelrc` and `WORKSPACE` for the exact setup. +Bazel can perform remote builds against these deployments by using toolchains +adapted to the remote environment. The script +`tools/remote-toolchains/extract-bazel-auto-toolchains.sh` has been used to +construct such a C++ toolchain which is activated using +`--config=remote-ubuntu-22-04`, see `.bazelrc` and `WORKSPACE` for the exact +setup. -Note that the name and SHA of the container image is configured in multiple places: `BUILD.bazel`, `.jsonnet` configuration for Buildbarn and for the actual runner container (docker compose, kubernetes yaml, etc...) +Note that the name and SHA of the container image is configured in multiple +places: `BUILD.bazel`, `.jsonnet` configuration for Buildbarn and for the actual +runner container (docker compose, kubernetes yaml, etc...) Now try a build (using `bazel` or [`bazelisk`](https://github.com/bazelbuild/bazelisk)): ``` @@ -86,7 +99,8 @@ You can check to see if the binary has built successfully by trying: ``` bazel run --config=remote-ubuntu-22-04 @abseil-hello//:hello_main ``` -You may experience problems with wrong version of glibc compared to what the remote is building for. +You may experience problems with wrong version of glibc compared to what the +remote is building for. Equally, you can try to execute a test remotely: ``` @@ -101,15 +115,18 @@ INFO: Build completed successfully, 49 total actions Executed 1 out of 1 test: 1 test passes. ``` -You might experience problems loading `abseil-hellos/libhello.so`, in which case you can link statically by using `--dynamic_mode=off`. +You might experience problems loading `abseil-hellos/libhello.so`, in which case +you can link statically by using `--dynamic_mode=off`. -Next, we will try out the remote caching capability. If you clean your local build cache and then rerun a build: +Next, we will try out the remote caching capability. If you clean your local +build cache and then rerun a build: ``` bazel clean bazel build --config=remote-ubuntu-22-04 @abseil-hello//:hello_main ``` -You'll see an output containing information that we hit the remote cache instead of executing on a worker. +You'll see an output containing information that we hit the remote cache instead +of executing on a worker. ## Other Build Clients