Skip to content

Latest commit

 

History

History
99 lines (72 loc) · 2.78 KB

File metadata and controls

99 lines (72 loc) · 2.78 KB
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-linux system running a recent Ubuntu. Either "real" Linux or WSL2.
  • A local Kubernetes cluster. Either:
  • Helm 3
  • kubectl

:::caution This example doesn't work on Mac and Linux distributions other than Ubuntu. :::

Install NativeLink

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. :::

Verify the deployment

Wait for the pods to become ready:

kubectl get pods -n nativelink -w

You 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

Explore the deployment

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 nativelink

Build Chromium against NativeLink

Port-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/reproxystatus

Clean up

When you're done testing, remove the NativeLink deployment:

helm uninstall nativelink -n nativelink
kubectl delete namespace nativelink