Chapter 12. Updating Red Hat Update Infrastructure

This chapter explains how to update your Red Hat Update Infrastructure installation.
Red Hat Update Infrastructure can be configured to provide and use a repository that will update the Red Hat Update Infrastructure installation itself. The repository can be created using Red Hat Update Infrastructure Manager, which can then generate an entitlement certificate and client configuration RPM. The RPM is then installed on the Red Hat Update Appliance and each CDS instance, and future updates can be downloaded and installed using the yum command.

Important

If updating from a version 2.1.1 and lower, follow the steps from 1 to 9 in this section and then see the additional update instructions in Section 12.1, “Additional Instructions for Updating Red Hat Update Infrastructure 2.1.1 and Lower”.
Updates from version 2.1.2 and higher only require the steps in this section.

Procedure 12.1. Updating Red Hat Update Infrastructure

  1. Add the Red Hat Update Infrastructure repositories to the Red Hat Update Appliance. Use Procedure 2.3, “Add a Red Hat Repository” to install the following repositories:
    Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)
    Red Hat Update Infrastructure 2 (RPMs) (6.0-i386)
    Red Hat Update Infrastructure 2 (RPMs) (6.1-i386)
    Red Hat Update Infrastructure 2 (RPMs) (6.1-x86_64)
    Red Hat Update Infrastructure 2 (RPMs) (6Server-i386)
    Red Hat Update Infrastructure 2 (RPMs) (6.0-x86_64)
    Red Hat Update Infrastructure 2 (SRPMS) (6.1-i386)
    Red Hat Update Infrastructure 2 (SRPMS) (6.0-i386)
    Red Hat Update Infrastructure 2 (SRPMS) (6.0-x86_64)
    Red Hat Update Infrastructure 2 (SRPMS) (6Server-x86_64)
    Red Hat Update Infrastructure 2 (SRPMS) (6Server-i386)
    Red Hat Update Infrastructure 2 (SRPMS) (6.1-x86_64)
    

    Note

    Using the All in Certificate method to add the repositories will add all these repositories at the same time. If you prefer to use the By Product method, add the product called Red Hat Update Infrastructure 2 (RPMs) and, optionally, Red Hat Update Infrastructure 2 (SRPMs).
  2. Check that the correct repositories have been installed using Red Hat Update Infrastructure Manager:
    ------------------------------------------------------------------------------
    rhui (repo) => l
    
    Red Hat Repositories
      Red Hat Update Infrastructure 2 (RPMs) (6Server-x86_64)
      Red Hat Update Infrastructure 2 (RPMs) (6.0-i386)
      Red Hat Update Infrastructure 2 (RPMs) (6.1-i386)
      Red Hat Update Infrastructure 2 (RPMs) (6.1-x86_64)
      Red Hat Update Infrastructure 2 (RPMs) (6Server-i386)
      Red Hat Update Infrastructure 2 (RPMs) (6.0-x86_64)
      Red Hat Update Infrastructure 2 (SRPMS) (6.1-i386)
      Red Hat Update Infrastructure 2 (SRPMS) (6.0-i386)
      Red Hat Update Infrastructure 2 (SRPMS) (6.0-x86_64)
      Red Hat Update Infrastructure 2 (SRPMS) (6Server-x86_64)
      Red Hat Update Infrastructure 2 (SRPMS) (6Server-i386)
      Red Hat Update Infrastructure 2 (SRPMS) (6.1-x86_64)
    
    ------------------------------------------------------------------------------
    
  3. Wait for the repository synchronization to complete, and then synchronize the CDS instances. Use Procedure 9.5, “Trigger a CDS Synchronization”.
  4. Generate an entitlement certificate for the Red Hat Update Infrastructure repositories. Use Procedure 4.1, “Generating an Entitlement Certificate”.
  5. Generate a client configuration rpm. Use Procedure 4.2, “Create a Client Configuration RPM”.

    Note

    When you name the client configuration RPM, choose a name that will help you to identify that the RPM is to be used for providing updates to Red Hat Update Infrastructure, such as rhui-update.
  6. Install the client configuration RPM on the Red Hat Update Appliance and each CDS that requires updating:
    # yum install /tmp/rhui/rhui-update.el6.noarch.rpm
  7. Perform the update using yum. The client configuration RPM will configure a yum repository called rhui-rhui-2. Use the yum update command to update each instance:
    # yum update
    

    Note

    Running yum update will pull updates from all enabled yum repositories. To pull updates from the rhui-rhui-2 yum repository only, use the following command instead:
    # yum --disablerepo=* --enablerepo=rhui-rhui-2 update
    
  8. Run the pulp-migrate command to apply database migrations if applicable:
    # pulp-migrate
    
  9. Restart the service to pick up any changes.
    On the Red Hat Update Appliance, restart the pulp-server service:
    # service pulp-server restart
    
    On each CDS instance, restart the pulp-cds service:
    # service pulp-cds restart
    

