Martin Blanchard pushed to branch mablanch/160-docker-compose-feed-bin at BuildGrid / buildgrid
Commits:
-
da3ba23a
by Carter Sande at 2019-02-22T18:26:29Z
-
da455172
by Jeremiah Bonney at 2019-02-22T18:26:29Z
-
e21366e1
by Jeremiah Bonney at 2019-02-22T19:04:32Z
-
07a715b3
by Martin Blanchard at 2019-02-25T10:16:47Z
-
d9584a75
by Martin Blanchard at 2019-02-25T10:16:47Z
-
ac51f58c
by Martin Blanchard at 2019-02-25T10:16:47Z
8 changed files:
- .gitlab-ci.yml
- Dockerfile
- + data/bin/.gitignore
- + data/bin/README
- data/config/controller.conf
- data/config/storage.conf
- docker-compose.yml
- docs/source/installation.rst
Changes:
| ... | ... | @@ -46,6 +46,12 @@ tests-debian-stretch: |
| 46 | 46 |
run-dummy-job-debian:
|
| 47 | 47 |
<<: *dummy-job
|
| 48 | 48 |
|
| 49 |
+buildbox-e2e:
|
|
| 50 |
+ image: registry.gitlab.com/buildgrid/buildbox/buildbox-e2e:latest
|
|
| 51 |
+ stage: test
|
|
| 52 |
+ before_script: []
|
|
| 53 |
+ script:
|
|
| 54 |
+ - BUILDGRID_SOURCE_ROOT=`pwd` end-to-end-test.sh
|
|
| 49 | 55 |
|
| 50 | 56 |
# Post-build stage, documentation, coverage report...
|
| 51 | 57 |
#
|
| ... | ... | @@ -96,3 +102,13 @@ pages: |
| 96 | 102 |
- public/
|
| 97 | 103 |
only:
|
| 98 | 104 |
- master
|
| 105 |
+ |
|
| 106 |
+trigger-buildbox-e2e-rebuild:
|
|
| 107 |
+ stage: deploy
|
|
| 108 |
+ variables:
|
|
| 109 |
+ GIT_STRATEGY: none
|
|
| 110 |
+ script:
|
|
| 111 |
+ - apt-get update && apt-get install -y curl
|
|
| 112 |
+ - curl --request POST --form "token=$CI_JOB_TOKEN" --form ref=master https://gitlab.com/api/v4/projects/buildgrid%2Fbuildbox%2Fbuildbox-e2e/trigger/pipeline
|
|
| 113 |
+ only:
|
|
| 114 |
+ - master
|
| ... | ... | @@ -6,7 +6,15 @@ |
| 6 | 6 |
# Builds an image from local sources.
|
| 7 | 7 |
#
|
| 8 | 8 |
|
| 9 |
-FROM python:3.5-stretch
|
|
| 9 |
+FROM debian:buster
|
|
| 10 |
+ |
|
| 11 |
+RUN [ \
|
|
| 12 |
+"apt-get", "update" ]
|
|
| 13 |
+RUN [ \
|
|
| 14 |
+"apt-get", "install", "-y", \
|
|
| 15 |
+"python3", "python3-venv", "python3-pip", \
|
|
| 16 |
+"bubblewrap", "fuse3" \
|
|
| 17 |
+]
|
|
| 10 | 18 |
|
| 11 | 19 |
# Use /app as working directory:
|
| 12 | 20 |
WORKDIR /app
|
| ... | ... | @@ -42,6 +50,9 @@ RUN [ \ |
| 42 | 50 |
# Copy the repo. contents:
|
| 43 | 51 |
COPY . /app
|
| 44 | 52 |
|
| 53 |
+# Add tools directory to the PATH:
|
|
| 54 |
+ENV PATH=$PATH:/app/tools
|
|
| 55 |
+ |
|
| 45 | 56 |
# Install BuildGrid:
|
| 46 | 57 |
RUN [ \
|
| 47 | 58 |
"/app/env/bin/python", "-m", "pip", \
|
| 1 |
+buildbox
|
|
| 2 |
+buildbox-fuse
|
|
| 3 |
+buildbox-run-bubblewrap
|
|
| 4 |
+buildbox-run-hosttools
|
|
| 5 |
+buildbox-run-userchroot
|
|
| 6 |
+buildbox-worker
|
| 1 |
+ ¡FOR LOCAL DEVELOPMENT ONLY!
|
|
| 2 |
+ |
|
| 3 |
+This directory is used by BuildGrid's main Docker Compose manifest: it gets
|
|
| 4 |
+bind mounted in worker bot containers and is included in PATH. Place here
|
|
| 5 |
+static binaries of the external tools needed by the bots. Typical use case is
|
|
| 6 |
+to copy here the `buildbox` binary used as a backend by the `buildbox` bot.
|
|
| 7 |
+ |
|
| 8 |
+ ¡FOR LOCAL DEVELOPMENT ONLY!
|
| ... | ... | @@ -6,7 +6,7 @@ server: |
| 6 | 6 |
description: >
|
| 7 | 7 |
Docker Compose controller configuration:
|
| 8 | 8 |
- Unauthenticated plain HTTP at :50051
|
| 9 |
- - Single instance: local
|
|
| 9 |
+ - Single instance: [unnamed]
|
|
| 10 | 10 |
- Expects a remote CAS at :50052
|
| 11 | 11 |
- Hosted services:
|
| 12 | 12 |
- ActionCache
|
| ... | ... | @@ -19,14 +19,14 @@ monitoring: |
| 19 | 19 |
enabled: false
|
| 20 | 20 |
|
| 21 | 21 |
instances:
|
| 22 |
- - name: local
|
|
| 22 |
+ - name: ''
|
|
| 23 | 23 |
description: |
|
| 24 |
- The unique 'local' instance.
|
|
| 24 |
+ The unique unnamed instance.
|
|
| 25 | 25 |
|
| 26 | 26 |
storages:
|
| 27 | 27 |
- !remote-storage &data-store
|
| 28 | 28 |
url: http://storage:50052
|
| 29 |
- instance-name: local
|
|
| 29 |
+ instance-name: ''
|
|
| 30 | 30 |
|
| 31 | 31 |
services:
|
| 32 | 32 |
- !action-cache &build-cache
|
| ... | ... | @@ -6,7 +6,7 @@ server: |
| 6 | 6 |
description: >
|
| 7 | 7 |
Docker Compose storage configuration:
|
| 8 | 8 |
- Unauthenticated plain HTTP at :50052
|
| 9 |
- - Single instance: local
|
|
| 9 |
+ - Single instance: [unnamed]
|
|
| 10 | 10 |
- On-disk data stored in /var
|
| 11 | 11 |
- Hosted services:
|
| 12 | 12 |
- ContentAddressableStorage
|
| ... | ... | @@ -19,9 +19,9 @@ monitoring: |
| 19 | 19 |
enabled: false
|
| 20 | 20 |
|
| 21 | 21 |
instances:
|
| 22 |
- - name: local
|
|
| 22 |
+ - name: ''
|
|
| 23 | 23 |
description: |
|
| 24 |
- The unique 'local' instance.
|
|
| 24 |
+ The unique unnamed instance.
|
|
| 25 | 25 |
|
| 26 | 26 |
storages:
|
| 27 | 27 |
- !disk-storage &data-store
|
| ... | ... | @@ -58,10 +58,24 @@ services: |
| 58 | 58 |
bots: # To be scaled horizontaly
|
| 59 | 59 |
image: buildgrid:local
|
| 60 | 60 |
command: [
|
| 61 |
- "bot", "--parent=local",
|
|
| 61 |
+ "bot", "--parent=",
|
|
| 62 | 62 |
"--remote=http://controller:50051",
|
| 63 | 63 |
"--remote-cas=http://storage:50052",
|
| 64 | 64 |
"host-tools"]
|
| 65 |
+ # "bot", "--parent=",
|
|
| 66 |
+ # "--remote=http://controller:50051",
|
|
| 67 |
+ # "--remote-cas=http://storage:50052",
|
|
| 68 |
+ # "buildbox",
|
|
| 69 |
+ # "--local-cas", "/var/lib/buildgrid/cache",
|
|
| 70 |
+ # "--fuse-dir", "/mnt"]
|
|
| 71 |
+ privileged: true
|
|
| 72 |
+ volumes:
|
|
| 73 |
+ - type: volume
|
|
| 74 |
+ source: cache
|
|
| 75 |
+ target: /var/lib/buildgrid/cache
|
|
| 76 |
+ - type: bind
|
|
| 77 |
+ source: ./data/bin
|
|
| 78 |
+ target: /app/tools
|
|
| 65 | 79 |
depends_on:
|
| 66 | 80 |
- controller
|
| 67 | 81 |
networks:
|
| ... | ... | @@ -72,4 +86,5 @@ networks: |
| 72 | 86 |
host:
|
| 73 | 87 |
|
| 74 | 88 |
volumes:
|
| 89 |
+ cache:
|
|
| 75 | 90 |
data:
|
| ... | ... | @@ -168,7 +168,7 @@ Once completed, you can start a minimal grid by running: |
| 168 | 168 |
- An execution and action-cache service available at
|
| 169 | 169 |
``http://localhost:50051``.
|
| 170 | 170 |
- An CAS service available at ``http://localhost:50052``.
|
| 171 |
- - A single ``local`` instance with one host-tools based worker bot attached.
|
|
| 171 |
+ - A single unnamed instance with one host-tools based worker bot attached.
|
|
| 172 | 172 |
|
| 173 | 173 |
.. hint::
|
| 174 | 174 |
|
