Configuring a Mirror Server

These procedures describe how to set up channels on a ULN mirror server.

For an introduction to and comparison of the uln-yum-mirror and dnf reposync methods for configuring a mirror server, see the following My Oracle Support articles:

Configuring a Mirror Server for Oracle Linux 8 or Oracle Linux 9

This procedure describes how to set up channels for Private Cloud Appliance Release 2.4.3.x and Private Cloud Appliance Release 2.4.4.x on a ULN mirror server that is running Oracle Linux 8 or Oracle Linux 9.

  1. (Optional) Set the proxy.

    If your organization uses a proxy server as an intermediary for internet access, specify the proxy setting in the /etc/dnf/dnf.conf file as described in Configuring a System to Use a Proxy With a Yum Server in Managing Software in Oracle Linux.

  2. Ensure the following:

  3. Configure the ULN mirror.

    See Configuring a System to Use ULN in Managing Software in Oracle Linux.

  4. Subscribe the mirror server to the appropriate PCA ULN channels.

    For example, for Oracle Private Cloud Appliance release 2.4.4.4, subscribe to PCA 2.4.4.4 MN (pca2444_x86_64_mn) and PCA 2.4.4.4 CN (pca2444_x86_64_cn). For Oracle Private Cloud Appliance release 2.4.3.2, subscribe to pca2432_x86_64_mn and pca2432_x86_64_cn.

    A mirror server can be subscribed to additional channels.

    • Use only these PCA MN and CN channels to install Private Cloud Appliance patches. Updating the appliance using other channels and other methods is not supported.

    • Best practice is to isolate Private Cloud Appliance ULN channels from other ULN channels.

  5. Create a local yum ULN mirror on this server.

    Follow the instructions in How to Set Up a Distribution Mirror in Managing Software in Oracle Linux to set up the channel mirror on a data center server that the Private Cloud Appliance can access.

  6. Ensure that updates are enabled.

    In /etc/yum/pluginconf.d/rhnplugin.conf, set enabled=1:
    [main]
    enabled = 1
    gpgcheck = 1
    timeout = 120
  7. On the mirror server, synchronize the repositories as shown in the following examples.

    Private Cloud Appliance release 2.4.4.4:

    dnf reposync --repo=pca2444_x86_64_mn --delete --download-metadata -p /var/www/html/yum/EngineeredSystems/pca2444/mn/x86_64
    dnf reposync --repo=pca2444_x86_64_cn --delete --download-metadata -p /var/www/html/yum/EngineeredSystems/pca2444/cn/x86_64

    Private Cloud Appliance release 2.4.3.2:

    dnf reposync --repo=pca2432_x86_64_mn --delete --download-metadata -p /var/www/html/yum/EngineeredSystems/pca2432/mn/x86_64
    dnf reposync --repo=pca2432_x86_64_cn --delete --download-metadata -p /var/www/html/yum/EngineeredSystems/pca2432/cn/x86_64
  8. Create symbolic links to complete the necessary directory structure.

    1. Go to the ULN repository directory destination:

      # cd /var/www/html/yum/EngineeredSystems/pca2444/cn/x86_64
      # ls
      pca2444_x86_64_cn
    2. Create symbolic links:

      # ln -s */repodata .
      # ln -s */getPackage .
      # ls -al
      total 0
      drwxr-xr-x 3 root root 65 Feb 7 11:00 .
      drwxr-xr-x 3 root root 20 Feb 7 10:48 ..
      lrwxrwxrwx 1 root root 28 Feb 7 11:00 getPackage -> pca2444_x86_64_cn/getPackage
      drwxr-xr-x 4 root root 40 Feb 7 10:48 pca2444_x86_64_cn
      lrwxrwxrwx 1 root root 26 Feb 7 11:00 repodata -> pca2444_x86_64_cn/repodata
  9. Verify the repositories are configured on the mirror server.

    # yum repolist
  10. Connect to the repositories from the Private Cloud Appliance.

    Run the following command from the master management node:

    # /usr/sbin/pca-admin create uln-repo mirror mirror_uri

    The format of mirror_uri is http://your_datacenter_uri/yum, as shown in the following example:

    # /usr/sbin/pca-admin create uln-repo mirror http://198.51.100.10/yum
    Status: Success

    The ULN repository configuration file, /nfs/shared_storage/conf/uln.conf, is constructed for access to the ULN mirror, and the repositories are pulled over and set up on the active management node. This configuration file is populated with the mirror repository URI (mirror_uri), with repo_type set to Mirror, and with values for cn_repo and mn_repo to indicate which repositories have been set up on the system.

    The /nfs/shared_storage/conf/uln.repo file is created with the details required to pull the repositories from the mirror server for the ULN channels that are available.

    The repositories at mirror_uri are pulled over and set up on the Private Cloud Appliance in the following location:

    /nfs/shared_storage/yum/pca_patch_pca_version

    For example, repositories are configured at the following locations:

    /nfs/shared_storage/yum/pca_patch_2.4.4.2/cn
    /nfs/shared_storage/yum/pca_patch_2.4.4.2/mn

    The entry for the ULN compute node repository is added to the ovm.repo file in the /etc/yum.repos.d directory on the compute nodes and enabled.

    Repositories that are defined in /etc/yum/plugin.d/rhn.conf, as well as any that are enabled in other configuration files in /etc/yum.repos.d, are disabled.

  11. Verify that the repositories are configured on the Private Cloud Appliance.

    Use the following command to verify that the repositories were created successfully:

    # /usr/sbin/pca-admin show uln-repo
    ----------------------------------------
    Repository Type Mirror
    Mirror Location mirror_uri
    Management Patch Repo Created Yes
    Compute Patch Repo Created Yes
    ----------------------------------------
    
    Status: Success

    The preceding output shows that the repositories are successfully configured on the mirror server and mirrored on the appliance. The value of Created is No if no RPM packages have been delivered to that repository yet.

    If repositories are not configured, the show uln-repo command shows the message "No patch repositories setup. Run create uln-repo to create repositories."

    The ULN configuration file shows the following:

    # cat /nfs/shared_storage/conf/uln.conf
    [uln]
    repo_type = mirror
    uln_mirror = mirror_uri
    cn_repo = False
    mn_repo = False

    The values of cn_repo or mn_repo will be True once the repositories are set up.

    If the create uln-repo command completed successfully, any subsequent execution of the create uln-repo command will fail with a message that a repository is already set up and showing the URI of the repository.

  12. If the repository setup completed successfully, continue to Patching Management and Compute Nodes.

Configuring a Mirror Server for Oracle Linux 7

This procedure describes how to set up channels for Private Cloud Appliance Release 2.4.3.x and Private Cloud Appliance Release 2.4.4.x on a ULN mirror server that is running Oracle Linux 7.

  1. (Optional) Set the proxy.

    If your organization uses a proxy server as an intermediary for Internet access, specify the proxy setting in the /etc/yum.conf file as described in Configuring the Use of a Proxy Server in the Unbreakable Linux Network User's Guide for Oracle Linux 6 and Oracle Linux 7.

  2. Ensure the following:

  3. Configure the ULN mirror.

    See Creating and Using a Local ULN Mirror in the Unbreakable Linux Network User's Guide for Oracle Linux 6 and Oracle Linux 7.

    Note:

    You must be running version uln-yum-mirror-0.3.0-10.el7.noarch.rpm or later. Otherwise, running uln-yum-mirror might result in a misconfigured repository path.

  4. Subscribe the mirror server to the appropriate PCA ULN channels.

    For example, for Oracle Private Cloud Appliance release 2.4.4.4, subscribe to PCA 2.4.4.4 MN (pca2444_x86_64_mn) and PCA 2.4.4.4 CN (pca2444_x86_64_cn). For Oracle Private Cloud Appliance release 2.4.3.2, subscribe to pca2432_x86_64_mn and pca2432_x86_64_cn.

    A mirror server can be subscribed to additional channels.

    • Use only these PCA MN and CN channels to install Private Cloud Appliance patches. Updating the appliance using other channels and other methods is not supported.

    • Best practice is to isolate Private Cloud Appliance ULN channels from other ULN channels.

  5. Create a local yum ULN mirror on this server.

    Follow the instructions in Prerequisites for the Local ULN Mirror in the Unbreakable Linux Network User's Guide for Oracle Linux 6 and Oracle Linux 7 to set up the channel mirror on a data center server that the Private Cloud Appliance can access.

  6. Ensure that updates are enabled.

    See Oracle Linux 7 - "uln-yum-mirror" Fails to Build Local YUM Repository and Reports Error "Warning: cannot find repository" (Doc ID 2540192.1).

  7. Verify the repositories are configured on the mirror server.

    # yum repolist
  8. Connect to the repositories from the Private Cloud Appliance.

    Run the following command from the master management node:

    # /usr/sbin/pca-admin create uln-repo mirror mirror_uri

    The format of mirror_uri is http://your_datacenter_uri/yum, as shown in the following example:

    # /usr/sbin/pca-admin create uln-repo mirror http://198.51.100.10/yum
    Status: Success

    The ULN repository configuration file, /nfs/shared_storage/conf/uln.conf, is constructed for access to the ULN mirror, and the repositories are pulled over and set up on the active management node. This configuration file is populated with the mirror repository URI (mirror_uri), with repo_type set to Mirror, and with values for cn_repo and mn_repo to indicate which repositories have been set up on the system.

    The /nfs/shared_storage/conf/uln.repo file is created with the details required to pull the repositories from the mirror server for the ULN channels that are available.

    The repositories at mirror_uri are pulled over and set up on the Private Cloud Appliance in the following location:

    /nfs/shared_storage/yum/pca_patch_pca_version

    For example, repositories are configured at the following locations:

    /nfs/shared_storage/yum/pca_patch_2.4.4.2/cn
    /nfs/shared_storage/yum/pca_patch_2.4.4.2/mn

    The entry for the ULN compute node repository is added to the ovm.repo file in the /etc/yum.repos.d directory on the compute nodes and enabled.

    Repositories that are defined in /etc/yum/plugin.d/rhn.conf, as well as any that are enabled in other configuration files in /etc/yum.repos.d, are disabled.

  9. Verify that the repositories are configured on the Private Cloud Appliance.

    Use the following command to verify that the repositories were created successfully:

    # /usr/sbin/pca-admin show uln-repo
    ----------------------------------------
    Repository Type Mirror
    Mirror Location mirror_uri
    Management Patch Repo Created Yes
    Compute Patch Repo Created Yes
    ----------------------------------------
    
    Status: Success

    The preceding output shows that the repositories are successfully configured on the mirror server and mirrored on the appliance. The value of Created is No if no RPM packages have been delivered to that repository yet.

    If repositories are not configured, the show uln-repo command shows the message "No patch repositories setup. Run create uln-repo to create repositories."

    The ULN configuration file shows the following:

    # cat /nfs/shared_storage/conf/uln.conf
    [uln]
    repo_type = mirror
    uln_mirror = mirror_uri
    cn_repo = False
    mn_repo = False

    The values of cn_repo or mn_repo will be True once the repositories are set up.

    If the create uln-repo command completed successfully, any subsequent execution of the create uln-repo command will fail with a message that a repository is already set up and showing the URI of the repository.

  10. If the repository setup completed successfully, continue to Patching Management and Compute Nodes.