Martin Blanchard pushed to branch mablanch/51-clients-usage at BuildGrid / buildgrid
Commits:
-
c006115e
by Martin Blanchard at 2018-09-17T12:17:30Z
3 changed files:
Changes:
| ... | ... | @@ -9,5 +9,6 @@ This section covers how to run an use the BuildGrid build service. |
| 9 | 9 |
.. toctree::
|
| 10 | 10 |
:maxdepth: 2
|
| 11 | 11 |
|
| 12 |
- using_dummy_build.rst
|
|
| 13 |
- using_simple_build.rst
|
|
| 12 |
+ using_internal.rst
|
|
| 13 |
+ using_bazel.rst
|
|
| 14 |
+ using_buildstream.rst
|
| 1 |
+ |
|
| 2 |
+.. _bazel-builds:
|
|
| 3 |
+ |
|
| 4 |
+Bazel builds
|
|
| 5 |
+============
|
|
| 6 |
+ |
|
| 7 |
+`Bazel`_ is *a fast, scalable, multi-language and extensible build system* that
|
|
| 8 |
+supports remote build execution using the remote execution API (REAPI) v2 since
|
|
| 9 |
+its 0.17.1 release.
|
|
| 10 |
+ |
|
| 11 |
+.. _Bazel: https://bazel.build
|
|
| 12 |
+ |
|
| 13 |
+ |
|
| 14 |
+.. _bazel-configuration:
|
|
| 15 |
+ |
|
| 16 |
+Configuration
|
|
| 17 |
+-------------
|
|
| 18 |
+ |
|
| 19 |
+Bazel accepts many options that can be either specified as command line
|
|
| 20 |
+arguments when involking the ``bazel`` tool or stored in a `.bazelrc`_
|
|
| 21 |
+configuration file.
|
|
| 22 |
+ |
|
| 23 |
+In order to activate remote execution, Bazel's ``build`` subcommand needs to be
|
|
| 24 |
+given specific `build options`_. Most important ones include:
|
|
| 25 |
+ |
|
| 26 |
+- ``--spawn_strategy``: action execution method. Must be set to ``remote`` in
|
|
| 27 |
+ order to activate remote execution of build actions.
|
|
| 28 |
+- ``--genrule_strategy``: `genrules`_ execution method. Must be set to
|
|
| 29 |
+ ``remote`` for remote execution of genrules.
|
|
| 30 |
+- ``--remote_executor``: remote execution endpoint's location. Must be formatted
|
|
| 31 |
+ as ``{host}`` or ``{host}:{port}``.
|
|
| 32 |
+- ``--remote_instance_name``: remote execution instance's name.
|
|
| 33 |
+ |
|
| 34 |
+In order to activate remote build execution on the ``main`` instance of the
|
|
| 35 |
+remote execution server available at ``controller.grid.build`` on port ``50051``
|
|
| 36 |
+you should amend your ``.bazelrc`` with:
|
|
| 37 |
+ |
|
| 38 |
+.. code-block:: sh
|
|
| 39 |
+ |
|
| 40 |
+ build --spawn_strategy=remote --genrule_strategy=remote --remote_executor=controller.grid.build:50051 --remote_instance_name=main
|
|
| 41 |
+ |
|
| 42 |
+.. _.bazelrc: https://docs.bazel.build/versions/master/user-manual.html#bazelrc
|
|
| 43 |
+.. _build options: https://docs.bazel.build/versions/master/command-line-reference.html#build-options
|
|
| 44 |
+.. _genrules: https://docs.bazel.build/versions/master/be/general.html#genrule
|
| 1 |
+ |
|
| 2 |
+.. _buildstream-builds:
|
|
| 3 |
+ |
|
| 4 |
+BuildStream builds
|
|
| 5 |
+==================
|
|
| 6 |
+ |
