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
-
Completed the tasks provided in the Prerequisites section. See Prerequisites for installing the server software on Red Hat OpenShift.
-
Created a support ticket to get the credentials that are required to access the product binaries from the Harbor repository. For more information, refer to How to create an HCL Support case.
-
Optional: Located any user data that was stored in a backup snapshot file from V10.0.2, Fix Pack 1 or earlier. See Backing up the user data from a previous release.
-
Optional: Located any user data that was stored in a backup snapshot file from V10.1.0. See Backing up and restoring the user data on Red Hat OpenShift.
About this task
As part of the installation process, you might optionally migrate user data from a previous version of the product, or restore a backup of user data from the current version of the product. You must perform different steps, depending on which version of the user data backup file you are applying during the install. For more details, see the following table:
Procedure
- Open and log in to the terminal.
-
Create a namespace to install the server software by entering the following
command:
oc new-project test-system
-
Add the repository to Helm to access the server install charts by entering the
following command:
Note:
You must replace
{okta-email-address}
with the username of the Harbor repository and{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 entering the following commands:
Notes:
-
You must replace
{okta-email-address}
with the username of the Harbor repository and{harbor-cli-secret}
with the secret key that you have copied from the Harbor repository. -
You can replace
not-required@test
with the administrator's 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=not-required@test
-
-
Optionally, you can complete the following two steps to migrate user data from
the previous version (V10.0.2, Fix Pack 1 or earlier):
- Optional:
To enable services in the RedHat OpenShift Service Mesh to be virtualized as
stubs, you must enable this feature by completing the following two steps:
- Optional:
To enable the running of stubs that virtualize services in namespaces, add the
following parameters to the helm install parameters in Step 9 before installing
the server:
--set execution.istio.namespaces='{namespaceA,namespaceB}' \
Alternatively, you can add the parameters to the helm install parameters by using an array index notation.--set execution.istio.namespaces[0]=namespaceA \ --set execution.istio.namespaces[1]=namespaceB
-
Run the following commands to install the server software on your
computer:
Notes:
-
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. -
{openshift-cluster-dns-name}
with the remainder of the DNS name that you selected for the server.Notes:-
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. -
You can run the following command to obtain the default value of openshift-cluster-dns-name:
oc get --namespace=openshift-ingress-operator ingresscontroller/default -ojsonpath='{.status.domain}'
-
-
{my-super-secret}
with a value of your choice.Note: You can use the password seed to create all other default passwords. 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. -
{cloud-license-server-url}
and{cloud-license-server-id}
with the license server URL and ID. -
{namespace}
with the name of the namespace that you created.
-
-
If you migrated user data from a previous release (V10.0.2, Fix Pack 1), you must use the same
{my-ots}
name that you chose then, during the install step.
#Make sure the repository is current and retrieve the charts required to install the server helm repo update helm pull --untar hclsoftware/hcl-onetest-server --version 2.1011.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.hclOneTestLicensingUrl={cloud-license-server-url} \ --set global.hclOneTestLicensingId={cloud-license-server-id} \ --set global.hclOneTestPasswordAutoGenSeed={my-super-secret} \ --set global.hclImagePullSecret=hclcr.io \ --set keycloak.keycloak.image.pullSecrets[0]=hclcr.io
-
-
Optionally, perform the following steps to restore the backed up user data from
the current version:
velero restore create --from-backup=<backup-name> --restore-volumes
Note: You must replace<backup-name>
with the name of the back up file that you saved. - Optional:
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 of your choice.{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 must configure the license to use HCL OneTest™ Server. See Configuring floating licenses.
-
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.