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.
You must have performed the following tasks:
-
Completed the tasks provided in the Prerequisites section. See Prerequisites for installing the server software on Ubuntu.
-
Set up the Kubernetes environment (k3s). See Setting up a Kubernetes environment (k3s) on Ubuntu.
-
Logged in to the server host system again after you completed the k3s environment setup.
-
Copied the following values to be used during the installation process:
-
The Entitlement key from the Container software library.
-
The INGRESS_DOMAIN value that is displayed on completion of the ubuntu-init.sh script.
-
- Log in to the Ubuntu server using an SSH session.
-
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 -
Run the following command to get the latest updates from the repository:
helm repo update -
Create a Secret to pull the 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.comNotes:-
You must substitute
{your_entitlement_key}with the key that you copied from the Container software library. -
You can replace
example@abc.comwith the email address of the administrator if required.
-
-
Perform the following steps to install the server software:
-
Run the following command to get the latest updates from the
repository:
helm repo update -
Run the following command to retrieve the charts required to install
the server software:
helm pull --untar ibm-helm/ibm-rtas-prod --version 6.1021.1 -
Run the following command to provide the execution permission for the
scripts that are available in the files
directory:
chmod +x ibm-rtas-prod/files/*.sh -
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
Perform 5.d.i To install the server software and enable the service virtualization through Istio, a Tech Preview feature
Perform 5.d.ii and 5.d.iv To install the server software, enable the service virtualization through Istio, a Tech Preview feature, and to use another instance of the Jaeger UI
Perform 5.d.iii and 5.d.iv To install the server software and to use another instance of the Jaeger UI
Note: You must perform this step only if you want to use another instance of Jaeger than the one you installed during the setting up of the Kubernetes k3s environment.Perform 5.d.v -
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} -
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 -
Run the following command to install the server software, to enable Istio service virtualization, a Tech Preview feature, and to use another instance of Jaeger than the one you installed during the setting up of the 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} \ -f ibm-rtas-prod/values-k3s-demo.yaml \ --set-string execution.annotations.sidecar\\.jaegertracing\\.io/inject=true \ --set global.jaegerAgent.internalHostName=localhost \ --set global.jaegerDashboard.externalURL={my-jaeger-dashboard-url} -
Run the following command to enable service virtualization through Istio, a Tech Preview feature in the specific namespace:
kubectl create rolebinding istio-virtualization-enabled -n bookinfo --clusterrole={my-rtas}-execution-istio-test-system --serviceaccount=test-system:{my-rtas}-executionWhere, {my-rtas} is the name of the release that is provided during the installation of the server software.
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 -
Run the following command to install the server software and to use another instance of Jaeger than the one you installed during the setting up of the 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.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-rtas}with the release name of your choice.Note: The release name must consist of alphanumeric characters that are in lowercase or-
(hyphen). The release name must also 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 is 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 the backed-up 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 want to set the license value for the first time.Important: If you upgrade the product from the previous version, you must configure the value of Rational License Key Server in the Team Space License Configuration window when the installation of the server is complete. -
{my-jaeger-dashboard-url}with the URL of the Jaeger server.
-
-
Run the following command to get the latest updates from the
repository:
- 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 - Optional:
Perform the following steps to migrate data into Rational Test Automation
Server, if you upgraded the server software from the previous version (10.1.0,
10.1.1, or 10.1.2):
-
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} -
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 -
Run the following command to stop the cluster and Rational Test Automation
Server:
k3s-killall.sh -
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 --release <backup-release>:<target-release> <backup-file-name>Note: You must replace the following variables with the actual value:-
<backup-release>with the Helm release name of the server where the backup data is stored. -
<target-release>with the Helm release name of the server where you want to restore the data. -
<backup-file-name>with the name of the backed-up file that you saved.
-
-
Run the following command to restart Kubernetes and to start Rational Test Automation
Server:
sudo systemctl start k3s -
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} -
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}
-
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:
- Optional:
Perform the following steps to restore the backed-up user data from previous
version (10.1.3 or later) to the latest version:
-
Run the following script from the ibm-rtas-case/inventory/ibmRtasBase/files directory to
create a directory that contains metadata related to the Persistent
Volume Claims and their Persistent Volumes:
sudo backup.sh create-pvc-links -
Stop the Kubernetes cluster by running the
k3s-killall.shcommand. -
Restore the backed-up user data by running the following
commands:
sudo ./backup.sh restore [options] <backup-file-name>Note: You must replace<backup-file-name>with the name of the backed-up file that you saved.You can use the following parameters along with the restore command:
-
--namespace or -n: Use this parameter to restore a specific namespace from the backup file. If you do not mention the namespace, then volumes from all the namespaces in the backup file are restored. You can map one namespace to another namespace by using colon (:). The syntax is:
--namespace <name of the namespace> [:<target-namespace>] -
--release or -r: Use this parameter if the Helm release name of the server to which the backup is being restored is different than the Helm release name of the server where the backup was taken. The syntax is:
--release <backup-release>:<target-release> -
--volumes or -v: Use this parameter to specify the directory path of the Volumes. The syntax is:
--volumes <path-of-the-directory> -
-k or --confirm: Use this parameter to skip the confirmation step.
-
-
Restart the Kubernetes cluster by running the
systemctl start k3scommand to start Rational Test Automation Server. -
Run the following script from the ibm-rtas-prod/files directory to create all the
missing databases:
migrate.sh create-missing-dbs {my-rtas}Note: You can expect that the output of the command to contain a number of errors pertaining to objects that already exist. They do not indicate a problem with the execution of the script.
-
Run the following script from the ibm-rtas-case/inventory/ibmRtasBase/files directory to
create a directory that contains metadata related to the Persistent
Volume Claims and their Persistent Volumes:
-
Run the following command to verify and test the installed server
software:
$ helm test {my-rtas} -n test-systemwhere
{my-rtas}is the name of the release that was provided during the installation of the server software.
-
Instructions to access Keycloak to manage and authenticate users.
The user name can be keycloak and the password can be retrieved by running the following command:
where:kubectl get secret -n namespace rtas-keycloak-postgresql -o jsonpath="{.data.password}" | base64 --decode; echo-
rtas is a sub-domain name that you selected for the server.
-
namespace is the name of the namespace that you created.
-
-
The URL to access the Rational Test Automation Server UI.
-
Configure licenses for team spaces. See Configuring licenses for team spaces.
-
Configure the server software. See Configuration of the server software.