2.2. Configuring Software Repositories

Red Hat OpenStack requires that each system in the OpenStack environment be running Red Hat Enterprise Linux 6.4 Server. It is recommended that freshly installed systems are used.
Additionally all systems must be subscribed to receive software updates for both Red Hat Enterprise Linux 6.4 Server and Red Hat OpenStack. Follow the instructions in Procedure 2.1, “Configuring Software Repositories” to ensure this is the case.
  • For further information on installing Red Hat Enterprise Linux 6.4 Server refer to the Red Hat Enterprise Linux Installation Guide.
  • For further information on managing Red Hat subscriptions refer to the Red Hat Subscription Management Guide.

Important

RHN Classic is intended to be used with legacy systems (Red Hat Enterprise Linux 6.0 or Red Hat Enterprise Linux 5.6 and earlier releases). It is strongly recommended that Red Hat Enterprise Linux 6.1/5.7 and later systems use Customer Portal Subscription Management, Subscription Asset Manager, or similar certificate-based subscription management service. As such these instructions are not intended for use on systems which have been registered to Red Hat Network using RHN Classic.

Procedure 2.1. Configuring Software Repositories

Unless otherwise mentioned all commands in this procedure must be run while logged in as the root user. You may choose to log in to the system as the root user directly or run each command via sudo if the system is configured to support it.
  1. Use the subscription-manager register command to register the system to Red Hat Network. Enter your Red Hat Network user name and password when prompted.
    # subscription-manager register
    Username: administrator@example.com
    Password:
    When the system is registered to Red Hat Network successfully it will be assigned a unique identifier. This unique identifier will be displayed,
    The system has been registered with id: IDENTIFIER
  2. Locate the identifier for your Red Hat OpenStack subscription pool using the subscription-manager list command.
    # subscription-manager list --available
    +-------------------------------------------+
        Available Subscriptions
    +-------------------------------------------+
    
    Product Name:          Red Hat Enterprise Linux Server
    Product Id:            69
    Pool Id:               POOLID_1
    Quantity:              1
    Service Level:         None
    Service Type:          None
    Multi-Entitlement:     No
    Expires:               01/01/2022
    Machine Type:          physical               
    
    Product Name:          Red Hat OpenStack
    Product Id:            SER0406 
    Pool Id:               POOLID_2
    Quantity:              3
    Service Level:         None
    Service Type:          None
    Multi-Entitlement:     No
    Expires:               02/14/2013
    Machine Type:          physical               
    
    Product Name:          Red Hat OpenStack
    Product Id:            SER0406
    Pool Id:               POOLID_3
    Quantity:              unlimited
    Service Level:         None
    Service Type:          None
    Multi-Entitlement:     No
    Expires:               02/14/2013
    Machine Type:          virtual

    Note

    There are two different types of Red Hat OpenStack subscriptions available. The first is for physical machines and the second is for virtual machines. You are limited to only three physical machines, presumably for compute nodes. There is no limit for the number of virtual machines that OpenStack components may be installed on.
  3. Assign a subscription from a pool to the system using the subscription-manager attach command. You must run this command multiple times ensuring that you attach both a physical Red Hat OpenStack subscription and a Red Hat Enterprise Linux Server subscription to the system.
    # subscription-manager attach --pool=POOLID
    Successfully attached a subscription for PRODUCT.
    PRODUCT will be replaced in the output with the name of the product you have attached a subscription for.
  4. Ensure that the /etc/yum.repos.d/redhat.repo is up to date by running the yum repolist command. This command also creates the file if it does not exist yet.
    # yum repolist
    Once repository metadata has been downloaded and examined, the list of repositories enabled will be displayed, along with the number of available packages.
    repo id                  repo name                                    status
    rhel-6-server-rpms       Red Hat Enterprise Linux 6 Server (RPMs)      8,816
    repolist: 8,816
  5. Install the yum-utils package. The yum-utils package provides the yum-config-manager utility. This utility will be used in subsequent steps of this procedure.
    # yum install -y yum-utils
    Note that depending on the options selected during Red Hat Enterprise Linux installation the yum-utils package may already be installed.
  6. Use the yum-config-manager command to ensure that the correct software repositories are enabled. Each successful invocation of the command will display the updated repository configuration.
    1. Ensure that the repository for the previous Red Hat OpenStack release (Essex) has been disabled.
      # yum-config-manager --disable rhel-server-ost-6-preview-rpms
      Loaded plugins: product-id
      =================== repo: rhel-server-ost-6-preview-rpms ====================
      [rhel-server-ost-6-preview-rpms]
      bandwidth = 0
      base_persistdir = /var/lib/yum/repos/x86_64/6Server
      baseurl = https://cdn.redhat.com/content/beta/rhel/server/6/6Server/x86_64/openstack/essex/os
      cache = 0
      cachedir = /var/cache/yum/x86_64/6Server/rhel-server-ost-6-preview-rpms
      cost = 1000
      enabled = False
      ...

      Note

      Yum treats the values False and 0 as equivalent. As a result the output on your system may instead contain this string:
      enabled = 0

      Note

      If you encounter this message in the output from yum-config-manager then the system has been registered to Red Hat Network using either RHN Classic or RHN Satellite.
      This system is receiving updates from RHN Classic or RHN Satellite.
      Consult the Red Hat Subscription Management Guide for more information on managing subscriptions using RHN Classic or RHN Satellite.
    2. Ensure that the repository for the current Red Hat OpenStack release (Folsom) has been enabled.
      # yum-config-manager --enable rhel-server-ost-6-folsom-rpms
      Loaded plugins: product-id
      ==================== repo: rhel-server-ost-6-folsom-rpms =======================
      [rhel-server-ost-6-folsom-rpms]
      bandwidth = 0
      base_persistdir = /var/lib/yum/repos/x86_64/6Server
      baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/openstack/folsom/os
      cache = 0
      cachedir = /var/cache/yum/x86_64/6Server/rhel-server-ost-6-folsom-rpms
      cost = 1000
      enabled = True
      ...

      Note

      Yum treats the values True and 1 as equivalent. As a result the output on your system may instead contain this string:
      enabled = 1
  7. Run the yum repolist command to verify the correct software repositories are enabled. Note that when the command is run on your system the number of available packages listed may differ.
    repo id                        repo name                                        status
    rhel-6-server-rpms             Red Hat Enterprise Linux 6 Server (RPMs)          8,816
    rhel-server-ost-6-folsom-rpms  Red Hat OpenStack Folsom (RPMs)                     138
    repolist: 10,058
  8. Install the yum-plugin-priorities package. The yum-plugin-priorities package provides a yum plug-in allowing configuration of per-repository priorities.
    # yum install -y yum-plugin-priorities
  9. Use the yum-config-manager command to set the priority of the Red Hat OpenStack software repository to 1. This is the highest priority value supported by the yum-plugin-priorities plug-in.
    # yum-config-manager --enable rhel-server-ost-6-folsom-rpms \
            --setopt="rhel-server-ost-6-folsom-rpms.priority=1"
    Loaded plugins: product-id
    ==================== repo: rhel-server-ost-6-folsom-rpms =======================
    [rhel-server-ost-6-folsom-rpms]
    bandwidth = 0
    base_persistdir = /var/lib/yum/repos/x86_64/6Server
    baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/openstack/folsom/os
    cache = 0
    cachedir = /var/cache/yum/x86_64/6Server/rhel-server-ost-6-folsom-rpms
    cost = 1000
    enabled = True
    ...
    priority = 1
    ...
    
  10. Run the yum update command and reboot to ensure that the most up to date Red Hat Enterprise Linux packages, including the kernel, are installed and running.
    # yum update -y
    # reboot
You have successfully configured your system to receive Red Hat OpenStack packages. You may use the yum repolist to confirm the repository configuration again at any time.