How jfut/ganeti-rpm works
Main Components
• CI/CD/Developer Trigger:
• GitHub Workflows (under .github/workflows) for automated builds, testing, and release drafting.
• Local development actions: commits, pull requests, and manual execution of build scripts.
• Build Scripts and Orchestration:
• The “build” script that triggers container-based builds.
• The “build-rpm” script, which runs inside the container, orchestrating tasks like cleaning, building, signing, and optionally installing the packages.
• “setup” and “setup-ghc” components that initialize the environment.
• Containerized Build Environment:
• Docker containers are core to this design as they encapsulate the build environment for different distributions (e.g., “almalinux:9”, “rockylinux:9”, “centos:7”).
• Container image along with its role in providing a consistent OS environment.
• RPM Build Subsystem:
• The “rpmbuild” directory holds the packaging recipes (SPEC files), patches, and source files for Ganeti, its dependencies (such as python-bitarray, python-inotify, socat), and even integrated repositories (integ-ganeti-release).
• Logical separation of packages being built – Ganeti itself, Ganeti-instance-debootstrap, and other dependencies.
• Package and Repository Management:
• Final built RPM packages are signed and then made available through YUM/DNF repositories (as indicated by repository URLs mentioned in the README).
• This component might also include external repository mirrors (e.g., OSU Open Source Lab mirror).
Relationships and Interactions
• CI/CD Trigger to Build Scripts:
• Build Scripts to Containers:
• That the “build” script invokes Docker containers with specific base images corresponding to different OS targets.
• Inside the Container:
• Within the container, the “build-rpm” script reads from the “rpmbuild” directory (which includes SPEC files, source patches and configuration) to construct the RPM packages.
• Deployment Flow:
Architectural Patterns & Design Principles
• Modularity:
• The separation between build orchestration (scripts) and the actual packaging (rpmbuild files) exemplifies a modular design.
• Containerization:
• The use of Docker ensures environment consistency and is a critical pattern in the design.
• CI/CD Integration:
• Extensibility:
• The existence of multiple directories for different packaging components (Ganeti, its instance-debootstrap, dependencies) shows an extensible design so that new packages or updates can be integrated with minimal friction.