Skip to content

Example deployments of Buildbarn on various platforms

License

Notifications You must be signed in to change notification settings

jjardon/bb-deployments

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 = "109a99384f9d08f9e75136d218ebaebc68cc810c56897aea2224c57932052d30",
    strip_prefix = "bazel-toolchains-94d31935a2c94fe7e7c7379a0f3393e181928ff7",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/94d31935a2c94fe7e7c7379a0f3393e181928ff7.tar.gz",
        "https://github.com/bazelbuild/bazel-toolchains/archive/94d31935a2c94fe7e7c7379a0f3393e181928ff7.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-debian8 --config=mycluster
build:mycluster-debian8 --config=rbe-debian8
build:mycluster-debian8 --jobs=64
build:mycluster-debian8 --remote_instance_name=debian8

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 one of the commands below:

bazel build --config=mycluster-debian8 //...
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 100.0%