Installing the server software on Ubuntu by using k3s
You can install HCL OneTest™ Server on the Ubuntu server that has a Kubernetes 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 tasks provided in the Prerequisites section. See Prerequisites for installing the server software on Ubuntu.
-
Ensured that you have installed the following software:
-
OpenSSH server
-
Helm
-
-
Know the following values to be used during the installation process:
-
The Secret key from the Harbor repository.
-
The ingress DNS name that displayed on completion of the ubuntu-init.sh script.
-
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
- Log in to the Ubuntu server as a non-root user.
-
Create a namespace to install the server software by running the following
command:
kubectl create namespace test-system
-
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 command:
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.
kubectl 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
-
-
Run the following command to add the Certificate Authority (CA) certificate
into a Secret:
kubectl create secret generic -n test-system ingress \ "--from-literal=ca.crt=$(kubectl get -n istio-system secret istio-ingressgateway-certs -ojsonpath='{.data.ca\.crt}' | base64 --decode)"
When some components such as static agents or Docker agents want to communicate with HCL OneTest™ Server, the component presents its certificate to the server to verify its identity. HCL OneTest™ Server trusts the component only if it is signed by a recognized and trusted CA. To enable certificates as trusted certificates, you must add the signed CA into a trust by placing it in a Secret.
- 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 services in the Istio Service Mesh to be virtualized as stubs
Add the following parameter to thehelm install
command:--set execution.istio.enabled=true \ --set execution.istio.clusterRoleBinding.create=true
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
Set the following parameters in any of the following conditions:-
When you have installed a Jaeger operator on the cluster or on the
test-system namespace
-
When you did not enable to expose Jaeger UI during the Kubernetes setup
Note: You must substitute{my-jaeger-dashboard-url}
with the URL of the Jaeger server.--set global.jaegerDashboard.externalURL={my-jaeger-dashboard-url} --set global.jaegerAgent.internalHostName=localhost #If there is no Jaeger UI is available, then set the following parameters to false: --set global.jaegerDashboard.enabled=false --set global.jaegerAgent.enabled=false
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
NodePort To run performance tests on the Static agents
Add the following parameter to thehelm install
command:--set networkPolicy.enabled=false
-
-
Run the following commands to install the server software on your
computer:
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. -
{my-ingress-dns-name}
with the same ingress DNS name that displayed on completion of the ubuntu-init.sh script. -
{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. -
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.
#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 #Install the server helm install {my-ots} ./hcl-onetest-server -n test-system \ -f hcl-onetest-server/values-k3s.yaml \ --set global.hclOneTestIngressDomain={my-ingress-dns-name} \ --set global.hclFlexnetURL={cloud-license-server-url} \ --set global.hclFlexnetID={cloud-license-server-id} \ --set global.hclImagePullSecret=hclcr.io \ --set global.hclOneTestPasswordAutoGenSeed={my-super-secret}
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:
Perform the following steps to restore the backed up user data from the current
version:
-
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
-
Instructions to access Keycloak to manage and authenticate users.
You can use the username as keycloak and password can be retrieved by running the following command:
where:kubectl get secret -n namespace onetest-keycloak-postgresql -o jsonpath="{.data.password}" | base64 --decode; echo
- onetest is a sub-domain name that you select for the server.
- namespace is the name of the namespace that you created.
-
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 Ubuntu.
-
You can configure the license to use HCL OneTest™ Server. See Configuring named user licenses.