This is a collection of demo helper scripts for using OCI OS Management. These scripts will enable a simple process of moving defined patch/update packages through several stages for testing up to production environment.
The typical process would start with installling updates and packages on a templace instance. Then a list of installed packages are exported and used to create a custom software source. This custom child software source can be attached to a managed instance group, so updates and packages can be installed.
Basic initialization for OSMS stages. This will
- Create empty parent software,
- Create empty managed instance groups for stages, and
- Write a config file to use in other scripts
Attaches child software source to all instances in a managed instance group.
If FLAG_DETACH_CURRENT_SOURCES enabled: Detach all currently attached sources before attaching new sources. (Default true)
Create a new child software source from a template instance. This will take all installed packages on the template instance and create a json document from it. This json document can be used to create a new source.
Use version control on the document to keep track of history.
Attach child software source to all instances in a managed instance group.
If FLAG_DETACH_CURRENT_SOURCES enabled: Detach all currently attached sources before attaching new sources. (Default true)
Check deviations of packages installed on instances in a group from target configuration/source. Steps include identifying:
- Packages included in source but no installed on instance, and
- Packages installed in instance but not included in source
The packages installed on each instance and packages included in the target software source are written as json documents to directory current.
Synchronize packages in a managed instance group using scheduled jobs:
- Install all available updates available for the group, i.e. from all sources attached to the instances
- Install packages available in source passed as argument
Caution: Unlike the script for individual instances, this one will not remove any packages.
Synchronize packages for a managed instance group, including the steps:
- Installing all available updates available for the group, i.e. from all sources attached to the instances,
- Installing packages available in source passed as argument, and
- If FLAG_REMOVE_PACKAGES enabled: Remove packages from instances that are not presend in source passed as argument. (Default false)
This script can take some time as fetching installed packages and installing packages is a very slow process.