Patching Guardium Insights to version 3.3.x

Apply a patch to upgrade to the next minor version in Guardium® Insights version 3.3.x.

About this task

In the following instructions, <current_version> refers to the version of Guardium Insights that is installed on your system, and <new_version> refers to the version of Guardium Insights that you are upgrading to.

Procedure

  1. Download the catalog and operator from the CASE files to your local directory.
    export ICS_USER=<ICS Admin User>
    export ICS_PASS=<ICS PASS>
    export NAMESPACE=<Namespace where GI is installed>
    export CP_REPO_USER=cp
    export CP_REPO_PASS=<cp key for ER>
    export CASE_NAME=ibm-guardium-insights
    export CASE_VERSION=<CASE_VERSION>
    export LOCAL_CASE_DIR=$HOME/.ibm-pak/data/cases/$CASE_NAME/$CASE_VERSION
    
    oc ibm-pak get $CASE_NAME \
    --version $CASE_VERSION \
    --skip-verify
    
    Specify the CASE_VERSION for the version of Guardium Insights you are deploying.
  2. Verify that you are logged in to the IBM Cloud® Private command-line interface (CLI). Logging in to this CLI also authenticates your account to use the OpenShift® CLI. To log in, run the following command:
    cloudctl login -a <ICP_hostname> -u <openshift_username> -p <openshift_password> --skip-ssl-validation staging
    • <ICP_hostname> is your Cloud Private server, for example https://cp-console.apps.myserver.com
    • <openshift_username> is your OpenShift username.
    • <openshift_password> is your OpenShift password.
  3. Verify that Guardium Insights is reconciled to the previous version by running the following command.
    oc get guardiuminsights

    The following output example displays that the reconciliation is complete.

    NAME      TYPE    STATUS   REASON     MESSAGE                    DESIRED_VERSION    INSTALLED_VERSION
    staging   Ready   True     Complete   Completed Reconciliation   <current_version>  <current_version>
  4. Determine the version of IBM Cloud Pak® foundational services that is installed on your system by running the following command.
    oc get csv -n ibm-common-services | grep foundational

    Note the <version_number> in the output.

    ibm-common-service-operator.<version_number> IBM Cloud Pak foundational services <version_number> ibm-common-service-operator.<version_number> Succeeded
  5. Install the catalog by running the following command.
    oc ibm-pak launch $CASE_NAME \
      --version $CASE_VERSION \
    --namespace openshift-marketplace \
    --inventory install \
    --action install-catalog \
    --args "--inputDir ${LOCAL_CASE_DIR}" --tolerance 1
  6. Install the operator by running the following command.
    oc ibm-pak launch $CASE_NAME \
      --version $CASE_VERSION \
      --namespace ${NAMESPACE} \
      --inventory install \
      --action install-operator \
      --tolerance 1 \
      --args "--registry cp.icr.io --user ${CP_REPO_USER} --pass ${CP_REPO_PASS} --secret ibm-entitlement-key --inputDir ${LOCAL_CASE_DIR}"
  7. Update the custom resource (CR) file to the new version by completing the following steps.
    1. To edit the guardiuminsights CR file, run the following command.
      oc edit guardiuminsights
    2. Locate the Version value.
      Version: <current_version>
    3. Change the Version value to the new version.
      Version: <new_version>
    4. If you are upgrading from Guardium Insights version 3.2.x to version 3.3.0, locate the spec.guardiumInsightsGlobal.storageClassNameRWO field and check whether it is populated or that it exists. If it exists, you can skip this step. If it does not, add the line from the following example where <storageClassRWO> is the name of the ReadWriteOnce (RWO) type for your cluster's storage class.
      Draft comment: Rose.Kaur@ibm.com
      If this is for minor releases, should this step be here?
      spec.dependency-s3.storageClassName="<storageClassRWO>"
    5. Save and exit the file.
      When you exit the file, the following message is displayed.
      guardiuminsights.gi.ds.isc.ibm.com/staging edited
  8. To verify that your environment was upgraded, complete the following steps.
    1. Log in to check the version of Guardium Insights.
    2. Verify the system reconciliation status by running the following command.
      oc get guardiuminsights

      When the upgrade is complete, the output is similar to the following example.

      
      NAME      TYPE    STATUS   REASON     MESSAGE                    DESIRED_VERSION   INSTALLED_VERSION
      staging   Ready   True     Complete   Completed Reconciliation   <new_version>     <new_version>
    3. Verify that the pods are in a Running or Completed state by running the following command.
      Draft comment: Rose.Kaur@ibm.com
      Should the pods be in a Running state or Completed state? Can we also get a output example for this?
      oc get pods
  9. To remove an unused mount point from the Guardium Insights user interface services that might cause stability problems, use only one of the following methods.
    1. To edit the deployment file, run the following command.
      oc edit deployment <gi_installation_name>-insights

      Locate and delete the following fields in the file, and then save the changes.

      - mountPath: /node_app/src/static/insights_exports
        name: db2-scratch-mount
        subPath: scratch/insights-exports
    2. To remap the extra mount to an unused location, run the following command.
      oc get deployment -oyaml <gi install name>-insights | sed 's#/node_app/src/static/insights_exports#/tmp/ignore#g' | oc replace -f -