Migrate Oracle Linux Manager Client to Oracle OS Management Hub

Introduction

This tutorial demonstrates migrating an Oracle Linux machine from Oracle Linux Manager to OS Management Hub without “breaking” the operating system or a web application.

Objectives

In this lab, you’ll learn how to:

Prerequisites

Verify the Prerequisites

The image shows an example of an Oracle Linux 8 system properly registered with an Oracle Linux Manager 2.10 instance. To register a client system, use the following Oracle Linux Manager product documentation.

olm-console

Delete the Client System from the Oracle Linux Manager Console

  1. Connect to the Oracle Linux Manager console using a browser.

  2. Select Systems from the tabs at the top of the page.

  3. Then click on the system for deletion from the navigation menu.

  4. Click the Delete System link in the client systems summary panel.

    olm-delete-system

    A confirmation window appears.

  5. Click the red Delete Profile button to confirm system deletion from Oracle Linux Manager.

    olm-delete-system-confirm

  6. The System Overview page shows that we removed the client system’s profile, and the hostname no longer appears in the Systems list.

    olm-system-deleted

Disable Oracle Linux Manager on the Client System

  1. Connect to a terminal on the Oracle Linux client system.

  2. Disable Oracle Linux Manager.

    cd /etc/sysconfig/rhn
    sudo rm systemid
    
  3. Clean up unused Oracle Linux Manager packages.

    sudo dnf module disable rhn-tools satellite-5-client
    
    sudo dnf --allowerasing remove python3-rhnlib python3-spacewalk-usix rhn-client-tools rhn-check rhn-setup rhnsd dnf-plugin-spacewalk osad rhncfg rhncfg-actions rhncfg-client
    
  4. If there is an rhn-org-trusted-ssl-cert RPM file, identify and remove the RPM file (replace the XXX as necessary).

    sudo dnf list installed | grep rhn-org-trusted-ssl-cert
    
    sudo dnf remove rhn-org-trusted-ssl-cert-XXX.noarch.rpm
    
  5. If there is NOT an rhn-org-trusted-ssl-cert RPM file, remove the cert file.

    sudo rm /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT
    

Register the Client System with Oracle OS Management Hub

This section follows the section Registering a Non-OCI Instance in the OS Management Hub documentation.

Ensure the following prerequisite items are complete for the steps in this section to be successful:

  1. Install the OpenJDK package on the client system.

    sudo dnf install java-1.8.0-openjdk
    
  2. Install the Management Agent

    sudo dnf install /<directory_containing_the_rpm>/oracle.mgmt_agent.rpm
    
  3. Configure the Management Agent plugin to run as root.

    The OS Management Hub plugin must run as root to patch the instance.

    sudo tee /etc/sudoers.d/mgmt_agent <<EOF
    ## Allows Management Agent to change ownership of deployed External Plugin
    mgmt_agent ALL=(ALL) NOPASSWD:/opt/oracle/mgmt_agent/agent_inst/bin/chown_recursive_ep.sh
    ## Allows Management Agent to run External Plugin under root user
    mgmt_agent ALL=(root) NOPASSWD:SETENV: /opt/oracle/mgmt_agent/plugins/osmh/*/osmh
    EOF
    
  4. Set the permissions on the new mgmt_agent sudoers.d file.

    sudo chmod 440 /etc/sudoers.d/mgmt_agent
    
  5. Create a response file.

    cat >/tmp/input.rsp <<EOF
    ManagementAgentInstallKey = <MACS_KEY>
    Service.plugin.osmh.download = true
    GatewayServerHost = <MANAGEMENT_STATION_HOST_NAME>
    GatewayServerPort = <MANAGEMENT_STATION_PROXY_PORT>
    EOF
    
    • ManagementAgentInstallKey: Sets the required install key to validate the domain’s identity and the installation’s authenticity.
    • GatewayServerHost: Hostname or IP address of the management station.
    • GatewayServerPort: Proxy port number of the management station.
  6. Configure the Management Agent.

    sudo /opt/oracle/mgmt_agent/agent_inst/bin/setup.sh opts=/tmp/input.rsp
    

    In the output, look for a success message and wait for the script to complete.

  7. Check for the client system in the console.

    Navigate to Observability & Management > OS Management Hub > Instances using the Cloud Console within a browser.

    Look for the Oracle Linux client system to appear in the list of instances.

    osmh-instances-list

  8. Click the instance name to see the details.

    osmh-instance-details

For More Information

See other related resources:

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.