Upgrading the server software on Azure Kubernetes Service

When you want to use the latest version of the server software on Azure Kubernetes Service (AKS), you must upgrade HCL OneTest Server from the previous version of the software.

Before you begin

You must have completed the following tasks:

  • Completed the tasks provided in the Prerequisites section. See Prerequisites for installing the server software on Azure Kubernetes Service.

  • Informed users that HCL OneTest Server is offline temporarily during the upgrade process.

  • Completed all test executions that are running on the existing version of HCL OneTest Server.

  • Stopped all stub executions that are running on the existing version of HCL OneTest Server.

  • Canceled any scheduled test runs that have a future date or time.

  • Logged in to the AKS cluster. You can run the az login command to log in to AKS interactively.

  • Subscribed to active Azure subscription. You can run the az account set --subscription {subscription_name} command to set your active subscription.

Optional. You can back up the user data from the previous version of the product. If the upgrade fails, then you can use that backup file to restore it on latest version of the server software. See Backing up the server data on Azure Kubernetes Service.

Note: For more information about specific versions of software requirements, see System Requirements.

About this task

When you want to install the latest version of the server software in the same location that contained the 10.2.0 or later, then you can upgrade HCL OneTest Server by using the helm upgrade command.
Important: On AKS, you can use in-place upgrade method to upgrade to the latest version of the server software.

You must replace the following variables with the actual value in this procedure:

  • {resource_group} with the name of the resource group that you created during the creation of the AKS cluster.

  • {azure_cluster} with the name of the Azure cluster that you created during the creation of the AKS cluster.

  • {azure_container_registry} with the name of the Azure Container Registry (ACR) that you created during the AKS setup.

  • {my-ingress-dns-name} with the INGRESS_DOMAIN value that you provided during the installation of NGINX Ingress Controller.

Remember: test-system is the name of the namespace that is created during the installation of the server software. If you have created a namespace by using a different value, then you must use that value in place of the test-system in all the instances in this procedure.

Procedure

  1. Add the software registry to Helm by running the following command:
    helm repo add hclsoftware https://hclcr.io/chartrepo/ot
  2. Run the following command to get the latest updates from the repository:
    helm repo update
  3. Run the following commands to fetch the scripts that are used to install HCL OneTest Server:
    helm pull --untar hclsoftware/hcl-onetest-server --version 7.1022.0
    chmod +x hcl-onetest-server/files/*.sh
  4. Run the following command to configure kubectl to connect to the AKS cluster:
    az aks get-credentials -g {resource_group} -n {azure_cluster}
    Note: You can verify the connection to the AKS cluster by running the kubectl get nodes command that displays a list of the cluster nodes.
  5. Run the following script from the hcl-onetest-server/files directory to pull the images of HCL OneTest Server from the Harbor repository to ACR:
    bash hcl-onetest-server/files/move-images.sh {azure_container_registry}.azurecr.io/hcl-onetest hclcr.io/ot/hcl-onetest
    Tip: You can verify that multiple manifests are associated with the image in the ACR by running the following commands:
    az acr repository list -n {azure_container_registry} -otsv
    az acr repository show-manifests -n {azure_container_registry} --repository \
    $(az acr repository list -n {azure_container_registry} -otsv --query [0])
  6. Run the helm list -A command to list all releases that are deployed across all namespaces.
  7. Perform one of the steps described in the following table to upgrade the server software based on your requirement:
    Step description Step no

    To upgrade the server software

    Perform 7.a

    To upgrade the server software and enable Jaeger for performance and Web UI tests logs

    Perform 7.b
    Tip: You can run the following command to know the value of the variables that you used during the installation of the previous version of the server software:

    helm get values {release_name} -n {namespace}

    For example, if your name of the release is my-ots and name of the namespace is testsystem, then you must run the command as follows:

    helm get values my-ots -n testsystem
    Note: The following command upgrades the server software by referencing the images from ACR. Therefore, HCL OneTest Server can provide better performance.
    1. Run the following command to upgrade the server software:
      helm upgrade {my-ots} ./hcl-onetest-server -n test-system \
      -f hcl-onetest-server/values-k8s.yaml \
      --set global.persistence.rwxStorageClass=azurefile \
      --set global.hclOneTestIngressDomain={my-ingress-dns-name} \
      --set global.hclOneTestRegistry={azure_container_registry}.azurecr.io/hcl-onetest \
      --set global.hclOneTestPasswordAutoGenSeed={password-seed}
      
    2. Run the following command to upgrade the server software and to enable Jaeger for performance and Web UI tests logs:
      helm upgrade {my-ots} ./hcl-onetest-server -n test-system \
      -f hcl-onetest-server/values-k8s.yaml \
      --set global.persistence.rwxStorageClass=azurefile \
      --set global.hclOneTestIngressDomain={my-ingress-dns-name} \
      --set global.hclOneTestRegistry={azure_container_registry}.azurecr.io/hcl-onetest \
      --set global.hclOneTestPasswordAutoGenSeed={password-seed} \
      --set-string execution.annotations.sidecar\\.jaegertracing\\.io/inject=true \
      --set global.jaegerAgent.internalHostName=localhost \
      --set global.jaegerDashboard.externalURL={my-jaeger-dashboard-url}
    You must substitute the value of the following variables with the actual value in the command:
    • {my-ots} with the release name that you used during the installation of the previous version of the server software.

    • {password-seed} 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 the backed-up files either on the current or later versions of the server software.
    • {my-jaeger-dashboard-url} with the URL of the Jaeger server.

  8. Run the following script from the hcl-onetest-server/files directory to verify and test the installed server software:
    $ helm test {my-ots} -n test-system

    where {my-ots} is the name of the release that was provided during the installation of the server software.

Results

On the successful upgrade of HCL OneTest Server, the output displays the following information:
  • Keycloak URL to manage and authenticate users.

  • A URL to access the HCL OneTest Server UI.

What to do next

You can perform the following tasks: