Configuring operating system yum repositories for nodes using Red Hat Enterprise Linux

Before you install IBM Cloud Manager with OpenStack on the deployment server, your controller node and Linux compute nodes that are using Red Hat Enterprise Linux must have access to yum repositories that contain operating system and additional software packages. These packages are required when IBM Cloud Manager with OpenStack is installed and OpenStack is deployed.

About this task

Notes:
  • RDO repositories are not supported because they contain packages that conflict with IBM Cloud Manager with OpenStack.
  • For the Red Hat Enterprise Linux operating system, configure fixed Red Hat Enterprise Linux 7.1, 7.2, 7.3, 7.4, 7.5, 7.6 yum repositories that match the current operating system version. Do not use Red Hat Subscription Management or configure the update yum repository. Otherwise, your node operating system will be updated to a higher version while deploying OpenStack.
You have the following options for configuring operating system, updates, and optional yum repositories:
  • You can use a local mirror of yum repositories.
    Important: You must configure the local yum repository by adding a repository file in the /etc/yum.repos.d/ directory, instead of adding a yum repository configuration section into /etc/yum.conf. The IBM Cloud Manager with OpenStack deployment process will configure /etc/yum.conf on the node and your configuration will be overwritten.

    If you choose this option, the yum repositories must be configured on the nodes before installing IBM Cloud Manager with OpenStack and deploying OpenStack and must include local mirrors of the Optional and Supplementary channels.

  • If you cannot use a local mirror of yum repositories on the nodes in your deployment environment, you can set up the deployment server to serve as a yum repository. When the deployment server is configured as a yum repository, the yum repositories are configured on the nodes automatically when OpenStack is deployed. To use this option, your deployment server must first be configured with a local mirror of yum repositories.

    If you choose this option, complete the following instructions for setting up the deployment server to serve as a yum repository after installing IBM Cloud Manager with OpenStack, but before deploying OpenStack.

Set up the deployment server to serve as a yum repository

Important:
  • These instructions apply only if a local mirror of yum repositories cannot be used on the nodes in your OpenStack deployment environment.
  • On the deployment server, you must set up a local mirror of yum repositories according to the previous options described before installing IBM Cloud Manager with OpenStack.
  • You can set up the yum repository on the deployment server or the controller node.

The operating system installation media for the node system contains all of the packages that are required to deploy OpenStack. You can access the operating system installation media by inserting the installation media for the node into the DVD device or by mounting the installation ISO image for the node system. The operating system optional channel installation media for the node system contains all of the optional packages that are required to deploy OpenStack. You can access the operating system optional installation media by inserting the installation media for the node into the DVD device or by mounting the installation ISO image for the node system.

The deployment server is configured to serve these packages from the following locations:

Packages:
<installation directory>/yum-repo/operatingsystem/<platform><platform version>/<architecture>
Package optional:
<installation directory>/yum-repo/operatingsystem/<platform><platform version>/<architecture>/optional
Where the <variables> have the following definitions:
installation directory
The location where IBM Cloud Manager with OpenStack is installed, typically /opt/ibm/cmwo.
platform
The platform of the node system. For example, redhat or ibm_powerkvm.
platform version
The version of the operating system on the node system. For example, 7.4 or 2.1.
architecture
The architecture for the node system. For example, x86_64 or ppc64.
For example, an x86 64-bit Red Hat Enterprise Linux 7.4 node system requires the packages to be in the following directories:
/opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.4/x86_64
/opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.4/x86_64/optional
In this example, replace redhat7.4 with your version of Red Hat Enterprise Linux.
Note: The following packages are provided by the optional yum repository. If you are unable to get optional package support, download the packages from CentOS (http://mirror.centos.org/centos-7/7/os/x86_64/Packages/). You can manually install the optional packages on the server node with an rpm command before deploying. Or, you can add them to the operating system yum repository, but must also run a createrepo command to update the metadata information.
  • python-zope-interface
  • python-pyasn1-modules
For example, a Power® 64-bit (ppc64) Red Hat Enterprise Linux 7.1 node system requires the packages to be in the following directories:
/opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.1/ppc64
/opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.1/ppc64/optional

In this example, replace redhat7.1 with your version of Red Hat Enterprise Linux.

An IBM PowerKVM 2.1 node system requires the packages and updates to be in the following directories:
/opt/ibm/cmwo/yum-repo/operatingsystem/ibm_powerkvm2.1/ppc64
/opt/ibm/cmwo/yum-repo/operatingsystem/ibm_powerkvm2.1/ppc64/updates
To configure the deployment server, complete the following steps:
Note: The following steps use the Red Hat Enterprise Linux 7.2 version and x86 64-bit architecture. However, similar steps apply for other supported architectures and other directories. You must create all directories for each architecture and copy the correct packages from the installation media to each directory.

Procedure

  1. Create the directories for packages on the deployment server for your environment.
    /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64/optional/Packages
  2. Copy the Packages and repodata directory from the installation media to the packages directory on the deployment server.
    1. You can copy the content directly from the ISO image. To use the ISO, either mount the image or the device that contains the ISO media.
      Note: The following example commands must be modified for the specific files and operating system devices on the node.
      • To use the ISO image, copy the ISO to the node and mount the file:
        $ mkdir -p /mnt/iso
        $ mount -o loop RHEL-7.2-20150219.1-Server-x86_64-dvd1.iso /mnt/iso
      • To use the ISO media, insert the media into the DVD device on the node and mount the device:
        $ mkdir -p /mnt/iso
        $ mount /dev/cdrom /mnt/iso
    2. After the ISO is mounted, run the following commands to copy the Packages and repodata directory from the installation media to the packages directory on the deployment server.
      $ cd /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64
      $ cp -r /mnt/iso/Packages .
      $ cp -r /mnt/iso/repodata .
  3. Copy the system optional packages to /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64/optional/Packages and run a createrepo command to create the metadata information.
    $ createrepo /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64/optional/
    The Packages folder under optional contains rpm packages from system optional channel on the installation media from Red Hat Satellite.
    Important: Do not copy the repodata folder from Red Hat Satellite. Instead, create it with the command createrepo.
    Note: Alternatively, you can create a symbolic link to the installation media. If you create the symbolic link, you do not create the architecture directory. Instead, make a symbolic link to the installation media.
    $ cd /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64
    $ ln -s /mnt/iso/Packages
    $ ln -s /mnt/iso/repodata
    If you use the symbolic link, you need to ensure that the mount point persists when the deployment server is restarted.
    Create the following structure under the folder /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64:
    /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64
    /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64/Packages -> /mnt/cdrom/Packages/
    /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64/repodata -> /mnt/cdrom/repodata/
    /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.2/x86_64/optional/Packages
    /opt/ibm/cmwo/yum-repo/operatingsystem/redhat7.21/x86_64/optional/repodata
    

Results

When the deployment server is set up as a yum repository for the operating system packages, these yum repositories are automatically configured on the node systems during the deployment process. You do not need to manually add these yum repositories on the node systems.