Skip to content

NativeLink deployment example for Chromium

This deployment sets up a 4-container deployment with separate CAS, scheduler and worker. Don’t use this example deployment in production. It’s insecure.

All commands should be run from nix to ensure all dependencies exist in the environment.

Terminal window
nix develop

In this example we’re using kind to set up the cluster cilium to provide a LoadBalancer and GatewayController.

First set up a local development cluster:

Terminal window
native up

Next start a few standard deployments. This part also builds the remote execution containers and makes them available to the cluster:

Terminal window
./01_operations.sh

Finally, deploy NativeLink:

Terminal window
./02_application.sh

This demo setup creates two gateways to expose the cas and scheduler deployments via your local docker network:

Terminal window
CACHE=$(kubectl get gtw cache-gateway -o=jsonpath='{.status.addresses[0].value}')
SCHEDULER=$(kubectl get gtw scheduler-gateway -o=jsonpath='{.status.addresses[0].value}')
echo "Cache IP: $CACHE"
echo "Scheduler IP: $SCHEDULER"

Using ./03_build_chrome_tests.sh example script will download needed dependencies for building Chromium unit tests using NativeLink CAS and Scheduler. The initial part of the script checks if some dependencies exist, if not installs them, then moves on to downloading and building Chromium tests. The script simplifies the setup described in linux/build_instructions.md

Terminal window
./03_build_chrome_tests.sh

When you’re done testing, delete the cluster:

Terminal window
kind delete cluster

If you have any questions, please reach out to the NativeLink Community.