Add recipe generator for automation and DRY recipes

- create generate_recipe.py: CLI tool for generating recipes from templates
- add recipe_templates.yaml: 5 base templates (virtual-desktop, virtual-server, desktop-hypervisor, live-desktop, live-server)
- add recipes_manifest.yaml: 16 recipe variants defined declaratively
- add Makefile: automation targets for generate, validate, test
- add requirements.txt: PyYAML dependency
- add tests/test_recipe_generator.py: 25 pytest tests

This enables:
- Template-based recipe generation with minimal duplication
- One-line variant addition via YAML manifest editing
- Automatic duplicate include prevention
- Ingredient path validation

Generated recipes are committed for reproducibility as per project conventions.
This commit is contained in:
Lukas Greve
2026-03-24 19:52:34 +01:00
parent c1c5fa8d07
commit 1aa264c146
40 changed files with 1601 additions and 124 deletions
+23
View File
@@ -0,0 +1,23 @@
# __ ____ ____ _____
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
# A recipe for a generic desktop hypervisor
%include ../ingredients/core.cfg # Text mode
%include ../ingredients/core-storage.cfg # ext4-based storage configuration
%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language
%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux
%include ../ingredients/core-services.cfg # Required systemd services
%include ../ingredients/core-network.cfg # Network configuration
%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages
%include ../ingredients/core-packages-default.cfg # Default but not necessary packages
%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support
%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide
%include ../ingredients/core-post.cfg # Triggered after the installation
%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell
%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment