summaryrefslogtreecommitdiff
path: root/.gitlab-ci/buildgrid-remote-execution.yml
blob: fd45c45afdb060b92db7b3a6c4230715f16110f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
##
# BuildGrid Compose manifest for BuildStream.
#
# Spins-up a unnamed and unauthenticated grid:
#  - Controller + CAS + AC at http://localhost:50051
#  - Ref. + CAS at: http://localhost:50052
#
# BuildStream configuration snippet:
#
#    artifacts:
#      url: http://localhost:50052
#      push: true
#    remote-execution:
#      execution-service:
#        url: http://localhost:50051
#      action-cache-service:
#        url: http://localhost:50051
#      storage-service:
#        url: http://localhost:50051
#
# Basic usage:
#  - docker-compose -f buildgrid-compose.yml up
#  - docker-compose -f buildgrid-compose.yml down
#
version: "3.2"

services:
  controller:
    image: registry.gitlab.com/buildgrid/buildgrid.hub.docker.com/buildgrid:nightly
    command: [
      "bgd", "server", "start", "-v",
      "/etc/buildgrid/default.conf"]
    ports:
      - 50051:50051
    networks:
      - grid

  bot:
    image: registry.gitlab.com/buildgrid/buildgrid.hub.docker.com/buildbox:nightly
    command: [
      "sh", "-c", "sleep 15 && ( buildbox-casd --cas-remote=http://controller:50051 /var/lib/buildgrid/cache & buildbox-worker --bots-remote=http://controller:50051 --cas-remote=unix:/var/lib/buildgrid/cache/casd.sock --buildbox-run=buildbox-run-bubblewrap --runner-arg=--use-localcas --platform OSFamily=linux --platform ISA=x86-64 --verbose )"]
    privileged: true
    volumes:
      - type: volume
        source: cache
        target: /var/lib/buildgrid/cache
    depends_on:
      - controller
    networks:
      - grid

  storage:
    image: registry.gitlab.com/buildgrid/buildgrid.hub.docker.com/buildgrid:nightly
    command: [
      "bgd", "server", "start", "-v",
      "/etc/buildgrid/artifacts.conf"]
    ports:
      - 50052:50052
    networks:
      - grid

networks:
  grid:
    driver: bridge

volumes:
  cache: