Chapter 6. Upgrading the Ansible plug-ins on an Operator installation on OpenShift Container Platform
To upgrade the Ansible plug-ins, you must update the plugin-registry application with the latest Ansible plug-ins files.
6.1. Downloading the Ansible plug-ins files Copy linkLink copied to clipboard!
-
Download the latest
.tarfile for the plug-ins from the Red Hat Ansible Automation Platform Product Software downloads page. The format of the filename isansible-backstage-rhaap-bundle-x.y.z.tar.gz. Substitute the Ansible plug-ins release version, for example1.0.0, forx.y.z. Create a directory on your local machine to store the
.tarfiles.mkdir /path/to/<ansible-backstage-plugins-local-dir-changeme>
$ mkdir /path/to/<ansible-backstage-plugins-local-dir-changeme>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set an environment variable (
$DYNAMIC_PLUGIN_ROOT_DIR) to represent the directory path.export DYNAMIC_PLUGIN_ROOT_DIR=/path/to/<ansible-backstage-plugins-local-dir-changeme>
$ export DYNAMIC_PLUGIN_ROOT_DIR=/path/to/<ansible-backstage-plugins-local-dir-changeme>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Extract the
ansible-backstage-rhaap-bundle-<version-number>.tar.gzcontents to$DYNAMIC_PLUGIN_ROOT_DIR.tar --exclude='*code*' -xzf ansible-backstage-rhaap-bundle-x.y.z.tar.gz -C $DYNAMIC_PLUGIN_ROOT_DIR
$ tar --exclude='*code*' -xzf ansible-backstage-rhaap-bundle-x.y.z.tar.gz -C $DYNAMIC_PLUGIN_ROOT_DIRCopy to Clipboard Copied! Toggle word wrap Toggle overflow Substitute the Ansible plug-ins release version, for example
1.0.0, forx.y.z.
Verification
Run ls to verify that the extracted files are in the $DYNAMIC_PLUGIN_ROOT_DIR directory:
The files with the .integrity file type contain the plugin SHA value. The SHA value is used during the plug-in configuration.
6.2. Updating the plug-in registry Copy linkLink copied to clipboard!
Rebuild your plug-in registry application in your OpenShift cluster with the latest Ansible plug-ins files.
Prerequisites
- You have downloaded the Ansible plug-ins files.
-
You have set an environment variable, for example (
$DYNAMIC_PLUGIN_ROOT_DIR), to represent the path to the local directory where you have stored the.tarfiles.
Procedure
- Log in to your OpenShift Container Platform instance with credentials to create a new application.
Open your Red Hat Developer Hub OpenShift project.
oc project <YOUR_DEVELOPER_HUB_PROJECT>
$ oc project <YOUR_DEVELOPER_HUB_PROJECT>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following commands to update your plug-in registry build in the OpenShift cluster. The commands assume that
$DYNAMIC_PLUGIN_ROOT_DIRrepresents the directory for your.tarfiles. Replace this in the command if you have chosen a different environment variable name.oc start-build plugin-registry --from-dir=$DYNAMIC_PLUGIN_ROOT_DIR --wait
$ oc start-build plugin-registry --from-dir=$DYNAMIC_PLUGIN_ROOT_DIR --waitCopy to Clipboard Copied! Toggle word wrap Toggle overflow oc start-build plugin-registry --from-dir=$DYNAMIC_PLUGIN_ROOT_DIR --wait
$ oc start-build plugin-registry --from-dir=$DYNAMIC_PLUGIN_ROOT_DIR --waitCopy to Clipboard Copied! Toggle word wrap Toggle overflow When the registry has started, the output displays the following message:
Uploading directory "/path/to/dynamic_plugin_root" as binary input for the build … Uploading finished build.build.openshift.io/plugin-registry-1 started
Uploading directory "/path/to/dynamic_plugin_root" as binary input for the build … Uploading finished build.build.openshift.io/plugin-registry-1 startedCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Verify that the plugin-registry has been updated.
- In the OpenShift UI, click Topology.
- Click the redhat-developer-hub icon to view the pods for the plug-in registry.
- Click View logs for the plug-in registry pod.
-
Open the Terminal tab and run
lsto view the.tarfiles in theplug-in registry. -
Verify that the new
.tarfile has been uploaded.
6.3. Updating the Ansible plug-ins version numbers for an Operator installation Copy linkLink copied to clipboard!
Procedure
- Log in to your OpenShift Container Platform instance.
-
In the OpenShift UI, open the ConfigMap where you added the Ansible plug-ins during installation. This example uses a ConfigMap file called
rhaap-dynamic-plugins-config. -
Update
x.y.zwith the version numbers for the updated Ansible plug-ins. Update the integrity values for each plug-in with the
.integrityvalue from the corresponding extracted Ansible plug-ins.tarfile.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Click .
The developer hub pods restart and the plug-ins are installed.
Verification
- In the OpenShift UI, click Topology.
- Make sure that the Red Hat Developer Hub instance is available.