Installing the server software on Red Hat OpenShift
You can install HCL OneTest™ Server on the Red Hat OpenShift server that has the Kubernetes Engine environment to run functional, integration, and performance tests. HCL OneTest™ Server combines test data, test environments, and test runs and reports into a single web-based browser for testers and non-testers.
Before you begin
You must have performed the following tasks:
-
Completed tasks provided in the Prerequisites section. See Prerequisites for installing the server software on Red Hat OpenShift.
-
Ensured that you have installed the following software:
-
OpenShift CLI
-
Helm
-
-
Copied the Secret key from the Harbor repository.
About this task
As part of the installation process, you might optionally migrate user data from a previous version (V10.0.2, Fix Pack 1 or earlier) the product, or restore a backup of user data from the current version (V10.1.0 or later) of the product. You must perform different steps, depending on which version of the user data backup file you are applying during the installation process. For more details, see the following table:
Procedure
- Open and log in to the terminal.
-
Create a namespace to install the server software by running the following
command:
oc new-project test-system
-
Add the repository to Helm to access the server install charts by running the
following command:
Note: You must replace
{okta-email-address}
with the username of the Harbor repository and replace{harbor-cli-secret}
with the secret key that you have 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:
Notes:
-
You must replace
{okta-email-address}
with the username of the Harbor repository and replace{harbor-cli-secret}
with the secret key that you have copied from the Harbor repository. -
You can replace
example@abc.com
with the administrator email address, if required.
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.com
-
- Optional:
Perform the following steps to migrate user data from the previous version
(V10.0.2, Fix Pack 1 or earlier):
- Optional:
Perform the following actions described in the following table to enable the
additional features on 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 install
command:--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}-execution
Note: 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 install
command:--set execution.istio.namespaces='{namespaceA,namespaceB}' \
Alternatively, you can add the parameter to thehelm install
command by using an array index notation as follows:--set execution.istio.namespaces[0]=namespaceA \ --set execution.istio.namespaces[1]=namespaceB
Jaeger
To use Jaeger for performance and Web UI tests logs
Add the following parameter to thehelm install
command: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 install
command:--set global.hclOneTestPostmanEnabled=true
JMeter
To run JMeter test assets and their associated variables and environments that you created in the desktop clients
Add the following parameter to thehelm install
command:--set global.hclOneTestJmeterEnabled=true
-
-
Run the following commands to install the server software:
You must substitute the value of the following variables with the actual value in the command:
-
{my-ots}
with the release name of your choice.Note: If you migrated user data from a previous release (V10.0.2, Fix Pack 1), then you must use the same{my-ots}
name that you used in step 7a. -
{openshift-cluster-dns-name}
with the ingress DNS name that you selected for the server.Note: You can run the following command to obtain the default value ofopenshift-cluster-dns-name
:oc get --namespace=openshift-ingress-operator ingresscontroller/default -ojsonpath='{.status.domain}'
Remember: You must provide the value that consists of lowercase alphanumeric characters,-
(hyphen) or.
(period). Also, the value must start and end with an alphanumeric character. -
Optional:
{cloud-license-server-url}
and{cloud-license-server-id}
with the URL and ID of the license server.Alternatively, you can configure the OneTest License Server ID and OneTest Server URL values from the Configure License window when the installation of the server is complete.
-
{my-super-secret}
with a value of your choice.Important: This password seed is used to create several default passwords for the server. You must store the password seed securely. When you install the server software by using the backup of the user data, you can reuse the password seed. You can use this seed to restore backup files either on the current or later versions of the server software.
Note: The default storage class must support both the ReadWriteOnce (RWO) and ReadWriteMany (RWX) access modes. If the default storage class does not support ReadWriteMany (RWX), you must add the following parameter to the helm install command:--set global.persistence.rwxStorageClass=rook-ceph-file
#Make sure the repository is current and retrieve the charts required to install the server #You can skip the following two commands if you have migrated from the previous version (V10.0.2, Fix Pack 1 or earlier) 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 #Install the server helm install {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
Tip: After you installed the server software, anytime if you want to enable or disable any specific features on HCL OneTest™ Server you can do so by using the helm upgrade command.For example, if you want to enable Postman feature to run Postman test assets that you created in the Postman application, you can run the following commands:helm upgrade {my-ots} -n test-system ./hcl-onetest-server \ --reuse-values \ --set global.hclOneTestPostmanEnabled=true
-
- Optional:
Run the following command to restore the backed up user data from the current
version:
velero restore create --from-backup=<backup-file-name> --restore-volumes
Note: You must replace<backup-file-name>
with the name of the back up file that you saved. -
Run the following command to verify and test the installed server
software:
$ helm test {my-ots} -n {namespace}
where:{my-ots}
is the release name that you provide during the installation of the server software.{namespace}
is the name of the namespace that you created during the server installation process.
Results
On successful installation of HCL OneTest™ Server, the output displays the URL to access the HCL OneTest™ Server UI.
What to do next
-
You can back up the user data that are saved in the Kubernetes clusters to secure your data. See Backing up and restoring the user data on Red Hat OpenShift.
-
You can configure the license to use HCL OneTest™ Server. See Configuring named user licenses.