Skip to content

Example deployments of Buildbarn on various platforms

License

Notifications You must be signed in to change notification settings

ikerperezdelpalomar/bb-deployments

 
 

Repository files navigation

Example deployments of Buildbarn

This repository contains a set of scripts and configuration files that can be used to deploy Buildbarn on various platforms. Buildbarn is pretty flexible, in that it can both be used for single-node remote caching setups and large-scale remote execution setups. Unless noted otherwise, the configurations in this repository all use assume the following setup:

Below is a diagram of what this setup Buildbarn looks like. In this diagram, the arrows represent the direction in which network connections are established.

Overview of the Buildbarn setup

Using these deployments with Bazel

Bazel can perform remote builds against these deployments by adding the official Bazel toolchain definitions for the RBE container images to the WORKSPACE file of your project:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "bazel_toolchains",
    sha256 = "28cb3666da80fbc62d4c46814f5468dd5d0b59f9064c0b933eee3140d706d330",
    strip_prefix = "bazel-toolchains-0.27.1",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/0.27.1.tar.gz",
        "https:/bazelbuild/bazel-toolchains/archive/0.27.1.tar.gz",
    ],
)

In addition to that, you will need to add a list of generic build options to your ~/.bazelrc, followed by the following set of options that are specific to your environment:

build:mycluster --bes_backend=fill-in-the-frontend-service-hostname-here:8983
build:mycluster --bes_results_url=http://fill-in-the-browser-service-hostname-here/build_events/bb-event-service/
build:mycluster --config=remote
build:mycluster --remote_executor=fill-in-the-frontend-service-hostname-here:8980

build:mycluster-ubuntu16-04 --config=mycluster
build:mycluster-ubuntu16-04 --config=rbe-ubuntu16-04
build:mycluster-ubuntu16-04 --jobs=64
build:mycluster-ubuntu16-04 --remote_instance_name=ubuntu16-04

Once added, you may perform remote builds against Buildbarn by running the command below:

bazel build --config=mycluster-ubuntu16-04 //...

About

Example deployments of Buildbarn on various platforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 53.6%
  • Jsonnet 40.6%
  • Python 5.8%