[Nexthop] Add fboss2-dev to Distro Image#903
[Nexthop] Add fboss2-dev to Distro Image#903travisb-nexthop wants to merge 12 commits intofacebook:mainfrom
Conversation
This commit updates the FBOSS-OSS Kernel files to remove Nexthop-specific references that were inadvertently included in the initial merge: - Remove sccache distributed build references from build_kernel.sh - Remove nhfboss-common.sh sourcing - Update kernel.spec copyright header to Meta/Facebook format - Fix import ordering in Python scripts to match upstream style - Simplify kernel build process to use standard gcc without sccache wrapper These changes ensure the kernel build system is clean and suitable for upstream FBOSS without Nexthop-specific dependencies.
Integrate distro_cli Python unit tests into the FBOSS CMake build system to enable automated testing in CI/CD pipelines. - Add FbossImageDistroCliTests.cmake to discover and register Python unit tests - Configure test discovery for distro_cli modules (builder, cmds, lib, tools) - Update root CMakeLists.txt to include distro_cli test suite - Enable distro_cli tests in GitHub Actions workflow - Update distro_cli README with build and test instructions The CMake configuration automatically discovers all *_test.py files and registers them as CTest targets, allowing tests to run via 'ctest' or 'make test'.
Provide basic tools and utiulities for the distro_cli build system. - Add custom exception classes for structured error handling - Define shared constants for Docker configuration and build settings - Implement path resolution utilities for components - Define test data fixture for image manifest validation These core utilities provide the base infrastructure required by all downstream components including Docker integration, artifact handling, and build orchestration.
Add Docker container and image management capabilities. - Implement Docker container wrapper with exec and run operations - Implement Docker image wrapper with build, pull, and tag operations - Add comprehensive unit tests for container and image functionality - Include test helper utilities for unit test infrastructure - Add build_docker.sh script for Docker build automation Added unit tests for docker infrastructure and image building.
Add artifact storage and caching capabilities for build outputs. - Implement artifact store for managing build artifacts - Add artifact caching and retrieval functionality - Include unit tests for artifact operations - Update test helpers to support artifact testing Added unit tests for artifact storage and caching.
Add file download capabilities for fetching build dependencies. - Implement download module for HTTP/HTTPS file retrieval - Add support for progress tracking during downloads - Include comprehensive unit tests for download operations
Add command execution capabilities for running build operations. - Implement execute module for running commands in Docker containers - Add support for command execution with output capture - Enable build operations to run in isolated container environments
Add abstract build component framework for managing build operations. - Implement AbstractComponent base class for build components - Add component lifecycle management (prepare, build, extract) - Integrate with artifact store, download, and execute modules - Enable extensible component-based build architecture Tests utilizing the above infrastructure will be added when component build supports are included.
Add build entrypoint orchestration for component-based builds. - Implement build entrypoint for coordinating component build workflows - Add support for build configuration and execution management - Include comprehensive unit tests for entrypoint functionality
Add ImageBuilder class for orchestrating component builds and image assembly. - ImageBuilder: Main orchestration class for building FBOSS images - Compression support for build artifacts (zstd) - Component build coordination - Test coverage for compression functionality - Updated build_test.py to use ImageBuilder
Add scripts and build configuration for building FBOSS forwarding and platform stacks. - CMakeLists.txt: Defines build targets for forwarding stack - package.py: Script for packaging forwarding and platform stacks - build_fboss_stack.sh: Script for building forwarding and platform stacks
|
@travisb-nexthop : is it possible to make /opt/fboss/bin/ in $PATH so we can run fboss2-dev without specifying the absolute path? |
Of course, but if we do that we probably want to move the daemons out into /opt/fboss/sbin or something so they can't be accidentally executed and don't clutter up tab completion. Does that sound acceptable? |
I don't have strong preference here but we can set some standards for any non-service binary that where should we host these binaries. Here's the example on our product NetOS @kevin645 let me know what do you think |
|
Actually talked to Kevin, and it shouldn't be difficult to adjust the path or directory with a small diff in the future. |
Ok, how about I add a small wrapper script as /usr/local/bin/fboss2-dev (and for any other normal command) which invokes the correct binary? This wrapper will later work with component updating where the binary path is not always fixed under /opt/fboss. Similar to the unit drop-ins necessary for the services. |
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
The fboss2-dev CLI command has recently been added to support configuring FBOSS. Add it to the Distro Image.
Test Plan
Validate that the command exists and executes in the image: