When you want to install the latest version of the server software in the same
location that contained the V10.1.3, then you can upgrade Rational® Test Automation
Server by using the helm upgrade
command.
Before you begin
You must have completed the following tasks:
-
Informed users that Rational® Test Automation
Server is offline
temporarily during the upgrade process.
-
Installed Helm V3.5.2. For more information, refer to the Installing a Helm
chart on an OpenShift Container Platform cluster section in the Red Hat OpenShift
documentation.
-
Completed all test executions that are running on the existing version of Rational® Test Automation
Server.
-
Stopped all stub executions that are running on the existing version of Rational® Test Automation
Server.
-
Canceled any scheduled test runs that have a future date or time.
-
Copied an Entitlement key from the Container software library to pull
the images used by the server software. For more information, refer to Creating an API key.
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
V10.2.0. See Backing up the server data on Red Hat OpenShift.
Procedure
-
Log in to your OCP cluster as a cluster administrator by running the
oc login command.
-
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:
-
Run the following command to retrieve the charts:
helm pull --untar ibm-helm/ibm-rtas-prod --version 5.1020.0
-
Create a Secret to pull images that are used by Rational® Test Automation
Server by running the following commands:
oc 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
Remember: test-system is the
name of the namespace. If you 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.
-
Perform the following steps to upgrade the server software:
-
Run the following commands to update the runAsUser and fsGroup to match
the Security Context Constraints (SCC):
sed -i -e "s/runAsUser: 1001/runAsUser: $(oc get project test-system -oyaml \
| sed -r -n 's# *openshift.io/sa.scc.uid-range: *([0-9]*)/.*#\1#p')/g;
s/fsGroup: 1001/fsGroup: $(oc get project test-system -oyaml \
| sed -r -n 's# *openshift.io/sa.scc.supplemental-groups: *([0-9]*)/.*#\1#p')/g" ibm-rtas-prod/values-openshift.yaml
Rational® Test Automation
Server is compatible with the restricted Security Context Constraint.
You must run this command to ensure that the runAsUser and fsGroup
strategies match with the SCC policy.
-
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 6.b.i |
To upgrade the server software and enable the OpenShift
Service Mesh service virtualization through Istio, a
Tech Preview feature
|
Perform 6.b.ii and 6.b.iii |
To upgrade the server software and enable Jaeger for
performance and Web UI tests logs
|
Perform 6.b.iv |
Remember:
-
If you upgrade the product from the previous version, then you must use
the same value for
global.persistence.rwxStorageClass parameter
that you used in the previous installation.
You can run the following command to obtain the value that you used for
global.persistence.rwxStorageClass:
oc get pvc -n test-system data-{my-rtas}-userlibs-0 \
-ojsonpath='{.spec.storageClassName}' && echo
-
The default certificate that terminates TLS connections has a single
wildcard. Therefore, you must prefix a single hostname segment for the
global.ibmRtasIngressDomain parameter.
For example, --set global.ibmRtasIngressDomain=rtas.{dns name of
the openshift cluster}
-
Run the following command to upgrade the server software:
helm upgrade {my-rtas} ./ibm-rtas-prod -n test-system \
--set license=true \
-f ibm-rtas-prod/values-openshift.yaml \
--set global.persistence.rwxStorageClass=ibmc-file-gold \
--set global.ibmRtasIngressDomain=rtas.{openshift-cluster-dns-name} \
--set global.ibmRtasPasswordAutoGenSeed={password-seed} \
--set global.ibmRtasRegistryPullSecret=cp.icr.io
Note: You must use the --set
global.ibmRtasCertSecretOptional=false parameter in the helm
upgrade
command only if you created an ingress Secret to store the CA
during the previous installation of the server software.
-
Run the following command to upgrade the server software and
to enable the OpenShift Service Mesh service virtualization
feature:
helm upgrade {my-rtas} ./ibm-rtas-prod -n test-system \
--set license=true \
-f ibm-rtas-prod/values-openshift.yaml \
--set global.persistence.rwxStorageClass=ibmc-file-gold \
--set global.ibmRtasIngressDomain=rtas.{openshift-cluster-dns-name} \
--set global.ibmRtasPasswordAutoGenSeed={password-seed} \
--set global.ibmRtasRegistryPullSecret=cp.icr.io \
-f ibm-rtas-prod/values-openshift-demo.yaml
-
Run the following command to enable service virtualization
through Istio, a Tech Preview feature in the specific
namespace:
oc create rolebinding istio-virtualization-enabled -n bookinfo --clusterrole={my-rtas}-execution-istio-test-system --serviceaccount=test-system:{my-rtas}-execution
Where, {my-rtas} is the name of the release that you
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:
oc delete rolebinding istio-virtualization-enabled -n bookinfo
-
Run the following command to upgrade the server software and
to enable Jaeger for performance and Web UI tests logs:
helm upgrade {my-rtas} ./ibm-rtas-prod -n test-system \
--set license=true \
-f ibm-rtas-prod/values-openshift.yaml \
--set global.persistence.rwxStorageClass=ibmc-file-gold \
--set global.ibmRtasIngressDomain=rtas.{openshift-cluster-dns-name} \
--set global.ibmRtasPasswordAutoGenSeed={password-seed} \
--set global.ibmRtasRegistryPullSecret=cp.icr.io \
--set-string execution.annotations.sidecar\\.jaegertracing\\.io/inject=true \
--set global.jaegerAgent.internalHostName=localhost \
--set global.jaegerDashboard.externalURL={my-jaeger-dashboard-url}
Note: You must use the --set
global.ibmRtasCertSecretOptional=false parameter in the helm
upgrade
command only if you created an ingress Secret to store the CA
during the previous installation of the server software.
-
Run the following command to verify and test the upgraded server
software:
$ helm test {my-rtas} -n test-system
where {my-rtas}
is the name of the release that was provided during
the installation of the server software.
Results
On the successful upgrade of Rational® Test Automation
Server, the output displays the following information: