Skip to content

Conversation

@rkunwar-28
Copy link
Member

@rkunwar-28 rkunwar-28 commented Dec 19, 2025

Add RHEL 10 Support to CP Ansible (preserve RHEL 9 tests)

📋 Summary

This PR introduces RHEL 10 support to the Confluent Platform Ansible collection while maintaining backward compatibility with RHEL 9. The distribution follows an 80/20 strategy where 80% of tests run on RHEL 10 (modern stack) and 20% remain on RHEL 9 (compatibility/legacy features).

Key Changes

  • RHEL 10 Support: 38 scenarios (80.9%) now use redhat/ubi10-minimal with Java 21
  • RHEL 9 Compatibility: 8 scenarios (19.1%) preserved on redhat/ubi9-minimal with Java 17
  • Dockerfile Optimization: Leveraged existing Dockerfile-rhel-java21.j2 instead of creating new ones
  • Python Dependencies: Fixed packaging module installation for RHEL 10
  • Flavor Consolidation: Converted AlmaLinux/Rocky Linux variants to ubi10-minimal

🎯 Distribution Strategy

RHEL Version Distribution

RHEL 9 Scenarios (Java 17 - 19.1%) RHEL 10 Scenarios (Java 21 - 80.9%)
archive-plain-rhel-fips archive-community-plaintext-rhel
kafka-connect-replicator-plain-kerberos-rhel-fips archive-scram-rhel
kerberos-customcerts-rhel broker-scale-up
multi-ksql-connect-rhel ccloud
plaintext-rhel-customrepo confluent-kafka-kerberos-customcerts-rhel
rbac-mds-mtls-custom-rhel-fips connect-scale-up
rbac-scram-custom-rhel-fips cp-kafka-plain-rhel
scram-rhel custom-user-plaintext-rhel
kerberos-rhel
ksql-scale-up
mini-setup-ext-mds-mtls
mini-setup-ldap-mtls-fips
mini-setup-mtls
mini-setup-mtls-fips
mini-setup-oauth-mtls
mini-setup-out-ldap-in-mtls
mini-setup-out-oauth-in-mtls
mini-setup-partial-mtls
mini-setup-partial-mtls2
mtls-custombundle-rhel-fips
mtls-customcerts-rhel
mtls-java21-rhel-fips
oauth-kafka-connect-replicator-mtls-rhel
oauth-plain-archive
oauth-plain-rhel
oauth-rbac-mds-scram-custom-rhel
oauth-rbac-plain-rhel8
plain-customcerts-rhel-fips
plain-erp-tls-rhel
plaintext-basic-rhel
provided-rhel
rbac-mds-kerberos-mtls-custom-rhel
rbac-mds-mtls-custom-kerberos-rhel
rbac-mds-plain-custom-rhel-fips
rbac-mtls-rhel-fips
rbac-mtls-rhel8
sr-switchover-cp-to-cc-ldap-mtls
sr-switchover-cp-to-cc-mtls
sr-switchover-cp-to-cc-oauth-rbac

TOTALS: RHEL 9 = 8 scenarios (19.1%) | RHEL 10 = 39 scenarios (80.9%)

🛡️ RHEL 9 Feature Coverage

The 8 RHEL 9 scenarios were strategically selected to ensure comprehensive backward compatibility testing across all major Confluent Platform features:

🔐 Authentication Coverage (100%)

Feature Scenarios Coverage
SCRAM rbac-scram-custom-rhel-fips, scram-rhel SHA-256 & SHA-512 variants
Kerberos kerberos-customcerts-rhel, scram-rhel, kafka-connect-replicator-plain-kerberos-rhel-fips MIT Kerberos server, keytab management
RBAC rbac-scram-custom-rhel-fips, rbac-mds-mtls-custom-rhel-fips Local & remote MDS
OAuth/OIDC rbac-scram-custom-rhel-fips SSO with Azure IdP simulation
LDAP rbac-scram-custom-rhel-fips, rbac-mds-mtls-custom-rhel-fips External LDAP integration

🛡️ Security Coverage (87.5%)

Feature Scenarios Coverage
FIPS archive-plain-rhel-fips, rbac-scram-custom-rhel-fips, rbac-mds-mtls-custom-rhel-fips, kafka-connect-replicator-plain-kerberos-rhel-fips Federal security standards
mTLS multi-ksql-connect-rhel, rbac-mds-mtls-custom-rhel-fips, kerberos-customcerts-rhel Mutual TLS authentication
Custom Certs rbac-scram-custom-rhel-fips, kerberos-customcerts-rhel, rbac-mds-mtls-custom-rhel-fips, kafka-connect-replicator-plain-kerberos-rhel-fips Custom PKI management

📦 Installation Coverage (37.5%)

Feature Scenarios Coverage
Archive Installation archive-plain-rhel-fips Tarball-based deployment
Custom Repositories plaintext-rhel-customrepo Custom YUM repo configuration

🔗 Component Coverage (100%)

Feature Scenarios Coverage
Multiple KSQL multi-ksql-connect-rhel 2 distinct KSQL clusters
Multiple Connect multi-ksql-connect-rhel, rbac-scram-custom-rhel-fips Up to 3 Connect clusters
Replicator kafka-connect-replicator-plain-kerberos-rhel-fips Cross-cluster replication

🏢 Enterprise Coverage (75%)

