-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
builder: vagrant: introduce Vagrantfile #237
Conversation
I put the environment building logic inside |
565acb4
to
7e7e035
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this change is for a contributor, we should create a markdown file explaining how to use it, giving examples of outputs and on how to obtain a shell and do the needed compilations IMO.
For sure, I'm on this as well. I spent these days running some builds and I realized today that this current proposal has the libbpfgo build broken due to the old version of libbpf and bpftool available in ubuntu 20.04. I was discussing with @grantseltzer that if we should stick with the bpftool requirement, it would be best to compile libbpf and bpftool altogether. BTW I'm changing the Vagrantfile to use 22.04 boxes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't like the "vagrant" experience to be the default (but a complement only), which I think the separate Makefile does.
For me, the default should be a linux box compiling Tracee (and all vagrant recipes in here and in Tracee should be an addendum).
I would rename builder/prepare-ubuntu.sh to having/specifying it is vagrant related (for other future files not to be confused).
@rafaeldtinoco but wouldn't we mixing things this way? I strongly believe that libbpfgo, in despite of having foundations on Tracee, is now a standalone being. So for sure Tracee could make use of a vagrant environment, but its own.
builder/prepare-ubuntu.sh is a loose shell script. It can be reused from a Dockerfile, github workflow etc. |
Sorry, I meant libbpfgo (not Tracee) in my statement. |
@rafaeldtinoco Oh, I get it.
So, do you mean create a separate Makefile (e.g. ./contrib/{Makefile,Vagrantfile}) just for controlling the Vagrant box? |
The contributor can make use of a VM box (arm64/amd64) using the following Makefile rules: vagrant-up, vagrant-ssh, vagrant-halt and vagrant-destroy. One can override the ARCH env var: make vagrant-up ARCH=arm64 Whether the override will work depends on the availability of online boxes and compatibility of architecture and providers (vbox, parallels). Documentation added. Tested in Darwin (M1) and Linux (amd64).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me, nice work!
vagrant-ssh: .vagrant-ssh | ||
|
||
.vagrant-%: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the .
signify by convention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for letting the reader know that's internal. But they are also not considered first targets: https://www.gnu.org/software/make/manual/make.html#How-Make-Works
The contributor can make use of a VM box (arm64/amd64) using the following Makefile rules:
vagrant-up
,vagrant-ssh
,vagrant-halt
andvagrant-destroy
.One can override the ARCH env var:
make vagrant-up ARCH=arm64
Whether the override will work depends on the availability of online boxes and compatibility of architecture and providers (vbox, parallels).
Tested in Darwin (M1) and Linux (amd64).