From 93d4f0181ad51caacfdf7c5b4de5566413963224 Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Thu, 20 Aug 2020 16:18:50 +0100 Subject: Add bb-storage/bb-asset-hub cache test job --- .gitlab-ci/buildbarn-remote-cache.yml | 59 +++++++++++++++++++++++++++++++++++ .gitlab-ci/config/asset.jsonnet | 32 +++++++++++++++++++ .gitlab-ci/config/storage.jsonnet | 26 +++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 .gitlab-ci/buildbarn-remote-cache.yml create mode 100644 .gitlab-ci/config/asset.jsonnet create mode 100644 .gitlab-ci/config/storage.jsonnet (limited to '.gitlab-ci') diff --git a/.gitlab-ci/buildbarn-remote-cache.yml b/.gitlab-ci/buildbarn-remote-cache.yml new file mode 100644 index 000000000..0122fa804 --- /dev/null +++ b/.gitlab-ci/buildbarn-remote-cache.yml @@ -0,0 +1,59 @@ +## +# Buildbarn Compose manifest for BuildStream. +# +# Spins-up a unnamed and unauthenticated cache server: +# - STORAGE at http://localhost:7982 +# - INDEX at: http://localhost:7981 +# +# BuildStream configuration snippet: +# +# artifacts: +# - url: https://localhost:7981 +# type: index +# push: true +# - url: https://localhost:7982 +# type: storage +# push: true +# +# Basic usage: +# - docker-compose -f buildbarn-remote-cache.yml up +# - docker-compose -f buildbarn-remote-cache.yml down + +version: '3.4' + +services: + bb-asset: + image: qinusty/bb-asset-hub:20200814T141139Z-5e72dd1 + command: /config/asset.jsonnet + restart: unless-stopped + expose: + - "7981" + ports: + - "7981:7981" + volumes: + - type: volume + source: assets + target: /storage + - type: bind + source: ./config/ + target: /config + + bb-storage: + image: buildbarn/bb-storage:20200810T194216Z-94a85b4 + command: /config/storage.jsonnet + restart: unless-stopped + expose: + - "7982" + ports: + - "7982:7982" + volumes: + - type: volume + source: cas + target: /cas + - type: bind + source: ./config/ + target: /config + +volumes: + assets: + cas: diff --git a/.gitlab-ci/config/asset.jsonnet b/.gitlab-ci/config/asset.jsonnet new file mode 100644 index 000000000..aad06a22e --- /dev/null +++ b/.gitlab-ci/config/asset.jsonnet @@ -0,0 +1,32 @@ +{ + fetcher: { + caching: { + fetcher: { + // We should never be fetching anything which is not already returned by the caching fetcher. + 'error': { + code: 5, + message: "Asset Not Found", + } + } + } + }, + + assetStore: { + circular: { + directory: '/storage', + offsetFileSizeBytes: 1024 * 1024, + offsetCacheSize: 1000, + dataFileSizeBytes: 100 * 1024 * 1024, + dataAllocationChunkSizeBytes: 1048576, + instances: [''], + }, + }, + httpListenAddress: ':1111', + grpcServers: [{ + listenAddresses: [':7981'], + authenticationPolicy: { allow: {} }, + }], + allowUpdatesForInstances: [''], + maximumMessageSizeBytes: 16 * 1024 * 1024, +} + diff --git a/.gitlab-ci/config/storage.jsonnet b/.gitlab-ci/config/storage.jsonnet new file mode 100644 index 000000000..11fbdbee7 --- /dev/null +++ b/.gitlab-ci/config/storage.jsonnet @@ -0,0 +1,26 @@ +{ + blobstore: { + contentAddressableStorage: { + circular: { + directory: '/cas', + offsetFileSizeBytes: 16 * 1024 * 1024, + offsetCacheSize: 10000, + dataFileSizeBytes: 10 * 1024 * 1024 * 1024, + dataAllocationChunkSizeBytes: 16 * 1024 * 1024, + }, + }, + actionCache: { + 'error': { + code: 12, # UNIMPLEMENTED + message: "AC requests are not supported for this endpoint.", + } + }, + }, + httpListenAddress: ':6981', + grpcServers: [{ + listenAddresses: [':7982'], + authenticationPolicy: { allow: {} }, + }], + allowAcUpdatesForInstanceNamePrefixes: [''], + maximumMessageSizeBytes: 16 * 1024 * 1024, +} -- cgit v1.2.1