Skip to content

Kernel Version Testing Framework CI implementation #1191

Description

@FedeDP

This issue will serve as a tracker for the implementation of the "Kernel Version Testing" framework for the Falco libs.
The framework aims to test the compatibility of the drivers (kmod, bpf, and the modern bpf) across different kernels and distributions by running scap-open and drivers_test functions. The testing environment will leverage Firecracker microVMs with OCI artifacts for storing kernels and images.
The entire testing process will be orchestrated using an Ansible playbook, and the output will be a Markdown matrix detailing the test results.

It is, for all intents and purposes, an implementation of the detailed proposal merged ~ a week ago: https://github.com/falcosecurity/libs/blob/master/proposals/20230530-driver-kernel-testing-framework.md

Tasks

  1. Set up Firecracker microVMs:

    • Research and evaluate the suitability of Firecracker for the testing requirements.
    • Develop a strategy for managing microVM creation, configuration, and cleanup within the testing framework.
  2. Implement OCI artifact storage:

    • Identify a suitable repository or storage solution for storing kernel versions and images as OCI artifacts (eg: falcosecurity/drivers_testing_{kernel,rootfs})
    • Define the process for retrieving the required artifacts during the testing workflow.
  3. Design and implement the Ansible playbook:

    • Define the necessary Ansible roles and tasks to automate microVM provisioning and configuration.
    • Integrate the playbook with the OCI artifact retrieval process to ensure consistent environment setup.
    • Implement logic to capture test results and generate detailed reports.
  4. Generate the Markdown matrix:

    • Design a structured format for the Markdown matrix, including kernel version, distribution, and test results.
    • Develop a script or tool to generate the Markdown matrix based on the captured test results.
  5. Integration with CI/CD pipeline:

    • metal EC2 node is needed to run Firecracker vms
    • Self-hosted github actions runner on the ec2 node
    • Master CI will have a workflow to run the kernel version testing framework

First Impl (ETA end of July)

Given all of the above, first implementation should be considered done when:

Second iteration

  • Add a gh pages to show the result matrix
  • Add full support for arm64 (ie15-20 additional images to be tested)
  • Switch to drivers_test executable instead of scap-open to also verify drivers correct behavior

Ideas

  • Automatically fetch needed info (kernel images, modules and so on) from kernel-crawler
  • Automatically build input test matrix (ie: list of images to be tested) given weekly kernel-crawler output (ie: add eg: 1 image per each crawled distro each week, enlarging our input test matrix)

Additional Notes

Please use this issue to track the progress of individual tasks related to the implementation of the Kernel Version Testing framework.
Update the task checkboxes as you make progress, and provide relevant details, code snippets, or documentation in the comments.

Feel free to ask any questions or seek clarification regarding the tasks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions