-
Notifications
You must be signed in to change notification settings - Fork 372
[Nexthop] Execute & Download for FBOSS Image Builder #796
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
Closed
raghav-nexthop
wants to merge
27
commits into
facebook:main
from
nexthop-ai:raghav.distro-cli-download
Closed
[Nexthop] Execute & Download for FBOSS Image Builder #796
raghav-nexthop
wants to merge
27
commits into
facebook:main
from
nexthop-ai:raghav.distro-cli-download
+12,968
−10
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary:
Here an RPM specfile and surrounding machinery is added to build an
FBOSS-compatible Linux kernel from vanilla Linux sources which is
compatible with CentOS. On top of this reference configuration,
additional local changes from `fboss-local-overrides.yaml` are applied
prior to building.
To use, inside an FBOSS build container, run:
# fboss-image/kernel/scripts/build_kernel.sh 6.4.3 out
...
Kernel RPM build complete!
Output files:
out/x86_64/kernel-modules-6.4.3-1.fboss.el9.x86_64.rpm
out/x86_64/kernel-headers-6.4.3-1.fboss.el9.x86_64.rpm
out/x86_64/kernel-core-6.4.3-1.fboss.el9.x86_64.rpm
out/x86_64/kernel-devel-6.4.3-1.fboss.el9.x86_64.rpm
out/BUILD/linux-6.4.3/kernel/config_data.gz
out/SRPMS/kernel-6.4.3-1.fboss.el9.src.rpm
out/kernel-6.4.3.rpms.tar.gz
out/kernel-6.4.3-1.fboss.el9.src.rpm
out/RPMS/x86_64/kernel-modules-6.4.3-1.fboss.el9.x86_64.rpm
out/RPMS/x86_64/kernel-headers-6.4.3-1.fboss.el9.x86_64.rpm
out/RPMS/x86_64/kernel-core-6.4.3-1.fboss.el9.x86_64.rpm
out/RPMS/x86_64/kernel-devel-6.4.3-1.fboss.el9.x86_64.rpm
# ls fboss-image/kernel/dist/build-6.4.3/out/
kernel-6.4.3-1.fboss.el9.src.rpm kernel-core-6.4.3-1.fboss.el9.x86_64.rpm kernel-headers-6.4.3-1.fboss.el9.x86_64.rpm
kernel-6.4.3.rpms.tar.gz kernel-devel-6.4.3-1.fboss.el9.x86_64.rpm kernel-modules-6.4.3-1.fboss.el9.x86_64.rpm
Add foundational infrastructure for distro_cli: - Custom exception classes for error handling - Shared constants for Docker and build configuration - Path resolution utilities for project structure - ImageManifest class for build configuration parsing - CMake test infrastructure for Python unit tests Test Plan: - Pre-commit checks: PASSED - Files staged: 5 files, +209 lines - Ready for unit test execution via CMake (ctest)
Add Docker container and image management: - Docker container wrapper with exec/run capabilities - Docker image wrapper with build/pull/tag operations - Bazel build configuration for docker module - Comprehensive unit tests for container and image operations Dependencies: Uses constants from PR #1 Test Plan: - Pre-commit checks: PASSED - Files staged: 5 files, +502 lines - Unit tests: docker_test.py, docker_image_test.py
Add command execution and file download utilities: - Execute module for running commands in Docker containers - Download module for fetching files from URLs - Support for HTTP/HTTPS downloads with progress tracking - Comprehensive unit tests (6 tests) Dependencies: Uses docker, artifact, and exceptions from previous PRs Test Plan: - Pre-commit checks: PASSED - Files staged: 3 files, +557 lines - Unit tests: download_test.py (6 tests)
Add foundational infrastructure for distro_cli: - Custom exception classes for error handling - Shared constants for Docker and build configuration - Path resolution utilities for project structure - ImageManifest class for build configuration parsing - CMake test infrastructure for Python unit tests Test Plan: - Pre-commit checks: PASSED - Files staged: 5 files, +209 lines - Ready for unit test execution via CMake (ctest)
Add Docker container and image management: - Docker container wrapper with exec/run capabilities - Docker image wrapper with build/pull/tag operations - Bazel build configuration for docker module - Comprehensive unit tests for container and image operations Dependencies: Uses constants from PR #1 Test Plan: - Pre-commit checks: PASSED - Files staged: 5 files, +502 lines - Unit tests: docker_test.py, docker_image_test.py
Add abstract build component system: - AbstractComponent base class for build components - Component lifecycle management (prepare, build, extract) - Integration with artifact store, download, and execute modules - Test helpers for component testing Dependencies: Uses artifact, download, execute, constants, and exceptions Test Plan: - Pre-commit checks: PASSED - Files staged: 2 files, +373 lines - Test helpers available for component testing
Summary:
Here an RPM specfile and surrounding machinery is added to build an
FBOSS-compatible Linux kernel from vanilla Linux sources which is
compatible with CentOS. On top of this reference configuration,
additional local changes from `fboss-local-overrides.yaml` are applied
prior to building.
To use, inside an FBOSS build container, run:
# fboss-image/kernel/scripts/build_kernel.sh 6.4.3 out
...
Kernel RPM build complete!
Output files:
out/x86_64/kernel-modules-6.4.3-1.fboss.el9.x86_64.rpm
out/x86_64/kernel-headers-6.4.3-1.fboss.el9.x86_64.rpm
out/x86_64/kernel-core-6.4.3-1.fboss.el9.x86_64.rpm
out/x86_64/kernel-devel-6.4.3-1.fboss.el9.x86_64.rpm
out/BUILD/linux-6.4.3/kernel/config_data.gz
out/SRPMS/kernel-6.4.3-1.fboss.el9.src.rpm
out/kernel-6.4.3.rpms.tar.gz
out/kernel-6.4.3-1.fboss.el9.src.rpm
out/RPMS/x86_64/kernel-modules-6.4.3-1.fboss.el9.x86_64.rpm
out/RPMS/x86_64/kernel-headers-6.4.3-1.fboss.el9.x86_64.rpm
out/RPMS/x86_64/kernel-core-6.4.3-1.fboss.el9.x86_64.rpm
out/RPMS/x86_64/kernel-devel-6.4.3-1.fboss.el9.x86_64.rpm
# ls fboss-image/kernel/dist/build-6.4.3/out/
kernel-6.4.3-1.fboss.el9.src.rpm kernel-core-6.4.3-1.fboss.el9.x86_64.rpm kernel-headers-6.4.3-1.fboss.el9.x86_64.rpm
kernel-6.4.3.rpms.tar.gz kernel-devel-6.4.3-1.fboss.el9.x86_64.rpm kernel-modules-6.4.3-1.fboss.el9.x86_64.rpm
Add CMake configuration and CI workflow for FBOSS Image Builder: - CMake test configuration for distro_cli unit tests - GitHub Actions workflow for automated testing - README documentation for the distro_cli tool Test Plan: - CMake configuration tested with pytest integration - CI workflow validates on pull requests
Add foundational infrastructure for distro_cli: - Custom exception classes for error handling - Shared constants for Docker and build configuration - Path resolution utilities for locating components - ImageManifest class for build configuration parsing - Unit tests for ImageManifest with test data Test Plan: - Pre-commit checks: PASSED - Unit tests: 5/5 passing $ PYTHONPATH=fboss-image python3 -m pytest fboss-image/distro_cli/tests/manifest_test.py -v test_has_component PASSED test_load_manifest PASSED test_missing_components PASSED test_resolve_path_relative PASSED test_resolve_path_url PASSED
Add Docker container and image management: - Docker container wrapper with exec/run capabilities - Docker image wrapper with build/pull/tag operations - Build script for FBOSS builder Docker image - Comprehensive unit tests for Docker operations Dependencies: Uses constants from PR facebook#792 Test Plan: - All unit tests pass (docker_test.py, docker_image_test.py) - Docker image builds successfully with all build dependencies
Add CMake configuration and CI workflow for FBOSS Image Builder: - CMake test configuration for distro_cli unit tests - GitHub Actions workflow for automated testing - README documentation for the distro_cli tool Test Plan: - CMake configuration tested with pytest integration - CI workflow validates on pull requests
Add foundational infrastructure for distro_cli: - Custom exception classes for error handling - Shared constants for Docker and build configuration - Path resolution utilities for locating components - ImageManifest class for build configuration parsing - Unit tests for ImageManifest with test data Test Plan: - All unit tests pass (manifest_test.py) - Pre-commit checks pass
2 tasks
f37da62 to
b50b241
Compare
Author
|
New PR will be created. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
This PR introduces command execution and file download utilities for the FBOSS Image Builder, building on the artifact storage system from the previous PR.
This is part of a series. The previous one is #795
Test Plan
Added new Unit Tests.