15:00
-
15:30
-
15:30
Day 1
eBPF with Nix: laptop to testbed
<p>Setting up eBPF development environment often require some effort on getting the correct headers, manage compiler versions, tweaking kconfig knobs, just to get a program running. In this session, we'll cover how to solve these problems using <a href="https://nixos.org/">Nix</a> [1] (NixOS not required). Unlike traditional workflows that rely on imperative package managers, Nix allows us to define kernel, userspace tooling, and testing infrastructure reproducibly.</p>
<p>We'll explore a workflow that bridges the gap between local prototyping and experiments/production environments using <a href="https://wiki.nixos.org/wiki/NixOS_VM_tests">NixOS VM tests</a> [2], which would allow developers easily to spin up multiple QEMU VMs with custom kernel (e.g. with patches or non-conventional config/build flags) and network connection.</p>
<p>We'll then demonstrate how to scale the exact environment from a laptop to testbeds like <a href="https://www.grid5000.fr/w/Grid5000:Home">Grid'5000</a> [3]. With Nix and <a href="https://github.com/oar-team/nixos-compose">NixOS-Compose</a> [4], we can deploy multi-node experiments with bit-perfect* reproducibility. In the demo, we'll use a trivial eBPF program (using <a href="https://docs.ebpf.io/linux/helper-function/bpf_override_return/"><code>bpf_override_return</code></a> to mandate <code>CONFIG_BPF_KPROBE_OVERRIDE</code> + <code>ALLOW_ERROR_INJECTION</code> and mock syscalls),
test it locally, and deploy to a cluster to collect live telemetry and visualizations.</p>
<p>[1] https://nixos.org/</p>
<p>[2] https://wiki.nixos.org/wiki/NixOS_VM_tests</p>
<p>[3] https://www.grid5000.fr/w/Grid5000:Home</p>
<p>[4] https://github.com/oar-team/nixos-compose</p>
<p>[*] https://reproducible.nixos.org/</p>