Installing the server software on Ubuntu by using k3s

You can install Rational® Test Automation Server on the Ubuntu server that has a Kubernetes environment to run functional, integration, and performance tests. Rational® Test Automation 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:

Procedure

  1. Use an SSH session to log in to the Ubuntu server.
  2. Add the entitlement registry to Helm to access the server install charts by running the following command:
    helm repo add ibm-helm https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm
  3. Run the following command to get the latest updates from the repository:
    helm repo update
  4. Create a Secret to pull images that are used by Rational® Test Automation Server by running the following command:
    kubectl create secret docker-registry cp.icr.io \
    -n test-system \
    --docker-server=cp.icr.io \
    --docker-username=cp \
    --docker-password={your_entitlement_key} \
    --docker-email=example@abc.com
    Notes:
    • You must substitute {your_entitlement_key} with the key that you copied from Container software library.

    • You can replace example@abc.com with the administrator email address, if required.

  5. Perform the following steps to install the server software:
    1. Run the following command to get the latest updates from the repository:
      helm repo update
    2. Run the following command to retrieve the charts required to install the server software:
      helm pull --untar ibm-helm/ibm-rtas-prod --version 4.1013.0
    3. Perform one of the steps described in the following table to install the server software based on your requirement:
      Step description Step no

      To install the server software

      Go to step 5.c.i

      To install the server software and enable Istio service virtualization, a Tech Preview feature

      Go to 5.c.ii

      To install the server software and enable the Jaeger UI

      Note: You must perform this step only if you have not enabled the Jaeger UI to be exposed during the setting up of Kubernetes k3s environment.
      Go to step 5.c.iii

      To install the server software and enable performance test runs on the statuc agents

      Perform 5.c.iv
      1. Run the following command to install the server software:

        helm install {my-rtas} ./ibm-rtas-prod -n test-system \
        --set license=true \
        -f ibm-rtas-prod/values-k3s.yaml \
        --set global.ibmRtasIngressDomain={my-ingress-dns-name} \
        --set global.ibmRtasPasswordAutoGenSeed={password-seed} \
        --set global.ibmRtasRegistryPullSecret=cp.icr.io \
        --set global.rationalLicenseKeyServer=@{rlks-ip-address}
      2. Run the following command to install the server software and to enable Istio service virtualization, a Tech Preview feature:

        helm install {my-rtas} ./ibm-rtas-prod -n test-system \
        --set license=true \
        -f ibm-rtas-prod/values-k3s.yaml \
        --set global.ibmRtasIngressDomain={my-ingress-dns-name} \
        --set global.ibmRtasPasswordAutoGenSeed={password-seed} \
        --set global.ibmRtasRegistryPullSecret=cp.icr.io \
        --set global.rationalLicenseKeyServer=@{rlks-ip-address} \
        -f ibm-rtas-prod/values-k3s-demo.yaml
        Important: You must run the following command to enable service virtualization in the specific namespace after the server installation is complete:
        kubectl create rolebinding istio-virtualization-enabled -n bookinfo --clusterrole={my-rtas}-execution-istio-test-system --serviceaccount=test-system:{my-rtas}-execution
        Note: When you uninstall the chart, the manually created role bindings are not deleted from the namespace. You can run the following command to delete the role bindings:
        kubectl delete rolebinding istio-virtualization-enabled -n bookinfo
      3. Run the following command to install the server software and to enable the Jaeger UI, if you have not enabled the Jaeger UI to be exposed during the setting up of Kubernetes k3s environment:

        helm install {my-rtas} ./ibm-rtas-prod -n test-system \
        --set license=true \
        -f ibm-rtas-prod/values-k3s.yaml \
        --set global.ibmRtasIngressDomain={my-ingress-dns-name} \
        --set global.ibmRtasPasswordAutoGenSeed={password-seed} \
        --set global.ibmRtasRegistryPullSecret=cp.icr.io \
        --set global.rationalLicenseKeyServer=@{rlks-ip-address} \
        --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}
      4. Run the following command to install the server software and to enable performance test runs on the static agents:

        helm install {my-rtas} ./ibm-rtas-prod -n test-system \
        --set license=true \
        -f ibm-rtas-prod/values-k3s.yaml \
        --set global.ibmRtasIngressDomain={my-ingress-dns-name} \
        --set global.ibmRtasPasswordAutoGenSeed={password-seed} \
        --set global.ibmRtasRegistryPullSecret=cp.icr.io \
        --set global.rationalLicenseKeyServer=@{rlks-ip-address} \
        --set networkPolicy.enabled=false
      You must substitute the value of the following variables with the actual value in the command:
      • {my-rtas} with the release name of your choice.
        Note: The release name must consist of lower case alphanumeric characters or - (hyphen), start with an alphabetic character, and end with an alphanumeric character. For example, my-org or abc-123.
      • {my-ingress-dns-name} with the INGRESS_DOMAIN value that displayed on completion of the ubuntu-init.sh script.

      • {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 backup files either on the current or later versions of the server software.
      • Optional: {rlks-ip-address} with the IP address of Rational License Key Server, if you are setting the license value for the first time.

        Important: If you are upgrading the product from the previous version, you must configure the Rational License Key Server value in the License Configuration window when the installation of the server is complete.
      • {my-jaeger-dashboard-url} with the URL of the Jaeger server.

  6. Optional: Run the following command to remove a job that is used to initialize the PostgresQL database during the installation of the server software:
    kubectl delete job {my-rtas}-postgresql-init -n test-system
  7. Optional: Perform the following steps to migrate data into Rational® Test Automation Server, if you upgraded the server software from the previous version:
    1. Run the following script from the ibm-rtas-prod/files directory to create a directory that contains metadata related to the Persistent Volume Claims and their Persistent Volumes:
      migrate.sh create-pvcs -n test-system {my-rtas}
    2. Run the following script from the ibm-rtas-case/inventory/ibmRtasBase/files directory to back up the data:
      sudo backup.sh create-pvc-links -v ~/migration-pvc-links
    3. Run the following command to stop the cluster and Rational® Test Automation Server:
      k3s-killall.sh
    4. Run the following script from the ibm-rtas-case/inventory/ibmRtasBase/files directory to restore the backed-up data:
      sudo backup.sh restore -v ~/migration-pvc-links <backup-file-name> --release
      Note: You must replace <backup-file-name> with the name of the back up file that you saved.
    5. Run the following command to restart Kubernetes and to start Rational® Test Automation Server:
      sudo systemctl start k3s
    6. Run the following script from the ibm-rtas-prod/files directory to merge the data into the server:
      migrate.sh merge-dbs -n test-system {my-rtas}
    7. Run the following command to remove the resources that were created during the migration process:
      migrate.sh delete-temp-resources -n test-system {my-rtas}
  8. Run the following command to verify and test the installed server software:
    $ helm test {my-rtas} -n test-system

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

Results

On completion of the installation of server software, the output displays the following information on the command-line interface:
  • Instructions to access Keycloak to manage and authenticate users.

    You must use keycloak as user name and the password can be retrieved by running the following command:
    kubectl get secret -n namespace rtas-keycloak-postgresql -o jsonpath="{.data.password}" | base64 --decode; echo 
    where:
    • rtas 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 Rational® Test Automation Server UI.

What to do next

You can do the following tasks: