1
|
|
-
|
2
|
1
|
.. _installation:
|
3
|
2
|
|
4
|
3
|
Installation
|
5
|
4
|
============
|
6
|
5
|
|
7
|
|
-How to install BuildGrid onto your machine.
|
|
6
|
+.. _install-on-host:
|
|
7
|
+
|
|
8
|
+Installation onto host machine
|
|
9
|
+------------------------------
|
|
10
|
+
|
|
11
|
+How to install BuildGrid directly onto your machine.
|
8
|
12
|
|
9
|
13
|
.. note::
|
10
|
14
|
|
11
|
|
- BuildGrid server currently only support *Linux*, *macOS* and *Windows*
|
|
15
|
+ BuildGrid server currently only support *Linux*. *macOS* and *Windows*
|
12
|
16
|
platforms are **not** supported.
|
13
|
17
|
|
14
|
18
|
|
15
|
|
-.. _install-prerequisites:
|
|
19
|
+.. _install-host-prerequisites:
|
16
|
20
|
|
17
|
21
|
Prerequisites
|
18
|
|
--------------
|
|
22
|
+~~~~~~~~~~~~~
|
19
|
23
|
|
20
|
24
|
BuildGrid only supports ``python3 >= 3.5`` but has no system requirements. Main
|
21
|
|
-Python dependencies, automatically handle during installation, includes:
|
|
25
|
+Python dependencies, automatically handled during installation, include:
|
22
|
26
|
|
23
|
27
|
- `boto3`_: the Amazon Web Services (AWS) SDK for Python.
|
24
|
28
|
- `click`_: a Python composable command line library.
|
... |
... |
@@ -33,10 +37,10 @@ Python dependencies, automatically handle during installation, includes: |
33
|
37
|
.. _protocol-buffers: https://developers.google.com/protocol-buffers
|
34
|
38
|
|
35
|
39
|
|
36
|
|
-.. _source-install:
|
|
40
|
+.. _install-host-source-install:
|
37
|
41
|
|
38
|
42
|
Install from sources
|
39
|
|
---------------------
|
|
43
|
+~~~~~~~~~~~~~~~~~~~~
|
40
|
44
|
|
41
|
45
|
BuildGrid has ``setuptools`` support. In order to install it to your home
|
42
|
46
|
directory, typically under ``~/.local``, simply run:
|
... |
... |
@@ -46,7 +50,7 @@ directory, typically under ``~/.local``, simply run: |
46
|
50
|
git clone https://gitlab.com/BuildGrid/buildgrid.git && cd buildgrid
|
47
|
51
|
pip3 install --user --editable .
|
48
|
52
|
|
49
|
|
-Additionally, and if your distribution does not already includes it, you may
|
|
53
|
+Additionally, and if your distribution does not already include it, you may
|
50
|
54
|
have to adjust your ``PATH``, in ``~/.bashrc``, with:
|
51
|
55
|
|
52
|
56
|
.. code-block:: sh
|
... |
... |
@@ -63,3 +67,62 @@ have to adjust your ``PATH``, in ``~/.bashrc``, with: |
63
|
67
|
.. code-block:: sh
|
64
|
68
|
|
65
|
69
|
pip3 install --user --editable ".[docs,tests]"
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+.. install-docker:
|
|
74
|
+
|
|
75
|
+Installation through docker
|
|
76
|
+---------------------------
|
|
77
|
+
|
|
78
|
+How to build a Docker image that runs BuildGrid.
|
|
79
|
+
|
|
80
|
+.. _install-docker-prerequisites:
|
|
81
|
+
|
|
82
|
+Prerequisites
|
|
83
|
+~~~~~~~~~~~~~
|
|
84
|
+
|
|
85
|
+A working Docker installation. Please consult `Docker's Getting Started Guide`_ if you don't already have it installed.
|
|
86
|
+
|
|
87
|
+.. _`Docker's Getting Started Guide`: https://www.docker.com/get-started
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+.. _install-docker-build:
|
|
91
|
+
|
|
92
|
+Docker Container from Sources
|
|
93
|
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
94
|
+
|
|
95
|
+To clone the source code and build a Docker image, simply run:
|
|
96
|
+
|
|
97
|
+.. code-block:: sh
|
|
98
|
+
|
|
99
|
+ git clone https://gitlab.com/BuildGrid/buildgrid.git && cd buildgrid
|
|
100
|
+ docker build -t buildgrid_server .
|
|
101
|
+
|
|
102
|
+.. note::
|
|
103
|
+
|
|
104
|
+ The image built will contain the contents of the source code directory, including
|
|
105
|
+ configuration files.
|
|
106
|
+
|
|
107
|
+.. hint::
|
|
108
|
+
|
|
109
|
+ Whenever the source code is updated or new configuration files are made, you need to re-build
|
|
110
|
+ the image.
|
|
111
|
+
|
|
112
|
+After building the Docker image, to run BuildGrid using the default configuration file
|
|
113
|
+(found in `buildgrid/_app/settings/default.yml`), simply run:
|
|
114
|
+
|
|
115
|
+.. code-block:: sh
|
|
116
|
+
|
|
117
|
+ docker run -i -p 50051:50051 buildgrid_server
|
|
118
|
+
|
|
119
|
+.. note::
|
|
120
|
+
|
|
121
|
+ To run BuildGrid using a different configuration file, include the relative path to the
|
|
122
|
+ configuration file at the end of the command above. For example, to run the default
|
|
123
|
+ standalone CAS server (without an execution service), simply run:
|
|
124
|
+
|
|
125
|
+ .. code-block:: sh
|
|
126
|
+
|
|
127
|
+ docker run -i -p 50052:50052 buildgrid_server buildgrid/_app/settings/cas.yml
|
|
128
|
+
|