The Oracle OCI OS Management Service allows users to control the update process of Oracle Cloud Infrastructure (OCI) compute instances. By default, the update of a compute instance installs the latest available packages and patches. Just installing what is available might impact critical installed applications. It might also be desirable to keep the number of configuration variants low by ensuring all or groups of instances have the exact same versions of packages and patches installed. This can be achieved with OS Management.
The public git repository is available here.
Managed Instances are compute instances under control of OS Management.
Managed Instance Groups group instances for updates.
Software Sources are loaded with lists of packages and patches, including their versions. Software Sources are associated with Managed Instances, not with Managed Instance Groups. This allows to group Managed Instances of different types into the same Managed Instance Group. An update command can be send to the group which then updates each Managed Instance from its associated Software Source.
Golden Instance A golden instance is compute instance which has been prepared to have the packages and patches installed which will later be installed on managed instances. In other words, tests are made on the golden instance to make sure the installed packages and patches do work with the applications run by managed instances. When a healthy state has been achieved on the golden instance, a software source is loaded with the list of the golden instances packages and patches.
Terraform, Python
update_software_source.py is created by Terraform from a template. The script takes a managed instance group and a golden instance as parameters, creates a software source, updates it with the list of packages and patches from the golden instance and associates the managed instances of the managed instance group with the software source.Four Managed Instance Groups are created to test two different versions of operating systems (Oracle Linux 8, Oracle Linux 9) and different types of updates (Ksplice and All):
| | KSplice Update | All Update |
| - | - | - |
| Oracle Linux 8 | OracleLinux8_ManagedInstanceGroup1 | OracleLinux8_ManagedInstanceGroup2|
| Oracle Linux 9 | OracleLinux9_ManagedInstanceGroup1 | OracleLinux9_ManagedInstanceGroup2|
In the current incarnation of this demo, instance names are a combination of a city and a number:
Tokyo for OracleLinux8_ManagedInstanceGroup1Toronto for OracleLinux8_ManagedInstanceGroup2NewYork for OracleLinux9_ManagedInstanceGroup1London for OracleLinux9_ManagedInstanceGroup2Software Sources are named by appending the suffix _SoftwareSource to the Managed Instance Group name:
OracleLinux8_ManagedInstanceGroup1_SoftwareSourceOracleLinux8_ManagedInstanceGroup2_SoftwareSourceOracleLinux9_ManagedInstanceGroup1_SoftwareSourceOracleLinux9_ManagedInstanceGroup2_SoftwareSourceindex.htmlindex2.htmlopen in a web browser to show screen snapshots from the created environment
OS Management.pdf - a handwritten script to describe what OS Management doesOSManagement.drawio - architecture diagrammcheckdns.bash - can be ignoredinstancestate.bash will be created by terraform apply shows the lifecycle state of managed and golden instances
python/update_software_source.py Python script to update (destroy and create) a software source from a golden instance. This file will be created by terraform applypython/update_instances.py Python script to update the instances of a managed instance grouppython/batch/update_software_sources.bash updates (destroys and creates) 4 software sources for the 4 managed intance groupspython/batch/update_instances.bash applies Ksplice and All updates to managed intance groups