diff options
author | Josh Smith <josh.smith@codethink.co.uk> | 2020-08-20 16:18:50 +0100 |
---|---|---|
committer | Josh Smith <josh.smith@codethink.co.uk> | 2020-08-26 10:41:41 +0100 |
commit | 3334bf45ad2573084e7e39aa650e290fc316fac5 (patch) | |
tree | 52cde30539590e1b698f63b94fb35c77afa824e7 | |
parent | be87fbb3150646f8320a69fd41121cc79f23b92c (diff) | |
download | buildstream-3334bf45ad2573084e7e39aa650e290fc316fac5.tar.gz |
Add bb-storage/bb-asset-hub cache test job
-rw-r--r-- | .gitlab-ci.yml | 10 | ||||
-rw-r--r-- | .gitlab-ci/buildbarn-remote-cache.yml | 59 | ||||
-rw-r--r-- | .gitlab-ci/config/asset.jsonnet | 32 | ||||
-rw-r--r-- | .gitlab-ci/config/storage.jsonnet | 26 |
4 files changed, 127 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b1e673a64..921557da2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -197,6 +197,16 @@ tests-remote-cache: ARTIFACT_CACHE_SERVICE: http://docker:50052 PYTEST_ARGS: "--color=yes --remote-cache" +tests-bb-remote-cache: + <<: *tests + <<: *remote-test + variables: + <<: *docker-variables + COMPOSE_MANIFEST: .gitlab-ci/buildbarn-remote-cache.yml + ARTIFACT_INDEX_SERVICE: http://docker:7981 + ARTIFACT_STORAGE_SERVICE: http://docker:7982 + PYTEST_ARGS: "--color=yes --remote-cache" + tests-no-usedevelop: # Ensure that tests also pass without `--develop` flag. image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:32-${DOCKER_IMAGE_VERSION} 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, +} |