-
Notifications
You must be signed in to change notification settings - Fork 905
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
update(ci): update ci jobs to generate Falco images with the modern BPF probe #2320
Conversation
Can you use some comments in the circleci config? :) |
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.
Added some comments on arm64 job, they are all valid for the centos7 one
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 90 | ||
sudo update-alternatives --install /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-14 90 |
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.
here we set llvm-14 and clang-14 as default in the system
git clone https://github.com/libbpf/bpftool.git --branch v7.0.0 --single-branch | ||
cd bpftool | ||
git submodule update --init | ||
cd src && sudo make install |
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.
here we install bpftool
docker run -e BUILD_TYPE="release" -it -v /tmp/source-arm64:/source -v /tmp/build-arm64:/build \ | ||
falcosecurity/falco-builder:latest \ | ||
package | ||
mkdir -p /tmp/source-arm64/falco/skeleton-build |
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.
here we build in a separate build dir called skeleton-build
the modern bpf skeleton
cp /tmp/build-arm64/release/*.deb /tmp/packages | ||
cp /tmp/build-arm64/release/*.tar.gz /tmp/packages | ||
cp /tmp/build-arm64/release/*.rpm /tmp/packages | ||
DOCKER_BUILDKIT=1 docker build -f /tmp/source-arm64/falco/docker/builder/modern-falco-builder.Dockerfile --output type=local,dest=/tmp --build-arg CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DUSE_BUNDLED_DEPS=On -DFALCO_ETC_DIR=/etc/falco -DBUILD_FALCO_MODERN_BPF=ON -DMODERN_BPF_SKEL_DIR=/source/skeleton-build/skel_dir -DBUILD_DRIVER=Off -DBUILD_BPF=Off" --build-arg DEST_BUILD_DIR=/build-arm64/release /tmp/source-arm64/falco |
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.
DOCKER_BUILDKIT
is needed to use the--output
docker command- as a build arg we pass
CMAKE_OPTIONS=
, so all the CMake options necessary to build Falco with the modern probe, we need to provide the external built skeleton with theMODERN_BPF_SKEL_DIR
CMake variable, note that the provided path is already relative to the container file system not to the host one. --build-arg DEST_BUILD_DIR=/build-arm64/release
here we are saying the container to copy the build directory in this location of the ubuntu 22.04 machine, in this way we can reuse this build directory in thetest-integrations
jobs/tmp/source-arm64/falco
this is the docker build context with the source code of Falco
461c1df
to
dc818cf
Compare
/hold |
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
0644a96
to
6338a72
Compare
@@ -1,4 +1,6 @@ | |||
add_subdirectory(trace_files) | |||
|
|||
add_subdirectory(plugins) | |||
add_subdirectory(confs/plugins) | |||
if(NOT MUSL_OPTIMIZED_BUILD) |
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.
in musl build we don't have plugins so I've disabled the testing phase for plugins
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
6338a72
to
cf39d87
Compare
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
I've bumped the resource classes to |
This PR also bumps libs and driver to latest tags: 0.10.0 and 4.0.0+driver! Thanks Andrea! |
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.
/approve
LGTM label has been added. Git tree hash: 9eecdbdc0bf2cb2823d64ed0fcd7cfa706378004
|
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
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.
/approve
LGTM label has been added. Git tree hash: 2eeec656e89a1bab5fa9ca172223ad917bddd69c
|
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, jasondellaluce The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area build
/area CI
What this PR does / why we need it:
This PR brings the necessary changes in the circle-ci jobs to build a Falco image for the modern bpf probe. I added a docker image that returns Falco packages as output (deb, rpm, tar).
This PR is the dual of #2282, the idea is to merge this for the release and leave the other PR open until Falco 0.34 is released so users can continue to test the modern probe if they want :)
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: