-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Background
We are working on creating a new RHEL system role for RHEL upgrades and have identified two potential approaches. We would like to discuss these with the infra.leapp community to find the best path forward that preserves the existing community while meeting RHEL System Roles requirements (this can also help). We have initially developed a POC of a brand new rhel_upgrade (single) role using state-based approaches, but we are concerned about potentially fragmenting the community around upgrade automation.
Two Approaches Under Consideration
Approach 1: New Standalone RHEL System Role
- Create a completely new
rhel_upgraderole following RHEL System Roles standards. - Implements state-based configuration management
- Pros: Clean implementation, follows all standards from the start
- Cons: Risk of community fragmentation, potential duplication of effort
Approach 2: Make infra.leapp System Role Compliant
- Collaborate with the infra.leapp community to evolve the existing collection
- Adapt infra.leapp to meet RHEL System Roles compliance requirements
- Pros: Preserves existing community, builds on proven codebase, avoids fragmentation. The existing collection already has ansible-lint and ansible-test CI but some of the exceptions they allow will have to be changed
- Cons: Requires coordination and potentially significant refactoring
To be RHEL System Role compliant, the role would need to follow some key standards e.g.:
- Variable naming: all variables prefixed with ROLENAME_ (e.g., leapp_upgrade_target_version)
- Idempotency: Role must be idempotent and support check mode
- Support for all required Ansible versions
- Reboot handling: Must not reboot automatically; set ROLENAME_reboot_needed fact instead
- Use import_tasks over include_tasks where possible
- Figure out a way to handle dependencies - https://github.com/redhat-cop/infra.leapp/blob/main/galaxy.yml#L29 - it looks like infra.leapp uses some modules for rhn/satellite which could be replaced with the rhc system role, and some selinux modules which could be replaced with the selinux system role - if there are any modules which must be used which do not have a replacement, then we can vendor in those modules in the rhel build like we do with rhel system roles
- Add Tests - before doing any refactoring, we must have tests - one strategy would be to take the existing RHEL Upgrades QE tests and create Ansible "wrappers" for them - use Testing Farm and/or github action qemu runners like we do for system roles
- And other changes as specified in the requirements link above, and any changes needed in order to pass strict ansible-lint and ansible-test CI.
Questions for the Community
- Is the infra.leapp community interested in making the collection RHEL System Role compliant?
- What would be the impact on existing users if we refactor infra.leapp to meet these requirements?
Benefits of Collaboration
- Keep upgrade automation efforts consolidated
- RHEL System Role status would increase visibility and adoption
- Better integration with Red Hat's supported automation portfolio
- Compliance requirements often improve code quality and maintainability
Would the community be open to this? We think it could benefit both "infra.leapp" users and the wider RHEL automation ecosystem.
Metadata
Metadata
Assignees
Labels
No labels