Upgrading the server software by using the in-place upgrade method

When you want to install the latest version of the server software in the same location that contained the 10.1.3 or later, then you can upgrade HCL OneTest Server by using the helm upgrade command.

Before you begin

You must have completed the following tasks:

  • Informed users that HCL OneTest Server is offline temporarily during the upgrade process.

  • Installed Helm. For more information, refer to the Installing a Helm chart on an OpenShift Container Platform cluster section in the Red Hat OpenShift documentation.

  • Completed all test executions that are running on the existing version of HCL OneTest Server.

  • Stopped all stub executions that are running on the existing version of HCL OneTest Server.

  • Canceled any scheduled test runs that have a future date or time.

Optional. You can back up the user data from the previous version of the product. If the upgrade fails, then you can use that backup file to restore it on latest version of the server software. See Backing up the server data on Red Hat OpenShift.

Note: For more information about specific versions of software requirements, see System Requirements.

Procedure

  1. Log in to your OCP cluster as a cluster administrator by running the oc login command.
  2. Add the software registry to Helm to access the server install charts by running the following command:
    helm repo add hclsoftware https://hclcr.io/chartrepo/ot
  3. Run the following command to get the latest updates from the repository:
    helm repo update
  4. Run the following command to retrieve the charts:
    helm pull --untar hclsoftware/hcl-onetest-server --version 6.1021.1
  5. Perform the following steps to upgrade the server software:
    1. Run the following commands to update the runAsUser and fsGroup to match the Security Context Constraints (SCC):
      sed -i -e "s/runAsUser: 1001/runAsUser: $(oc get project test-system -oyaml \
        | sed -r -n 's# *openshift.io/sa.scc.uid-range: *([0-9]*)/.*#\1#p')/g;
                 s/fsGroup: 1001/fsGroup: $(oc get project test-system -oyaml \
        | sed -r -n 's# *openshift.io/sa.scc.supplemental-groups: *([0-9]*)/.*#\1#p')/g" hcl-onetest-server/values-openshift.yaml

      HCL OneTest Server is compatible with the restricted Security Context Constraint. You must run this command to ensure that the runAsUser and fsGroup strategies match with the SCC policy.

    2. Perform one of the steps described in the following table to upgrade the server software based on your requirement:
      Step description Step no

      To upgrade the server software

      Perform 5.b.i

      To upgrade the server software and enable the OpenShift Service Mesh service virtualization through Istio, a Tech Preview feature

      Perform 5.b.ii and 5.b.iv

      To upgrade the server software, enable the OpenShift Service Mesh service virtualization through Istio, a Tech Preview feature, and enable Jaeger for performance and Web UI tests logs

      Perform 5.b.iii and 5.b.iv

      To upgrade the server software and enable Jaeger for performance and Web UI tests logs

      Perform 5.b.v
      Remember:
      • The default certificate that terminates TLS connections has a single wildcard. Therefore, you must prefix a single hostname segment for the global.hclOneTestIngressDomain parameter.

        For example,--set global.hclOneTestIngressDomain=onetest.{openshift-cluster-dns-name}

      • You must use the --set global.hclCertSecretOptional=false parameter in any of the following helm upgrade commands only if you created an ingress Secret to store the CA during the previous installation of the server software.

      • You must provide the values of the variable that you used during the installation of the previous version of the server software.

      1. Run the following command to upgrade the server software:

        helm upgrade {my-ots} ./hcl-onetest-server -n test-system \
        -f hcl-onetest-server/values-openshift.yaml \
        --set global.persistence.rwxStorageClass=rook-ceph-file
        --set global.hclOneTestIngressDomain=onetest.{openshift-cluster-dns-name} \
        --set global.hclOneTestPasswordAutoGenSeed={password-seed}
      2. Run the following command to upgrade the server software and to enable the OpenShift Service Mesh service virtualization feature:

        helm upgrade {my-ots} ./hcl-onetest-server -n test-system \
        -f hcl-onetest-server/values-openshift.yaml \
        --set global.persistence.rwxStorageClass=rook-ceph-file
        --set global.hclOneTestIngressDomain=onetest.{openshift-cluster-dns-name} \
        --set global.hclOneTestPasswordAutoGenSeed={password-seed} \
        -f hcl-onetest-server/values-openshift-demo.yaml
      3. Run the following command to upgrade the server software, to enable the OpenShift Service Mesh service virtualization feature, and to enable Jaeger for performance and Web UI tests logs:

        helm upgrade {my-ots} ./hcl-onetest-server -n test-system \
        -f hcl-onetest-server/values-openshift.yaml \
        --set global.persistence.rwxStorageClass=rook-ceph-file
        --set global.hclOneTestIngressDomain=onetest.{openshift-cluster-dns-name} \
        --set global.hclOneTestPasswordAutoGenSeed={password-seed} \
        -f hcl-onetest-server/values-openshift-demo.yaml \
        --set-string execution.annotations.sidecar\\.jaegertracing\\.io/inject=true \
        --set global.jaegerAgent.internalHostName=localhost \
        --set global.jaegerDashboard.externalURL={my-jaeger-dashboard-url}
      4. Run the following command to enable service virtualization through Istio, a Tech Preview feature in the specific namespace:

        oc create rolebinding istio-virtualization-enabled -n bookinfo --clusterrole={my-ots}-execution-istio-test-system --serviceaccount=test-system:{my-ots}-execution

        Where, {my-ots} is the name of the release that you provided during the installation of the server software.

        Note: When you uninstall the chart, the manually created role bindings are not deleted from the namespace. You can run the following command to delete the role bindings:
        oc delete rolebinding istio-virtualization-enabled -n bookinfo
      5. Run the following command to upgrade the server software and to enable Jaeger for performance and Web UI tests logs:

        helm upgrade {my-ots} ./hcl-onetest-server -n test-system \
        -f hcl-onetest-server/values-openshift.yaml \
        --set global.persistence.rwxStorageClass=rook-ceph-file
        --set global.hclOneTestIngressDomain=onetest.{openshift-cluster-dns-name} \
        --set global.hclOneTestPasswordAutoGenSeed={password-seed} \
        --set-string execution.annotations.sidecar\\.jaegertracing\\.io/inject=true \
        --set global.jaegerAgent.internalHostName=localhost \
        --set global.jaegerDashboard.externalURL={my-jaeger-dashboard-url}
  6. Run the following command to verify and test the upgraded server software:
    $ helm test {my-ots} -n test-system

    where {my-ots} is the name of the release that was provided during the installation of the server software.

Results

On the successful upgrade of HCL OneTest Server, the output displays the following information:
  • Keycloak URL to manage and authenticate users.

  • A URL to access the HCL OneTest Server UI.

What to do next

You can perform the following tasks: