remicollet / remirepo

Issue tracker for
https://rpms.remirepo.net/
278 stars 53 forks source link

Remi wizard installation instructions for RHEL 9 needs profile stream information #273

Closed awkohr closed 2 weeks ago

awkohr commented 3 weeks ago

For at least remi 8.2 or 8.3 on RHEL 9 x86_64, The remi wizard at (https://rpms.remirepo.net/) does not currently provide sufficient instructions to install into a clean system, as it does not contain anything about either configuring a default module stream profile yml file in modules.defaults.d for php remi or alternatively specify one in the dnf command lines to use to install, as RHEL 9 does not set a stream profile by default and remi-php has available three profiles of common, devel, minimal to chose from (https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html-single/managing_software_with_the_dnf_tool/index#con_module-streams_assembly_distribution-of-content-in-rhel-9) Please update the REMI wizard to provide complete instructions.

Potential things that might help to fix this.

  1. Possibly include additional, wording to help people decide whether to use common, devel, or minimal. (or possible just recommend users use the one.)
  2. Possibly in the questions section ask to choose which module profile they want to use common, devel, or minimal.
  3. Possibly change the "dnf module install php:remi-8.2" type lines to read "dnf module install php:remi-8.2/chosen/recomeneded_profile" (e.g. What I did "dnf module install php:remi-8.2/minimal" )
  4. instead of adding /profile to the dnf command possibly add steps or an special installer that create a /etc/dnf/modules.defaults.d/ yaml file for remi php to declare which profile to use. The yaml file should be similar to what is documented at https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html-single/managing_software_with_the_dnf_tool/index#proc_setting-module-default-streams_assembly_installing-rhel-9-content From document" " create the /etc/dnf/modules.defaults.d/nodejs.yaml file with the following content to define 18 as the default stream and minimal as the default profile for the nodejs module:

    document: modulemd-defaults version: 1 data: module: nodejs stream: "18" profiles: '18': [minimal]

Verifying said file.

Use the dnf module list <module_name> command to verify the new default stream and profile settings, for example:

# dnf module list nodejs
Name     Stream   Profiles                                Summary
nodejs   18 [d]   common, development, minimal [d], s2i   Javascript"

Additional Notes: Not sure if this is really the ideal, or best long term solution but I choose to set the module profile on my system using the dnf ... module/profile way of doing things as I thought it might be easier to deal with when the time comes to use the next version of remi php.

remicollet commented 3 weeks ago

RHEL 9 does not set a stream profile by default and remi-php has available three profiles of common, devel, minimal to chose from

common is defined as the default profile for each stream (officials or mine)

# dnf module list php

CentOS Stream 9 - AppStream
Name                    Stream                      Profiles                                      Summary                                 
php                     8.1                         common [d], devel, minimal                    PHP scripting language                  
php                     8.2                         common [d], devel, minimal                    PHP scripting language                  

Remi's Modular repository for Enterprise Linux 9 - x86_64
Name                    Stream                      Profiles                                      Summary                                 
php                     remi-7.4                    common [d], devel, minimal                    PHP scripting language                  
php                     remi-8.0                    common [d], devel, minimal                    PHP scripting language                  
php                     remi-8.1                    common [d], devel, minimal                    PHP scripting language                  
php                     remi-8.2                    common [d], devel, minimal                    PHP scripting language                  
php                     remi-8.3                    common [d], devel, minimal                    PHP scripting language                  
php                     remi-8.4                    common [d], devel, minimal                    PHP scripting language                  

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

And after a switch-to

# dnf module switch-to php:remi-8.2

Dependencies resolved.
==========================================================================================================================================
 Package                          Architecture                    Version                          Repository                        Size
==========================================================================================================================================
Enabling module streams:
 php                                                              remi-8.2                                                               

Transaction Summary
==========================================================================================================================================

Is this ok [y/N]: y
Complete!

# dnf module list php

CentOS Stream 9 - AppStream
Name                   Stream                         Profiles                                     Summary                                
php                    8.1                            common [d], devel, minimal                   PHP scripting language                 
php                    8.2                            common [d], devel, minimal                   PHP scripting language                 

Remi's Modular repository for Enterprise Linux 9 - x86_64
Name                   Stream                         Profiles                                     Summary                                
php                    remi-7.4                       common [d], devel, minimal                   PHP scripting language                 
php                    remi-8.0                       common [d], devel, minimal                   PHP scripting language                 
php                    remi-8.1                       common [d], devel, minimal                   PHP scripting language                 
php                    remi-8.2 [e]                   common [d], devel, minimal                   PHP scripting language                 
php                    remi-8.3                       common [d], devel, minimal                   PHP scripting language                 
php                    remi-8.4                       common [d], devel, minimal                   PHP scripting language                 

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
remicollet commented 3 weeks ago

create the /etc/dnf/modules.defaults.d/nodejs.yaml

There is no need for such file, default profiles are defined in the repository metadata (xxxxx-modules.yaml.bz2)

Only case where local files have to be created is with microdnf, used by ubi minimal image, which is not supported (too much missing features)

awkohr commented 3 weeks ago

thank you for your response. I did some more investigating and it seems that the reason I was having troubles is, we are cloning the remi-modular and remi-safe repos through our third party repository server for package version control to go from one environment to another and it seems that while that tool's remi-modular repo is passing through that there are the modules profiles, it is not passing through that the common module profile should be the default. When I install and enable the actual remi-modular repo on the system, I am seeing that common should be the default. I will follow up with Satellite support.

remicollet commented 2 weeks ago

Closing this as there is nothing I can do on my side

But feel free to post any answer from satellite support here

awkohr commented 5 days ago

Incase others experience the same problem. It has been determined that in order for Red Hat Satellite to pass through that the remi-modular repository's modules have a default profile of common, the Satellite remi-modular repository needs to have it's "Mirroring Policy" sync setting configured to "Complete Mirroring." The other two settings of "Content only" or "Additive" will only show that modules exist but not that common is the default.

After changing that setting above for the clients to see the default profile information, you will either need to wait for a potentially extend period of time for your Satellite server to do the following vi its normal processes, or expedite that by performing a manually sync of the remi product family or specifically the remi-modular repository; after the sync completes create a new content view version with the new sync; then promote the content view to the correct lifecycle environment for the host/s that need to see the modular repo defaults or temporarily set the specific host's Lifecycle to Library; and finally after that step completes run a subscription-manager refresh on the system/s that needs to see the module profile defaults.

remicollet commented 5 days ago

Thanks for the followup