Skip to content

Commit

Permalink
feat: adds starterkit-ash-coreutils-x86_64-cc worker/runner
Browse files Browse the repository at this point in the history
  • Loading branch information
r2r-dev committed Oct 25, 2024
1 parent e9e4a03 commit c2a568c
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cluster-home/tenants/buildbarn/config/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ configMapGenerator:
- runner-ubuntu22-04.jsonnet
- runner-starterkit-ash.jsonnet
- runner-starterkit-ash-x86_64-cc.jsonnet
- runner-starterkit-ash-coreutils-x86_64-cc.jsonnet
- scheduler.jsonnet
- storage.jsonnet
- worker-ubuntu22-04.jsonnet
- worker-starterkit-ash.jsonnet
- worker-starterkit-ash-x86_64-cc.jsonnet
- worker-starterkit-ash-coreutils-x86_64-cc.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
local common = import 'common.libsonnet';

{
buildDirectoryPath: '/worker/build',
// TODO: global: common.global,
grpcServers: [{
listenPaths: ['/worker/runner'],
authenticationPolicy: { allow: {} },
}],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
local common = import 'common.libsonnet';

{
blobstore: common.blobstore,
browserUrl: common.browserUrl,
maximumMessageSizeBytes: common.maximumMessageSizeBytes,
scheduler: { address: 'scheduler:8983' },
global: common.global {
setUmask: { umask: 0 },
},
buildDirectories: [{
native: {
buildDirectoryPath: '/worker/build',
cacheDirectoryPath: '/worker/cache',
maximumCacheFileCount: 10000,
maximumCacheSizeBytes: 1024 * 1024 * 1024,
cacheReplacementPolicy: 'LEAST_RECENTLY_USED',
},
runners: [{
endpoint: { address: 'unix:///worker/runner' },
concurrency: 8,
platform: {
properties: [
{ name: 'OSFamily', value: 'linux' },
{ name: 'container-image', value: 'docker://harbor.apps.morrigna.rules-nix.build/explore-bzl/ash-coreutils-x86_64-cc:vx92wppgyknsyyd4k80i58hb362wkpsc' },
],
},
workerId: {
pod: std.extVar('POD_NAME'),
node: std.extVar('NODE_NAME'),
},
}],
}],
inputDownloadConcurrency: 10,
outputUploadConcurrency: 11,
directoryCache: {
maximumCount: 1000,
maximumSizeBytes: 1000 * 1024,
cacheReplacementPolicy: 'LEAST_RECENTLY_USED',
},
}
1 change: 1 addition & 0 deletions cluster-home/tenants/buildbarn/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ resources:
- worker-ubuntu22-04.yaml
- worker-starterkit-ash.yaml
- worker-starterkit-ash-x86_64-cc.yaml
- worker-starterkit-ash-coreutils-x86_64-cc.yaml
- tls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: worker-starterkit-ash-coreutils-x86-64-cc
namespace: buildbarn
annotations:
prometheus.io/port: "80"
prometheus.io/scrape: "true"
spec:
replicas: 8
selector:
matchLabels:
app: worker
instance: starterkit-ash-coreutils-x86-64-cc
template:
metadata:
labels:
app: worker
instance: starterkit-ash-coreutils-x86-64-cc
spec:
containers:
- args:
- /config/worker-starterkit-ash-coreutils-x86_64-cc.jsonnet
image: ghcr.io/buildbarn/bb-worker:20240716T044555Z-9850e82
name: worker
volumeMounts:
- mountPath: /config/
name: configs
readOnly: true
- mountPath: /worker
name: worker
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- command: [/bb/tini, -v, --, /bb/bb_runner, /config/runner-starterkit-ash-coreutils-x86_64-cc.jsonnet]
image: harbor.apps.morrigna.rules-nix.build/explore-bzl/ash-coreutils-x86_64-cc:vx92wppgyknsyyd4k80i58hb362wkpsc
name: runner
securityContext:
runAsUser: 65534
allowPrivilegeEscalation: false
volumeMounts:
- mountPath: /config/
name: configs
readOnly: true
- mountPath: /worker
name: worker
- mountPath: /bb
name: empty
readOnly: true
initContainers:
- name: bb-runner-installer
image: ghcr.io/buildbarn/bb-runner-installer:20240716T044555Z-9850e82
volumeMounts:
- mountPath: /bb/
name: empty
- name: volume-init
image: busybox:1.37.0-uclibc
command:
- sh
- -c
- mkdir -pm 0777 /worker/build && mkdir -pm 0700 /worker/cache && chmod 0777 /worker
volumeMounts:
- mountPath: /worker
name: worker
volumes:
- name: empty
emptyDir: {}
- name: configs
configMap:
name: buildbarn-config
items:
- key: common.libsonnet
path: common.libsonnet
- key: runner-starterkit-ash-coreutils-x86_64-cc.jsonnet
path: runner-starterkit-ash-coreutils-x86_64-cc.jsonnet
- key: worker-starterkit-ash-coreutils-x86_64-cc.jsonnet
path: worker-starterkit-ash-coreutils-x86_64-cc.jsonnet
- emptyDir: {}
name: worker

0 comments on commit c2a568c

Please sign in to comment.