Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds starterkit-ash-x86_64-cc worker/runner #183

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -12,7 +12,9 @@ configMapGenerator:
- frontend.jsonnet
- runner-ubuntu22-04.jsonnet
- runner-starterkit-ash.jsonnet
- runner-starterkit-ash-x86_64-cc.jsonnet
- scheduler.jsonnet
- storage.jsonnet
- worker-ubuntu22-04.jsonnet
- worker-starterkit-ash.jsonnet
- worker-starterkit-ash-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-x86_64-cc:v9m6v8m5wcrpxgrlsmn7sfxf4f0053fy' },
],
},
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 @@ -10,4 +10,5 @@ resources:
- storage.yaml
- worker-ubuntu22-04.yaml
- worker-starterkit-ash.yaml
- worker-starterkit-ash-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-x86_64-cc
namespace: buildbarn
annotations:
prometheus.io/port: "80"
prometheus.io/scrape: "true"
spec:
replicas: 8
selector:
matchLabels:
app: worker
instance: starterkit-ash-x86_64-cc
template:
metadata:
labels:
app: worker
instance: starterkit-ash-x86_64-cc
spec:
containers:
- args:
- /config/worker-starterkit-ash-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-x86_64-cc.jsonnet]
image: ghcr.io/catthehacker/ubuntu:act-22.04@sha256:5f9c35c25db1d51a8ddaae5c0ba8d3c163c5e9a4a6cc97acd409ac7eae239448
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-x86_64-cc.jsonnet
path: runner-starterkit-ash-x86_64-cc.jsonnet
- key: worker-starterkit-ash-x86_64-cc.jsonnet
path: worker-starterkit-ash-x86_64-cc.jsonnet
- emptyDir: {}
name: worker