Closed nickschuetz closed 2 years ago
I created a new ubuntu 21.10 arm64 box and updated the Vagrantfile a bit:
Vagrant.configure("2") do |config|
config.vm.box = "nickschuetz/ubuntu-21.10-arm64"
config.vm.box_version = "1.0.0"
config.vm.define :impish
config.vm.hostname = "impish"
config.vm.synced_folder ".", "/source"
config.vm.provision "shell", inline: <<-SHELL
# install llvm:
export DEBIAN_FRONTEND=noninteractive
export LLVM_VERSION=13
curl -sL https://apt.llvm.org/llvm.sh "$LLVM_VERSION" | bash
apt-get -qq update
# bpf related deps:
apt-get -qq install linux-headers-$(uname -r) linux-tools-$(uname -r) libbpf-dev
# dev tools:
apt-get -qq install -y golang docker.io make
# add headers:
bpftool btf dump file /sys/kernel/btf/vmlinux format c > /usr/local/include/vmlinux.h
cp /source/builder/solo_types.h /usr/local/include/
SHELL
end
All that needs to be done now is clone bumblebee on your new vm and modify the Makefile (%s/amd64/arm64/g), make build-cli
and away you go.
i believe this as addressed by #43
Hi @nickschuetz , any plans to release a new box? https://fridge.ubuntu.com/2022/07/19/ubuntu-21-10-impish-indri-end-of-life-reached-on-july-14-2022/
If anyone else wants to try the tutorial from https://www.solo.io/blog/get-started-with-ebpf-using-bumblebee/.
Vagrantfile
to utilize a different vagrant box (e.g., rethinc-oss/ubuntu-2204-arm64
).vagrant up
+ vagrant ssh
.git clone https://github.com/solo-io/bumblebee.git
+ cd bumblebee
.git checkout v0.0.14
(otherwise your build will produce a binary whose version doesn't match a builder
Docker img later on, e.g., builder:0.0.14-4-gb693411-dirty
)sed -i 's/amd64/arm64/g' Makefile
.make build-cli
../_output/bee-linux-arm64 version
0.0.14
sudo cp _output/bee-linux-arm64 /usr/bin/bee
sudo apt install emacs
bee
CLI to build the skeleton program: INFO Selected Language: C
INFO Selected Program Type: Network
INFO Selected Map Type: RingBuffer
INFO Selected Output Type: print
INFO Selected Output Type: BPF Program File Location hello.c
emacs -nw hello.c
➜ bumblebee (main) ✗ sudo bee build hello.c hello:v1
SUCCESS Successfully compiled "hello.c" and wrote it to "hello.o"
SUCCESS Saved BPF OCI image to hello:v1
➜ bumblebee (main) ✗ sudo bee list
Name | OS | OS Version | Arch
hello:v1 | Linux | 5.13.19-051319-generic | aarch64
➜ bumblebee (main) ✗ sudo setcap cap_sys_resource,cap_sys_admin,cap_bpf+eip $(which bee)
➜ bumblebee (main) ✗ echo $?
0
➜ bumblebee (main) ✗ sudo bee run hello:v1
SUCCESS Fetching program from registry: hello:v1
(just vagrant ssh
from some other terminal and run curl solo.io
to see the magic 🪄 ).
__
/\ \ Program location: hello:v1
\ \ \____ __ __
\ \ '__'\ /'__'\ /'__'\ // \
\ \ \L\ \/\ __//\ __/ \\_/ //
\ \_,__/\ \____\ \____\ ''-.._.-''-.._.. -(||)(') <ctrl-n> Select next table
\/___/ \/____/\/____/ ''' <ctrl-p> Select previous table
<ctrl-c> Quit
(powered by solo.io)
╔════════════════════════════════════════════════════════════════events════════════════════════════════════════════════════════════════╗
║message pid ║
║Hello World! 11385 ║
║Hello World! 11416
Hi @nickschuetz , any plans to release a new box? https://fridge.ubuntu.com/2022/07/19/ubuntu-21-10-impish-indri-end-of-life-reached-on-july-14-2022/
No, sorry, I do not.
Here are my results based on the example provided in the README:
Then I tried using this setup with an actual arm64 box: https://gist.github.com/sbailliez/f22db6434ac84eccb6d3c8833c85ad92
Here are my results:
vmrun version 1.17.0 build-18656771
Vagrant File: