Run bpfman From Release Image
This section describes how to deploy bpfman from a given release.
See Releases for the set of bpfman
releases.
Note
Instructions for interacting with bpfman change from release to release, so reference release specific documentation. For example:
Jump to the Setup and Building bpfman section for help building from the latest code or building from a release branch.
Start bpfman-rpc contains more details on the different
modes to run bpfman in on the host.
Use Run using an rpm
for deploying a released version of bpfman from an rpm as a systemd service and then use
Deploying Example eBPF Programs On Local Host
for further information on how to test and interact with bpfman.
Deploying the bpfman-operator contains
more details on deploying bpfman in a Kubernetes deployment and
Deploying Example eBPF Programs On Kubernetes contains
more details on interacting with bpfman running in a Kubernetes deployment.
Use Deploying Release Version of the bpfman-operator
below for deploying released version of bpfman in Kubernetes and then use the
links above for further information on how to test and interact with bpfman.
Run as a Long Lived Process
export BPFMAN_REL=0.5.6
mkdir -p $SRC_DIR/bpfman-${BPFMAN_REL}/; cd $SRC_DIR/bpfman-${BPFMAN_REL}/
wget https://github.com/bpfman/bpfman/releases/download/v${BPFMAN_REL}/bpfman-linux-x86_64.tar.gz
tar -xzvf bpfman-linux-x86_64.tar.gz; rm bpfman-linux-x86_64.tar.gz
$ tree
.
├── bpf-log-exporter
├── bpfman
├── bpfman-ns
├── bpfman-rpc
└── bpf-metrics-exporter
To deploy bpfman-rpc:
sudo RUST_LOG=info ./bpfman-rpc --timeout=0
[INFO bpfman::utils] Has CAP_BPF: true
[INFO bpfman::utils] Has CAP_SYS_ADMIN: true
[INFO bpfman_rpc::serve] Using no inactivity timer
[INFO bpfman_rpc::serve] Using default Unix socket
[INFO bpfman_rpc::serve] Listening on /run/bpfman-sock/bpfman.sock
:
To use the CLI:
Continue in Deploying Example eBPF Programs On Local Host if desired.
Deploying Release Version of the bpfman-operator
The quickest solution for running bpfman in a Kubernetes deployment is to run a
Kubernetes KIND Cluster:
Next, deploy the bpfman CRDs:
export BPFMAN_REL=0.5.6
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-v${BPFMAN_REL}.yaml
Finally, deploy an example eBPF program.
kubectl apply -f https://github.com/bpfman/bpfman/releases/download/v${BPFMAN_REL}/go-xdp-counter-install-v${BPFMAN_REL}.yaml
There are other example programs in the Releases page.
Continue in Deploying the bpfman-operator or
Deploying Example eBPF Programs On Kubernetes if desired.
Keep in mind that prior to v0.4.0, bpfman was released as bpfd.
So follow the release specific documentation.
Use the following command to teardown the cluster: