Skip to content

Quick Start

This section describes how to deploy bpfman quickly from pre-built release artifacts. Users can either deploy it locally via provided RPMs or in a kubernetes cluster via the provided container images and install yamls. See Releases for the complete set of bpfman releases.

Deploy Released RPM from COPR Locally

This section describes how to install an RPM built automatically by the Packit Service. The Packit Service builds RPMs for each release.

To install an RPM generated by the Packit Service, the following packages need to be installed:

dnf based OS:

sudo dnf install -y dnf-plugins-core

Additionally the bpfman copr repo needs to be enabled:

sudo dnf copr enable @ebpf-sig/bpfman

To see information about the latest released version of bpfman simply run

sudo dnf info bpfman

Last metadata expiration check: 0:03:10 ago on Mon 06 May 2024 10:37:37 AM EDT.
Available Packages
Name         : bpfman
Version      : 0.4.2
Release      : 1.fc39
Architecture : src
Size         : 41 M
Source       : None
Repository   : copr:copr.fedorainfracloud.org:group_ebpf-sig:bpfman
Summary      : An eBPF program manager
URL          : https://bpfman.io
License      : Apache-2.0
Description  : An eBPF Program Manager.

Name         : bpfman
Version      : 0.4.2
Release      : 1.fc39
Architecture : x86_64
Size         : 9.7 M
Source       : bpfman-0.4.2-1.fc39.src.rpm
Repository   : copr:copr.fedorainfracloud.org:group_ebpf-sig:bpfman
Summary      : An eBPF program manager
URL          : https://bpfman.io
License      : Apache-2.0 AND Unicode-DFS-2016 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
Description  : An eBPF Program Manager.

Next install, either the latest version with:

sudo dnf install bpfman 

Or install an older version with:

sudo dnf install bpfman-<RELEASE_VERSION> 

bpfman is now installed but not running. To start the bpfman-rpc server process:

sudo systemctl daemon-reload
sudo systemctl enable bpfman.socket
sudo systemctl start bpfman.socket

Finally you can run one of the sample applications:

sudo bpfman load image --image-url quay.io/bpfd-bytecode/tracepoint:latest tracepoint --tracepoint sched/sched_switch

sudo bpfman list
 Program ID  Name          Type        Load Time                
 1552        enter_openat  tracepoint  2024-05-06T10:50:57-0400 

sudo bpfman unload 1552

When ready to uninstall, determine the RPM that is currently loaded:

$ sudo rpm -qa | grep bpfman
bpfman-0.4.2-1.fc39.x86_64

To stop bpfman and uninstall the RPM:

sudo systemctl stop bpfman.socket
sudo systemctl disable bpfman.socket

sudo dnf erase -y bpfman-0.4.2-1.fc39.x86_64

sudo systemctl daemon-reload

Deploy Released container images on Kubernetes

The quickest solution for running bpfman in a Kubernetes deployment is to run a local Kubernetes KIND Cluster:

kind create cluster --name=test-bpfman

Next, deploy the bpfman CRDs:

export BPFMAN_REL=0.4.2
kubectl apply -f  https://github.com/bpfman/bpfman/releases/download/v${BPFMAN_REL}/bpfman-crds-install.yaml

Next, deploy the bpfman-operator, which will also deploy the bpfman-daemon, which contains bpfman-rpc, bpfman Library and bpfman-agent:

kubectl apply -f https://github.com/bpfman/bpfman/releases/download/v${BPFMAN_REL}/bpfman-operator-install.yaml

Finally, deploy an example eBPF program:

kubectl apply -f https://github.com/bpfman/bpfman/releases/download/v${BPFMAN_REL}/go-xdp-counter-install.yaml

kubectl get xdpprograms
NAME                     BPFFUNCTIONNAME   NODESELECTOR   STATUS
go-xdp-counter-example   xdp_stats         {}             ReconcileSuccess

There are other example program install yamls in the artifacts for each Release payload.

Use the following command to teardown the cluster:

kind delete cluster -n test-bpfman