Note

Once the Red Hat Update Infrastructure yum repositories have been configured on the Red Hat Update Appliance and the CDS, only the final step is required to update those systems.

12.1. Additional Instructions for Updating Red Hat Update Infrastructure 2.1.1 and Lower

This section contains additional instructions for updating from Red Hat Update Infrastructure 2.1.1 and lower.
On the Red Hat Update Appliance, follow the steps from 1 to 9 in Procedure 12.1, “Updating Red Hat Update Infrastructure” before following these additional steps.

Procedure 12.2. Updating Red Hat Update Infrastructure from 2.1.1 and lower

  1. Edit /etc/pulp/pulp.conf using your preferred text editor and set verify_checksum and verify_size in the [yum] section to true.
    [yum]
    ...
    verify_checksum: true
    verify_size: true
    
  2. Stop the pulp-server service.
    # service pulp-server stop
    
  3. Run the migration script.
    # pulp-package-migrate --migrate -d /var/lib/pulp
    

    Note

    The script could take several hours to run and logs to /tmp/pulp_package_migrate.log. Backup the log file to a different directory such as /root/ after the script completes so that it will be saved.
  4. Start the pulp-server service.
    # service pulp-server start
    
  5. After the synchronization is completed, edit /etc/pulp/pulp.conf using your preferred text editor and set verify_checksum and verify_size in the [yum] section to false.
    [yum]
    ...
    verify_checksum: false
    verify_size: false
    
  6. Restart the pulp-server service.
    # service pulp-server restart
    
  7. For each CDS, follow the steps from 1 to 9 in Procedure 12.1, “Updating Red Hat Update Infrastructure”.

    Important

    The migration script requires httpd to be stopped on the CDS, so clients will not be able to connect to the CDS to install or update packages. In deployments with more than 1 CDS server, it is recommended to only run the script on one CDS at a time so that clients will fail over and use one of the other CDS servers that is still up.
  8. Edit /etc/pulp/cds.conf using your preferred text editor and set verify_checksum and verify_size in the [cds] section to true.
    [cds]
    ...
    verify_checksum = true
    verify_size = true
    
  9. Stop the pulp-cds service.
    # service pulp-cds stop
    
  10. Run the migration script.
    # pulp-package-migrate --migrate -d /var/lib/pulp-cds
    

    Note

    The script could take several hours to run and logs to /tmp/pulp_package_migrate.log. Backup the log file to a different directory such as /root/ after the script completes so that it will be saved.
  11. Start the goferd service.
    # service goferd start
    
  12. Return to the Red Hat Update Appliance server and start a CDS synchronization. Use Procedure 9.5, “Trigger a CDS Synchronization”.
  13. After the synchronization is completed, edit /etc/pulp/cds.conf using your preferred text editor and and set verify_checksum and verify_size in the [cds] section to false.
    [cds]
    ...
    verify_checksum = false
    verify_size = false
    
  14. Restart the pulp-cds service.
    # service pulp-cds restart