Add Third-Party Software Sources to Oracle OS Management Hub
Introduction
Learn to add a third-party software source (Yum repository) from an independent software vendor (ISV), independent hardware vendor (IHV), or your private Yum repository to OS Management Hub.
Objectives
In this tutorial, you'll learn how to:
- Create a registration profile
- Register an existing OCI compute instances with OS Management Hub
- Add a third-party software source
- Attach a third-party software source to an instance
- Add package from the third-party software source
- Monitor third-party package install job
- Review the package manifest for third-party package
- Run update job on third-party package
Prerequisites
Access to an Oracle Cloud Infrastructure tenancy with:
- An administrative user group, a dynamic group identifying instance resources, and the IAM policies that enable OS Management Hub.
- Oracle Linux compute instances.
- Virtual Cloud Network (VCN) or configured network access that supports OS Management Hub.
Configure OCI Resources
Note: If running in your tenancy, read the linux-virt-labs
GitHub project README.md and complete the prerequisites before deploying the lab environment.
Open a terminal on the Luna Desktop.
Clone the
linux-virt-labs
GitHub project.git clone https://github.com/oracle-devrel/linux-virt-labs.git
Change into the working directory.
cd linux-virt-labs/ol
Install the required collections.
ansible-galaxy collection install -r requirements.yml
Update the Oracle Linux instance configurations.
cat << EOF | tee instances.yml > /dev/null compute_instances: 1: instance_name: "ol-host-02" type: "server" instance_shape: "VM.Standard.E5.Flex" EOF
Deploy the lab environment.
ansible-playbook create_instance.yml -e localhost_python_interpreter="/usr/bin/python3.6" -e "@instances.yml"
The free lab environment requires the extra variable
localhost_python_interpreter
, which setsansible_python_interpreter
for plays running on localhost. This variable is needed because the environment installs the RPM package for the Oracle Cloud Infrastructure SDK for Python, located under the python3.6 modules.The default deployment shape uses the AMD CPU and Oracle Linux 8.
Wait for the playbook to reach the pause task. Do not hit enter or close the terminal. The playbook creates OCI compute instances and resources to use with OS Management Hub. Progress to the next step when the pause task is displayed.
Important: Do not hit enter or close the terminal window for the duration of the lab. Minimize the window and continue with the next steps.
Access the OS Management Hub Section on the OCI Console
Open the OCI console in a browser.
Use your account username and password to login to the OCI console.
Use the navigation menu of the OCI console landing page to navigate to Observability and Management and click on OS Management Hub.
Create a Registration Profile
You must specify a registration profile to register an OCI instance with OS Management Hub. Profiles provide a way to consistently define how an instance registers with the service. An instance registers with one and only one profile. However, you can use a single profile repeatedly to register multiple instances with the service.
Click on Profiles under the OS Management Hub navigation section.
Click Create.
Enter the identifying information for the profile as the following:
- Name:
Oracle_Linux8
- Description: (Optional) Enter a description for the profile.
- Name:
Set the instance location for the profile as Oracle Cloud Infrastructure.
Specify the OS and architecture information as the following:
- OS vendor: Oracle
- OS version: Oracle Linux 8
- Architecture: x86_64
Note: These software source selections must match the compute instances that you intend to register.
Select Software source for type.
Keep the default compartment selected since it contains vendor software sources.
Select the software sources that the registration profile will assign. Select the following:
- ol8_baseos_latest-x86_64
- ol8_appstream-x86_64
- ol8_addons-x86_64
- ol8_uekr6-x86_64
Click Create.
Register Compute Instances with OS Management Hub
To register OCI compute instances with OS Management Hub; you must enable the Oracle Cloud Agent (OCA) plugin and select a registration profile.
Navigate to the Compute service and select Instances using the main OCI navigation menu.
Register Existing Compute Instances
To register existing compute instances not previously managed by OS Management Service; you must enable the OS Management Hub plugin, and a registration profile must be set on the instance's details page.
Click Instances under the Compute section and click on the ol-host-02 instance.
Click on the Oracle Cloud Agent tab on the compute instance's details page.
Enable the OS Management Hub Agent plugin and set the registration profile to Oracle_Linux8.
In some situations, the OS Management Hub Agent shows as stopped after being enabled. Ignore this and proceed to the next step.
Return to the OS Management Hub service and select the Instances page. Wait for the instance to register with the service.
Note: This step may take several minutes. Refresh the page and wait for the instance to display on the Instance table.
Add Third-Party Software Sources
Third-party software sources are Yum repositories from an independent software vendor or independent hardware vendor. In OS Management Hub, Yum repositories are referred to as software sources.
Click Software Source under the OS Management Hub navigation section.
Select Add third-party software source from the action menu.
Enter the identifying information for the software source as the following:
- Name:
Influxdata
- Description: (Optional) Enter a description for the profile.
- Name:
Enter the repository URL:
https://repos.influxdata.com/stable/x86_64/main
Select
Oracle Linux 8
for the OS version andx86_64
for the architecture.This selection matches the ol_host_02 compute instances. If the repository supports multiple OS versions or architectures, you can add multiple entries.
Disable Mirror to management stations.
When enabled, the source can be mirrored on a management station for use with on-premises or third-party cloud instances. When disabled, on-premises or third-party cloud instances access the source directly from the repository URL instead of the management station.
Enable GPG checking and enter the GPG key URI:
https://repos.influxdata.com/influxdata-archive_compat.key
When enabled, the GPG key is used to validate the content in the software source. GPG stands for GNU Privacy Guard, which is an open source standard for encryption. For Yum repositories, GPG keys are used to verify software when packages are installed.
A URI is a Uniform Resource Identifier. In the case of a GPG key, the URI is the file location or externally hosted URL of the key.
Disable Allow self-signed certificates.
When enabled, the source accepts self-signed certificates for authentication.
Click Next.
Click Next to skip the Advanced options.
If applicable, advanced Yum directives are added at this step. See the Create third-party software sources documentation for more details.
Review the details and click Submit.
The third-party software source is now listed as Influxdata-ol8-x86_64 on the software source table. OS management hub applies the Name-os version-architecture naming convention to third-party and private software sources. This software source can now be attached to registration profiles, instances, or groups.
Attach Third-Party Software Sources and Add Associated Packages to an Instance
You must attach the third-party software source to an instance or group before you can install packages from the software source.
Attach Software Sources to an Instance
Click Instances under the OS Management Hub navigation section.
Click on ol-host-02 to view its details page.
Select Software sources under resources.
Click Attach on the Software sources table.
Enter the following job details:
- Name: Keep the default name for the job.
- Description: (Optional) Enter a description.
Keep the default compartment and select Influxdata-ol8-x86_64 from the software source selection.
Schedule the job to Run immediately.
Click Attach.
Click on Jobs under Resources on the Instance's details page.
The Attach software source to ol-host-02 Job is listed on the In-progress jobs tab. Wait until that job is successful and listed on the Completed jobs tab.
Once the third-party software source is attached, the next step is to install the associated packages.
Add Packages from Third-Party Software Sources
Packages available from third-party or private software sources don't appear in the available packages list for an instance. These packages must be added by name using a package list. However, once installed, those packages display on the installed packages list and available updates list for an instance.
Select Packages under Resources and then select the Available packages tab.
Select Add packages by name.
This option must be used for packages provided by third-party or private software sources.
Enter the following job details:
- Name: Keep the default name for the job.
- Description: (Optional) Enter a description.
Enter the following into the Package list field:
influxdb2-2.7.10-1.x86_64
When providing a package list within the Console, you must use a valid package list format . Valid formats are:
- Package name
- Name, version, release, architecture
- Name, epoch, version, release, architecture
Schedule the job to Run immediately.
Click Install.
The install job can take several minutes. Take note of the Installed packages count on the Packages resource. Once the install job is complete, the count will increase by one. The install job can be monitored on the Jobs resource.
Click on the Installed packages tab of the Packages resource.
Enter the following into the search bar on the Installed packages table and hit enter:
influxdb2
The third-party package is listed and includes version, architecture, and the install job's time stamp.
Run Update Job on Third-Party Packages
Patches from third-party and private software sources are included in update jobs. Running update jobs against instances or groups include any available updates for packages associated with third party software sources.
Click Updates under Resources on the Instance's details page.
Enter the following into the search bar on the Updates table and hit enter:
influxdb2
The latest available version of the package from the third-party software source is listed.
Select the influxdb2 package.
Click Update.
Enter the identifying information for the update job:
- Name: Keep the default Job name.
- Description: (Optional) Enter a description for the profile.
Schedule the job to Run immediately.
Click Update.
View the Update Job
View the update job status by clicking on the Jobs resource and selecting the In Progress jobs tab.
When the update is complete, the job will move to the Completed jobs tab.
Return to the Packages resource on the Instance's details page to review for the updated package version.
Next Steps
By completing this tutorial, you have learned to add third-party software sources, install third-party packages, and run updates on third-party packages in OS Management Hub.