NativeLink deployment example for Chromium
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
Pull the Helm chart from the NativeLink OCI registry and install it:
helm install nativelink \ oci://public.ecr.aws/b1l4l6w7/tracemachina/nativelink \ --version 1.0.0-rc1 \ -n nativelink \ --create-namespaceWait 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 AGEnativelink-cas-... 1/1 Running 0 60snativelink-scheduler-... 1/1 Running 0 60snativelink-worker-... 1/1 Running 0 60sView logs for individual components:
# CAS (Content Addressable Storage) logskubectl logs deploy/nativelink-cas -n nativelink
# Scheduler logskubectl logs deploy/nativelink-scheduler -n nativelink
# Worker logskubectl logs deploy/nativelink-worker -n nativelinkPort-forward the NativeLink services to your local machine:
# In a separate terminal — keep this runningkubectl 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 nativelinkkubectl delete namespace nativelink