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:
- Unregister an Oracle Linux client system from Oracle Linux Manager
- Disable Oracle Linux Manager on the Oracle Linux client system
- Register the client system with Oracle OS Management Hub
- Verify registration with OS Management Hub using the Cloud Console
Prerequisites
- An Oracle Linux 7, 8, or 9 system currently registered with Oracle Linux Manager
- Access to a tenancy with Oracle OS Management Hub
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.
Delete the Client System from the Oracle Linux Manager Console
-
Connect to the Oracle Linux Manager console using a browser.
-
Select
Systems
from the tabs at the top of the page. -
Then click on the system for deletion from the navigation menu.
-
Click the
Delete System
link in the client systems summary panel.A confirmation window appears.
-
Click the red
Delete Profile
button to confirm system deletion from Oracle Linux Manager. -
The System Overview page shows that we removed the client system’s profile, and the hostname no longer appears in the Systems list.
Disable Oracle Linux Manager on the Client System
-
Connect to a terminal on the Oracle Linux client system.
-
Disable Oracle Linux Manager.
cd /etc/sysconfig/rhn sudo rm systemid
-
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
-
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
-
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:
- the OS Management Hub instance is already set up and patching other systems
- the Profiles and the Cloud Management Agent Cloud Service (MACS) install key are created
- the file
/etc/osmh-profile
copied to the Oracle Linux system as indicated in step 1 of the documentation - the Management Agent software RPM is copied to the client system
-
Install the OpenJDK package on the client system.
sudo dnf install java-1.8.0-openjdk
-
Install the Management Agent
sudo dnf install /<directory_containing_the_rpm>/oracle.mgmt_agent.rpm
-
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
-
Set the permissions on the new
mgmt_agent
sudoers.d file.sudo chmod 440 /etc/sudoers.d/mgmt_agent
-
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.
-
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. -
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.
-
Click the instance name to see the details.
For More Information
See other related resources:
- Oracle OS Management Hub Documentation
- Oracle OS Management Hub Training
- Oracle Linux Training Station
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.
Migrate Oracle Linux Manager Client to Oracle OS Management Hub
F94482-03
May 2024