| title | NativeLink deployment example for Chromium |
|---|---|
| description | An example for building Chromium with NativeLink in Kubernetes. |
In this example you'll deploy NativeLink to a local Kubernetes cluster using Helm and run a Chromium build against it.
Requirements
- An
x86_64-linuxsystem running a recent Ubuntu. Either "real" Linux or WSL2. - A local Kubernetes cluster. Either:
- Docker Desktop with Kubernetes enabled (Settings > Kubernetes > Enable Kubernetes), or
- minikube
- Helm 3
- kubectl
:::caution This example doesn't work on Mac and Linux distributions other than Ubuntu. :::
Pull the Helm chart from the NativeLink OCI registry and install it:
helm install nativelink \
oci://public.ecr.aws/b1l4l6w7/tracemachina/nativelink \
--version 1.2.0 \
-n nativelink \
--create-namespace:::tip See the NativeLink Helm chart on Artifact Hub for all available versions and configuration options. :::
Wait for the pods to become ready:
kubectl get pods -n nativelink -wYou should see pods for the CAS, scheduler, and worker components:
NAME READY STATUS RESTARTS AGE
nativelink-cas-... 1/1 Running 0 60s
nativelink-scheduler-... 1/1 Running 0 60s
nativelink-worker-... 1/1 Running 0 60s
View logs for individual components:
# CAS (Content Addressable Storage) logs
kubectl logs deploy/nativelink-cas -n nativelink
# Scheduler logs
kubectl logs deploy/nativelink-scheduler -n nativelink
# Worker logs
kubectl logs deploy/nativelink-worker -n nativelinkPort-forward the NativeLink services to your local machine:
# In a separate terminal — keep this running
kubectl port-forward svc/nativelink-cas 50051:50051 -n nativelink &
kubectl port-forward svc/nativelink-scheduler 50052:50052 -n nativelink &Follow the Chromium Linux build instructions to set up the Chromium source and dependencies, then run a Reclient build against the cluster using the forwarded endpoints.
You can view Reclient's logs like so:
watch $HOME/chromium/src/buildtools/reclient/reproxystatusWhen you're done testing, remove the NativeLink deployment:
helm uninstall nativelink -n nativelink
kubectl delete namespace nativelink