Feature Scenarios Coverage
MDS/RBAC rbac-scram-custom-rhel-fips, rbac-mds-mtls-custom-rhel-fips Local & remote MDS
USM Agent scram-rhel, kerberos-customcerts-rhel, multi-ksql-connect-rhel Various auth methods
SSO Integration rbac-scram-custom-rhel-fips OIDC authentication
Hub Plugins archive-plain-rhel-fips Confluent Hub connector installation

⚙️ Advanced Features (62.5%)

Feature Scenarios Coverage
Log Redaction archive-plain-rhel-fips Sensitive data filtering
Multi-cluster rbac-mds-mtls-custom-rhel-fips, kafka-connect-replicator-plain-kerberos-rhel-fips Cross-cluster operations
Custom Configurations archive-plain-rhel-fips, plaintext-rhel-customrepo, multi-ksql-connect-rhel Advanced customization

⚠️ Important Caveats

Java Compatibility

  • RHEL 10 ships with OpenJDK 25 by default, but our tests use OpenJDK 21 for consistency
  • RHEL 9 scenarios remain on OpenJDK 17 where explicitly required by Dockerfiles
  • Java 17 is not available in RHEL 10 repositories, hence scenarios using Dockerfile-rhel-java17.j2 remain on RHEL 9

Python Dependencies

  • RHEL 10 includes Python 3.12 by default but lacks the packaging module required by Ansible
  • Added packaging module installation in roles/common/tasks/redhat.yml before pip upgrade
  • This ensures compatibility with Ansible's package management on RHEL 10

Image Standardization

  • RHEL 10 tests use only redhat/ubi10-minimal (no AlmaLinux/Rocky Linux flavors)
  • AlmaLinux 10 and Rocky Linux 10 variants were converted to ubi10-minimal for consistency
  • This simplifies maintenance while ensuring broad RHEL-family compatibility

🔧 Technical Changes

Files Modified

  • 47 molecule.yml files - Updated image and dockerfile references
  • roles/common/tasks/redhat.yml - Added packaging module installation
  • roles/common/vars/main.yml - Added packaging to pip_packages
  • molecule/certificates.yml - Updated Java versions and FIPS support
  • molecule/Dockerfile-rhel-tar.j2 - Updated Java version for archive scenarios

✅ Testing Strategy

This distribution ensures:


Note: This PR maintains full backward compatibility while positioning the project for RHEL 10 adoption. The strategic 80/20 split ensures comprehensive testing coverage while minimizing risk.

@rkunwar-28 rkunwar-28 requested a review from a team as a code owner December 19, 2025 10:38
Copilot AI review requested due to automatic review settings December 19, 2025 10:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for RHEL 10 to the Ansible playbooks by updating version checks, Docker configurations, and OS-specific dependencies. The changes ensure compatibility with RHEL 10 while removing support for RHEL 7 and older Debian versions.

Key changes:

  • Updated supported RHEL versions from 7, 8, 9 to 8, 9, 10
  • Updated Debian supported versions from 9, 10 to 12
  • Migrated Docker images from ubi9-minimal to ubi10-minimal with Java 21
  • Updated Docker volume mounts for cgroup v2 compatibility
  • Added python3-packaging dependency for RHEL 10

Reviewed changes

Copilot reviewed 71 out of 71 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
roles/common/tasks/redhat.yml Added python3-packaging installation for RHEL 10 and updated FIPS support to include version 10
roles/common/tasks/custom_java_install.yml Removed CentOS 7 Java 17 compatibility check
playbooks/validate_hosts.yml Updated supported versions: removed RHEL 7, added RHEL 10; updated Debian to only support version 12
molecule/*/molecule.yml Upgraded all test containers from ubi9-minimal/Java 17 to ubi10-minimal/Java 21, changed cgroup mounts from ro to rw with host mode
molecule/certificates.yml Split Java installation logic to support Java 17 on RHEL 8/9 and Java 21 on RHEL 10

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- pip-package
when:
- ansible_distribution != "Amazon"
- ansible_os_family == "RedHat" and ansible_distribution_major_version in ['10']
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition uses a list with a single element. For consistency and clarity, this should either use a simple equality check == '10' or be prepared for future versions by using a more descriptive variable name like rhel_versions_requiring_packaging_module.

Suggested change
- ansible_os_family == "RedHat" and ansible_distribution_major_version in ['10']
- ansible_os_family == "RedHat" and ansible_distribution_major_version == '10'

Copilot uses AI. Check for mistakes.
@rrbadiani
Copy link
Member

RHEL 10 ships with OpenJDK 25 by default, but our tests use OpenJDK 21 for consistency ->

are we going to add support for java25 in 8.2 ? Right now all the dockerfiles in tests are installing java21. So will java version ansible var override it with java25 or in the end all tests will have java21 ?

@rrbadiani
Copy link
Member

also can you pls attach the semaphore link

@rkunwar-28 rkunwar-28 changed the base branch from master to 8.2.x December 30, 2025 12:00
# - ansible_os_family == "RedHat" and ansible_distribution_major_version in ['8', '9', '10']
- name: Install crypto-policies-scripts package
yum:
name: crypto-policies-scripts
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt this coming by default in rhel8 9?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

essentially i thought we can keep the code w.r.t crypto policies such that it doesnt change for rhel8 9 and for rhel 10 it gets skipped

Copy link
Member

@rrbadiani rrbadiani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks!

@rkunwar-28 rkunwar-28 merged commit 066a2b4 into 8.2.x Jan 7, 2026
2 checks passed
@rkunwar-28 rkunwar-28 deleted the add-rhel10-support-ANSIENG-5755 branch January 7, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants