Chapter 5. Upgrading the Ansible plug-ins on a Helm 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.

5.1. Downloading the Ansible plug-ins files

  1. Download the latest .tar file for the plug-ins from the Red Hat Ansible Automation Platform Product Software downloads page. The format of the filename is ansible-backstage-rhaap-bundle-x.y.z.tar.gz. Substitute the Ansible plug-ins release version, for example 1.0.0, for x.y.z.
  2. Create a directory on your local machine to store the .tar files.

    $ mkdir /path/to/<ansible-backstage-plugins-local-dir-changeme>
  3. 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>
  4. Extract the ansible-backstage-rhaap-bundle-<version-number>.tar.gz contents to $DYNAMIC_PLUGIN_ROOT_DIR.

    $ tar --exclude='*code*' -xzf ansible-backstage-rhaap-bundle-x.y.z.tar.gz -C $DYNAMIC_PLUGIN_ROOT_DIR

    Substitute the Ansible plug-ins release version, for example 1.0.0, for x.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-x.y.z.tgz
ansible-plugin-backstage-rhaap-x.y.z.tgz.integrity
ansible-plugin-backstage-rhaap-backend-x.y.z.tgz
ansible-plugin-backstage-rhaap-backend-x.y.z.tgz.integrity
ansible-plugin-scaffolder-backend-module-backstage-rhaap-x.y.z.tgz
ansible-plugin-scaffolder-backend-module-backstage-rhaap-x.y.z.tgz.integrity

The files with the .integrity file type contain the plugin SHA value. The SHA value is used during the plug-in configuration.

5.2. Updating the plug-in registry

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 .tar files.

Procedure

  1. Log in to your OpenShift Container Platform instance with credentials to create a new application.
  2. Open your Red Hat Developer Hub OpenShift project.

    $ oc project <YOUR_DEVELOPER_HUB_PROJECT>
  3. Run the following commands to update your plug-in registry build in the OpenShift cluster. The commands assume that $DYNAMIC_PLUGIN_ROOT_DIR represents the directory for your .tar files. 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
  4. 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

Verification

Verify that the plugin-registry has been updated.

  1. In the OpenShift UI, click Topology.
  2. Click the redhat-developer-hub icon to view the pods for the plug-in registry.
  3. Click View logs for the plug-in registry pod.
  4. Open the Terminal tab and run ls to view the .tar files in the plug-in registry.
  5. Verify that the new .tar file has been uploaded.

5.3. Updating the Ansible plug-ins version numbers for a Helm installation

Procedure

  1. Log in to your OpenShift Container Platform instance.
  2. In the OpenShift Developer UI, navigate to Helm developer-hub Actions Upgrade Yaml view.
  3. Update the Ansible plug-ins version numbers and associated .integrity file values.

    ...
    global:
    ...
        plugins:
          - disabled: false
            integrity: <SHA512 value>
            package: 'http://plugin-registry:8080/ansible-plugin-backstage-rhaap-x.y.z.tgz'
            pluginConfig:
              dynamicPlugins:
                frontend:
                  ansible.plugin-backstage-rhaap:
                    appIcons:
                      - importName: AnsibleLogo
                        name: AnsibleLogo
                    dynamicRoutes:
                      - importName: AnsiblePage
                        menuItem:
                          icon: AnsibleLogo
                          text: Ansible
                        path: /ansible
          - disabled: false
            integrity: <SHA512 value>
            package: >-
              http://plugin-registry:8080/ansible-plugin-scaffolder-backend-module-backstage-rhaap-x.y.z.tgz
            pluginConfig:
              dynamicPlugins:
                backend:
                  ansible.plugin-scaffolder-backend-module-backstage-rhaap: null
          - disabled: false
            integrity: <SHA512 value>
            package: >-
              http://plugin-registry:8080/ansible-plugin-backstage-rhaap-backend-x.y.z.tgz
            pluginConfig:
              dynamicPlugins:
                backend:
                  ansible.plugin-backstage-rhaap-backend: null
  4. Click Upgrade.

    The developer hub pods restart and the plug-ins are installed.

Verification

  1. In the OpenShift UI, click Topology.
  2. Make sure that the Red Hat Developer Hub instance is available.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.