finn pushed to branch finn/cas-docs at BuildGrid / buildgrid
Commits:
-
86811f25
by Finn at 2018-10-03T09:22:02Z
3 changed files:
Changes:
1 |
+server:
|
|
2 |
+ - !channel
|
|
3 |
+ port: 50051
|
|
4 |
+ insecure_mode: true
|
|
5 |
+ |
|
6 |
+instances:
|
|
7 |
+ - name: main
|
|
8 |
+ |
|
9 |
+ storages:
|
|
10 |
+ - !disk-storage &main-storage
|
|
11 |
+ path: !expand-path $HOME/cas
|
|
12 |
+ |
|
13 |
+ services:
|
|
14 |
+ - !cas
|
|
15 |
+ storage: *main-storage
|
|
16 |
+ - !bytestream
|
|
17 |
+ storage: *main-storage
|
|
18 |
+ - !reference-cache
|
|
19 |
+ storage: *main-storage
|
|
20 |
+ max_cached_refs: 512
|
1 |
- |
|
2 | 1 |
.. _using:
|
3 | 2 |
|
4 | 3 |
Using
|
... | ... | @@ -12,3 +11,4 @@ This section covers how to run an use the BuildGrid build service. |
12 | 11 |
using_internal.rst
|
13 | 12 |
using_bazel.rst
|
14 | 13 |
using_buildstream.rst
|
14 |
+ using_cas_server.rst
|
1 |
+.. _cas-server:
|
|
2 |
+ |
|
3 |
+CAS server
|
|
4 |
+==========
|
|
5 |
+ |
|
6 |
+It is possible to configure BuildGrid with just a Content Addressable Storage service.
|
|
7 |
+ |
|
8 |
+.. note::
|
|
9 |
+ |
|
10 |
+ This service can be equivalent to `BuildStream's Artifact Server`_ if the `Reference Storage Service`_ is included.
|
|
11 |
+ |
|
12 |
+.. _cas-configuration:
|
|
13 |
+ |
|
14 |
+Configuration
|
|
15 |
+-------------
|
|
16 |
+ |
|
17 |
+Here is an example project configuration. It also implements an optional API called the `Reference Storage Service`_, which if used, allows the user to store a ``Digest`` behind a user defined ``key``.
|
|
18 |
+ |
|
19 |
+.. literalinclude:: ./data/cas-example-server.conf
|
|
20 |
+ :language: yaml
|
|
21 |
+ |
|
22 |
+.. hint::
|
|
23 |
+ |
|
24 |
+ Use ``- name: ""`` if using with BuildStream, as instance names are not supported for that tool yet.
|
|
25 |
+ |
|
26 |
+This defines a single ``main`` instance of the ``CAS``, ``Bytestream`` and ``Reference Storage`` service on port ``55051``. It is backed onto disk storage and will populate the folder ``$HOME/cas``. To start the server, simply type into your terminal:
|
|
27 |
+ |
|
28 |
+.. code-block:: sh
|
|
29 |
+ |
|
30 |
+ bgd server start example.conf
|
|
31 |
+ |
|
32 |
+The server should now be available to use.
|
|
33 |
+ |
|
34 |
+.. _BuildStream's Artifact Server: https://buildstream.gitlab.io/buildstream/install_artifacts.html
|
|
35 |
+.. _Reference Storage Service: https://gitlab.com/BuildGrid/buildgrid/blob/master/buildgrid/_protos/buildstream/v2/buildstream.proto
|