Chapter 4. Upgrading the Ansible plug-ins on a Helm installation on OpenShift Container Platform
Upgrade the Ansible plug-ins to the latest version. The upgrade procedure depends on the plug-in delivery method you used during installation.
4.1. Upgrade with OCI container delivery Copy linkLink copied to clipboard!
To upgrade the Ansible plug-ins when using OCI delivery, update the version tag in the package URL for each plug-in entry.
Procedure
- Log in to your OpenShift Container Platform instance.
-
In the OpenShift Developer UI, navigate to Helm
developer-hub Actions Upgrade Yaml view. In the
global.dynamic.pluginslist, update the version tag at the end of eachpackageURL:plugins: - disabled: false package: 'oci://registry.redhat.io/ansible-automation-platform/automation-portal:2.1!ansible-plugin-backstage-rhaap' pluginConfig: ... - disabled: false package: 'oci://registry.redhat.io/ansible-automation-platform/automation-portal:2.1!ansible-plugin-scaffolder-backend-module-backstage-rhaap' pluginConfig: ...Click Upgrade.
The Red Hat Developer Hub pods restart and pull the new plug-in version.
Verification
- In the OpenShift UI, click Topology.
- Verify that the Red Hat Developer Hub instance is available.
4.2. Downloading the Ansible plug-ins files Copy linkLink copied to clipboard!
Download the Ansible plug-ins for Red Hat Developer Hub Setup Bundle from the Red Hat Ansible Automation Platform Product Software downloads page.
Procedure
- In a browser, navigate to the Red Hat Ansible Automation Platform Product Software downloads page and select the Product Software tab.
Click Download now next to Ansible plug-ins for Red Hat Developer Hub Setup Bundle to download the latest version of the plug-ins.
The format of the filename is
ansible-rhdh-plugins-x.y.z.tar.gz. Substitute the Ansible plug-ins release version, for example2.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>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>Extract the
ansible-rhdh-plugins-<version-number>.tar.gzcontents to$DYNAMIC_PLUGIN_ROOT_DIR.$ tar --exclude='*code*' -xzf ansible-rhdh-plugins-x.y.z.tar.gz -C $DYNAMIC_PLUGIN_ROOT_DIRSubstitute the Ansible plug-ins release version, for example
2.0.0, forx.y.z.
Verification
Run ls to verify that the extracted files are in the $DYNAMIC_PLUGIN_ROOT_DIR directory:
$ ls $DYNAMIC_PLUGIN_ROOT_DIR
ansible-plugin-backstage-rhaap-dynamic-x.y.z.tgz
ansible-plugin-backstage-rhaap-dynamic-x.y.z.tgz.integrity
ansible-plugin-scaffolder-backend-module-backstage-rhaap-dynamic-x.y.z.tgz
ansible-plugin-scaffolder-backend-module-backstage-rhaap-dynamic-x.y.z.tgz.integrity
The files with the .integrity file type contain the plugin SHA value. You use the SHA value during the plug-in configuration.
4.3. Update 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>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 --waitWhen 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
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.
4.4. Updating the Ansible plug-ins version numbers for a Helm installation Copy linkLink copied to clipboard!
To upgrade the Ansible plug-ins, you must update the imageTagInfo parameter in the Helm chart configuration to the desired version. This triggers the Red Hat Developer Hub to pull the new container images directly from the Red Hat registry.
Procedure
- Log in to your OpenShift Container Platform instance.
-
In the OpenShift Developer UI, navigate to
. Locate the
globalsection.... global: # Ensure OCI mode is enabled pluginMode: oci # UPDATE this value to the new desired version imageTagInfo: "2.1" # Note: Do not manually update 'plugins' packages; # OCI mode handles the download automatically based on the tag above. dynamic: plugins: []Click .
The Red Hat Developer Hub pods restart and pull the new plug-in versions.
Verification
- In the OpenShift UI, click Topology.
- Make sure that the Red Hat Developer Hub instance is available.