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 V10.1.0 or V10.1.1, then you can upgrade HCL OneTest™ Server by using the helm upgrade command.
Before you begin
You must have completed the following tasks:
-
Installed Helm V3.5.2. For more information, refer to the Installing a Helm chart on an OpenShift Container Platform cluster section in the Red Hat OpenShift documentation.
-
Informed users that HCL OneTest™ Server is offline temporarily during the upgrade process.
-
Completed all test executions that are running on the existing HCL OneTest™ Server V10.1.0 or later.
-
Stopped all stub executions that are running on the existing HCL OneTest™ Server V10.1.0 or later.
-
Canceled any scheduled test runs that have a future date or time.
-
Copied the Secret key from the Harbor repository.
Optional. You can back up the user data of V10.1.0 or V10.1.1 of the product. If the upgrade fails, then you can use that backup file to restore it on V10.1.2. See Backing up and restoring the user data on Red Hat OpenShift.
Procedure
- Open and log in to the terminal.
-
Add the repository to Helm to access the server upgrade charts by entering the
following command:
Note: You must replace
{okta-email-address}with the user name of the Harbor repository and replace{harbor-cli-secret}with the secret key that you copied from the Harbor repository.helm repo add hclsoftware https://hclcr.io/chartrepo/ot --username {okta-email-address} --password {harbor-cli-secret} -
Run the following command to get the latest updates from the repository:
helm repo update -
Create a Secret to pull images that are used by HCL OneTest™ Server by running the following commands:
oc create secret docker-registry hclcr.io \ -n test-system \ --docker-server=hclcr.io \ --docker-username={okta-email-address} \ --docker-password={harbor-cli-secret} \ --docker-email=example@abc.comNotes:-
You must replace
{okta-email-address}with the user name of the Harbor repository and replace{harbor-cli-secret}with the secret key that you copied from the Harbor repository.If the user name contains any special characters, such as $, you must enclose it within single quotes.
-
You can replace
example@abc.comwith the administrator email address, if required.
-
-
Perform the following actions described in the following table to enable the
additional features when upgrading HCL OneTest™ Server:
Features Descriptions Action to be perform Service virtualization
To enable the running of stubs that virtualize services in the RedHat OpenShift Service Mesh
Perform the following steps: -
Add the following parameter to the
helm upgradecommand:--set execution.istio.enabled=true -
Run the following command to create the role bindings required for Istio:
oc create rolebinding istio-virtualization-enabled -n {namespace} \ --clusterrole={my-ots}-execution-istio-test-system --serviceaccount=test-system:{my-ots}-executionNote: When you uninstall the chart, the manually created role bindings are not deleted from the namespace.
To enable the running of stubs that virtualize services in namespaces
Add the following parameter to thehelm upgradecommand:--set execution.istio.namespaces='{namespaceA,namespaceB}' \Alternatively, you can add the parameter to thehelm upgradecommand by using an array index notation as follows:--set execution.istio.namespaces[0]=namespaceA \ --set execution.istio.namespaces[1]=namespaceBJaeger
To use Jaeger for performance and Web UI tests logs
Add the following parameter to thehelm upgradecommand:Note: You must substitute{my-jaeger-dashboard-url}with the URL of the Jaeger server.--set-string execution.annotations.sidecar\\.jaegertracing\\.io/inject=true --set global.jaegerAgent.enabled=true --set global.jaegerAgent.internalHostName=localhost --set global.jaegerDashboard.enabled=true --set global.jaegerDashboard.externalURL={my-jaeger-dashboard-url}Postman
To run Postman test assets that you created in the Postman application
Add the following parameter to thehelm upgradecommand:--set global.hclOneTestPostmanEnabled=trueJMeter
To run JMeter test assets and their associated variables and environments that you created in the desktop clients
Add the following parameter to thehelm upgradecommand:--set global.hclOneTestJmeterEnabled=true -
-
Run the following commands to upgrade the server software on your
computer:
Remember: You must use the same values for the variables that you specified during the installation process. Otherwise, the upgrade fails with an error message.
For example, if you specified
{my-ots}value as abc during the installation of V10.1.0 or V10.1.1, then you must use the same value in the upgrade command.#Make sure the repository is current and retrieve the charts required to upgrade the server helm repo update helm pull --untar hclsoftware/hcl-onetest-server --version 3.1012.0 #Update the runAsUser and fsGroup to match scc policy 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 #Upgrade the server helm upgrade {my-ots} ./hcl-onetest-server -n test-system \ -f hcl-onetest-server/values-openshift.yaml \ --set global.hclOneTestIngressDomain=onetest.{openshift-cluster-dns-name} \ --set global.hclFlexnetURL={cloud-license-server-url} \ --set global.hclFlexnetID={cloud-license-server-id} \ --set global.hclOneTestPasswordAutoGenSeed={my-super-secret} \ --set global.hclImagePullSecret=hclcr.io -
Run the following command to verify and test the upgraded server
software:
$ helm test {my-ots} -n test-systemwhere
{my-ots}is the release name that you provided during the installation of the server software.
Results
-
Keycloak URL to manage and authenticate users.
-
A URL to access the HCL OneTest™ Server UI.
What to do next
After you migrate the server data from a previous version to a newer version, the Project Owner must log in to HCL OneTest™ Server so that other members of the project can access the test assets in that project.