Installing the server software on Ubuntu using microk8s
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 the tasks provided in the Prerequisites section. See Prerequisites for installing the server software on Ubuntu.
-
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.
-
You must have access to the internet to install HCL OneTest™ Server.
-
You must ensure that /snap/bin is in your
PATH
. You can run theexport PATH=”/snap/bin:$PATH”
command to set yourPATH
.
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
- Log in to the Ubuntu server as a non-root user.
-
Create a namespace to install the server software by entering the following
command:
kubectl create namespace test-system
-
Add the repository to Helm to access the server install charts by entering the
following command, if you have not done:
Note: You must substitute
{registry-username}
and{registry-password}
with the username and password of the Harbor repository.helm repo add hclsoftware https://hclcr.io/chartrepo/ot --username {registry-username} --password {registry-password}
-
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 command:
Notes:
-
You must substitute
{registry-username}
and{registry-password}
with the username and password of the Harbor repository. -
You can replace the
not-required@test
with the administrators email address, if desired.
kubectl create secret docker-registry hclcr.io \ -n test-system \ --docker-server=hclcr.io \ --docker-username={registry-username} \ --docker-password={registry-password} \ --docker-email=not-required@test
-
- Optional:
Run the following commands to start a pod that assists you in migrating user
data:
#Retrieve the backup yaml file helm pull --untar hclsoftware/hcl-onetest-server --version 1.101.0 #Modify the backup yaml file with the release name for your server by replacing {my-ots} sed -i 's/{{ \.Release\.Name }}/{my-ots}/g' hcl-onetest-server/files/import-prek8s-backup.yaml #Apply the backup yaml file to start the import-prek8s-backup pod kubectl apply -f hcl-onetest-server/files/import-prek8s-backup.yaml -n test-system
- Optional:
Run the following command to display the
import-prek8s-backup pod's log, and then follow the instructions in the log to
copy your backup file to where the pod is waiting to process it:
kubectl logs import-prek8s-backup -n test-system
When the user data backup is fully migrated, the import-prek8s-backup pod changes from Running to Completed state. To view the pod state you can run the
kubectl get pod import-prek8s-backup -n test-system
command.Progress can be monitored by displaying the log to check for updates. When the state of the pod is Completed, the log file displays the additional parameters that must be added to the helm install in step 8. The following is an example that shows the additional helm arguments:--set keycloak.keycloak.username=admin \ --set execution.existingPostgresqlPassword=SwztX9JRO/yL9jtgioUiKMGjlsWfM7Ok \ --set existingKeycloakPassword=jqdV7aveCa3WShkdSF/Z8hAasBupsvp6 \ --set existingKeycloakPostgresqlPassword=pKVFQUQWRU7BJC6sKeOZIm8zCzLkbXM7 \ --set existingOauthClientSecret=EMRpHBRurFIMB9X+nfwApnLBBpkvn8+z \ --set existingPostgresqlPassword=8HY3nADjTZBC2lLj0i7Y7v6wHeEji9ds \ --set existingSecretsMasterPassword=ibIPh6wGAv0IjsveOrYX1TRwo3ChvxWx \ --set results.existingPostgresqlPassword=7X3aaAVeHxdzJ+BlFTG7G7rypzsbhd6D \ --set rm.existingPostgresqlPassword=3uaEx5wTja+PSzvG64O1+cpO3glGAaVt \ --set tam.existingPostgresqlPassword=7JO95keyZ/F9w5rBcXj2YZFKFf/aAK1F \
-
Run the following commands to install the server software on your
computer:
Notes:
-
You must substitute the following variables value with the actual value in the command:
-
{my-ots}
with the release name that you provided for the server. -
{my-ingress-dns-name}
with the same Ingress DNS name that you used in ubuntu-init.sh. -
{cloud-license-server-url}
and{cloud-license-server-id}
with the license server ID and URL. -
{my-super-secret}
with a password seed that you selected. -
{namespace}
with the name of the namespace that you created.
-
-
The password seed is used to create all other default passwords. You must store the password seed securely. The password seed is reused when you install the server software by using a backup of user data. This seed is used when restoring backup files either on the current or later versions of the server software.
-
If you migrated user data from a previous release, 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 1.101.0 #Install the server helm install {my-ots} hclsoftware/hcl-onetest-server -n test-system \ --set license=accept \ --set global.hclOneTestIngressDomain={my-ingress-dns-name} \ --set global.hclOneTestLicensingId={cloud-license-server-id} \ --set global.hclOneTestLicensingUrl={cloud-license-server-url} \ --set global.hclOneTestPasswordAutoGenSeed={my-super-secret} \ --set global.hclOneTestRegistryPullSecret=hclcr.io \ --set keycloak.keycloak.image.pullSecrets[0]=hclcr.io
Optionally, to enable virtual services to use the Istio Service Mesh, complete the following two steps:- Add the following parameters to the helm install parameters in the
preceding command before installing the
server:
--set execution.istio.enabled=true \ --set execution.istio.clusterRoleBinding.create=true
- Run the following command to create the role bindings required for
Istio:
kubectl 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.
-
- Optional:
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 want to use Jaeger UI to view Performance and Web UI tests logs
-
When you did not enabled to expose Jaeger UI during the Kubernetes setup
--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
Note: You must substitute{my-jaeger-dashboard-url}
with the URL of the Jaeger server. -
- Optional:
Perform the following steps to restore the backed up user data from the current
version:
- Optional:
Run the following command to verify and test the installed server
software:
$ helm test {my-ots} -n {namespace}
where:{my-ots}
with the release name that you provided for the server.{namespace}
is a name of the namespace that you created during the server install.
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 Ubuntu.