ibm-rtas-prod

by joaquinito2051

Helm chartv13.1054.0App 10.5.4-202309061322-916d52b6ccApache-2.0

IBM Rational Test Automation Server - Speed innovation with continuous testing Documentation For additional details regarding install parameters check https://github.com/IBM/charts/blob/master/repo/ibm-helm/ibm-rtas-prod.md License By installing this product you accept the terms http://ibm.biz/rtas-license.

About this chart

Introduction

IBM Rational Test Automation Server brings together test data, test environments, and test runs and reports into a single, web-based browser for testers and non-testers. IBM Rational Test Automation Server provides the following capabilities:

Focal Point

IBM Rational Test Automation Server enables test teams to bring together testing from each of the IBM Rational Test Workbench products under a single view. Test teams working to deliver functional, integration, and performance tests benefit from a holistic view of test progress.

Role-based access and security

Security is a key concern for our clients and therefore, IBM Rational Test Automation Server brings a comprehensive, role-based access control scheme to the server with project owners assigning specific member's key permissions (by using roles), for example managing test data or working with secrets such as passwords.

Running of tests from the server by using containers

Server-based running of tests is the starting point for IBM Rational Test Automation Server. For members of a project with the appropriate role, IBM Rational Test Automation Server enables direct running of tests from the browser by using containers.

Connected agents for existing performance agents

Agent owners can connect existing performance agents to the server and add them to a project for running schedules and Accelerated Functional Testing (AFT) Suites on the current infrastructure.

Project overview statistics

The Overview page for IBM Rational Test Automation Server offers you a quick, simple view on the state of testing for your projects.

Reporting and the Resource Monitoring Service

IBM Rational Test Automation Server provides the home for capabilities that previously were hosted on Rational Test Control Panel. Reporting and the Resource Monitoring Service are in IBM Rational Test Automation Server and provide a more direct relationship with their related projects. These capabilities also benefit from the project level, role-based access controls.

Chart Details

  • This chart deploys a single instance of IBM Rational Test Automation Server

Prerequisites

Kubernetes cluster:

Installed locally:

To install the product you need to access the cluster with cluster administrator privileges.

Red Hat OpenShift SecurityContextConstraints Requirements

The product is compatible with the restricted and restricted-v2 SecurityContextConstraint.

If you would prefer to use the custom ibm-rtas-restricted SCC, please do the following before installation:

Custom SecurityContextConstraints definition:

oc create -f - <<EOF
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
  name: ibm-rtas-restricted
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegeEscalation: true
allowPrivilegedContainer: false
allowedCapabilities: null
defaultAddCapabilities: null
fsGroup:
  type: MustRunAs
groups:
priority: null
readOnlyRootFilesystem: false
requiredDropCapabilities:
- KILL
- MKNOD
- SETUID
- SETGID
runAsUser:
  type: MustRunAsRange
seLinuxContext:
  type: MustRunAs
supplementalGroups:
  type: RunAsAny
users: []
volumes:
- configMap
- downwardAPI
- emptyDir
- persistentVolumeClaim
- projected
- secret
EOF

Configure services to use this SCC. From the command line, run:

oc adm policy add-scc-to-group ibm-rtas-restricted system:serviceaccounts:test-system

Red Hat OpenShift Sysdig Requirements

IBM Cloud deploys Sysdig into Red Hat OpenShift. The default configuration causes many warnings in the RabbitMQ pod that eventually causes pod restarts.

2023-02-23 01:55:01.045358+00:00 [warning] <0.710.0> HTTP access denied: user 'guest' - invalid credentials
2023-02-23 01:55:02.050662+00:00 [warning] <0.711.0> HTTP access denied: user 'guest' - invalid credentials

Fix this by filtering out RabbitMQ:

oc edit configmap sysdig-agent -n ibm-observe

Append to dragent.yaml

    use_container_filter: true
    container_filter:
      - exclude:
          kubernetes.pod.label.app.kubernetes.io/name: rabbitmq

This change propagates after a couple of minutes. Further reading

Service Virtualization Usage

For the product to show Service Virtualization usage metrics, User Workload monitoring must be enabled in the cluster. You should consult the OpenShift documentation for the version of the platform that you are using for details on how to do this. For example:

OpenShift 4.12

Enabling monitoring for user-defined projects in: https://docs.openshift.com/container-platform/4.12/monitoring/enabling-monitoring-for-user-defined-projects.html

Resources Required

The product requires, in addition to resources required by the cluster, a minimum of: 16GiB memory, 8 cpu, 128GiB of persistent storage

Depending on workload considerably more resources could be required.

Storage

When providing your own cluster if the default storage class does not support the ReadWriteMany (RWX) accessMode, an alternative class must be specified using the following additional helm value:

  --set global.persistence.rwxStorageClass=ibmc-file-gold

The following ReadWriteMany storage implementations have been validated:

The default configuration creates claims that dynamically provision the below persistent volumes.

ClaimSizeAccess ModeContent
data-{my-rtas}-postgresql-026GiRWOUser data used by services
data-{my-rtas}-rabbitmq-08GiRWONotifications between services
data-{my-rtas}-results-08GiRWOReports
data-{my-rtas}-tam-032GiRWOCloned git repositories
data-{my-rtas}-userlibs-01GiRWXUser provided third party libraries and extensions

The pod fsGroup can be set for these volumes using the Helm securityContext.fsGroup value if your volume provisioner requires it.

Ensure that volumes containing user data can grow when required. Confirm that the storageclass used to install the product (typically the cluster default) has allowVolumeExpansion: true

Find the default storageclass name

oc get storageclass

Check this storageclass allows expansion

oc get storageclass {name} -oyaml | grep ^allowVolumeExpansion

There may be additional configuration required based on the Kubernetes version and storage provider. Therefore the storage provider documentation must be checked for other necessary prerequisites.

The persistent volumes can be expanded by editing the claim

Installing the Chart

Create Namespace

The product requires its own namespace. Create a namespace to install the product into.

oc new-project test-system

Access to binaries

Add the Entitlement Registry to Helm

helm repo add ibm-helm https://raw.githubusercontent.com/IBM/charts/master/repo/ibm-helm

To pull images used by the product, you require an entitlement key. This can be obtained from: https://myibm.ibm.com/products-services/containerlibrary

oc create secret docker-registry cp.icr.io \
  -n test-system \
  --docker-server=cp.icr.io \
  --docker-username=cp \
  --docker-password={entitlement-key} \
  --docker-email=not-required@test

Trust of certificate

Some components of the product solution communicate with the server. This is done using HTTPS, verifying that the certificate is signed by a trusted CA. Where default certificates are used, they are typically not signed by a recognized, trusted, CA.

Self Trust

To enable the certificate to be trusted we add the signing CA into a secret so that it can be injected into our trust stores.

  • Verify if an additional CA certificate is required. IBM Cloud uses Lets Encrypt meaning it is already trusted
curl -sw'%{http_code}' -o/dev/null \
  "https://wildcard.$(oc get -n openshift-ingress-operator ingresscontroller default -ojsonpath='{.status.domain}')"

If the result is 503 then no further action is required, however 000 means that a certificate needs adding.

  • Get the default CA certificate in PEM format
oc get -n openshift-ingress-operator secret router-ca -ojsonpath='{.data.tls\.crt}' | base64 --decode > ca.crt
  • Validate that this is the CA used to sign the certificate used for ingress
curl -sw'%{http_code}' -o/dev/null --cacert ca.crt \
  "https://wildcard.$(oc get -n openshift-ingress-operator ingresscontroller default -ojsonpath='{.status.domain}')"

The result should be 503, if you see 000 then the certificate configuration has been customized and you need to find the certificate of the signer to use in the next step.

  • Create the ingress secret to store the CA
oc create secret generic -n test-system ingress --from-file=ca.crt=ca.crt

Fetching the CA certificate

To fetch the signing CA certificate so that it can be injected into other product trust stores.

oc get secret ingress -n test-system -o jsonpath={.data.ca\\.crt} | base64 -d

Install with Helm

If you are upgrading from a previous release, refer to the additional steps.

Helm may then be used to install the product. Note: substitute {my-rtas} for a Helm release name.

NOTE If you are upgrading, you must specify the same value for global.persistence.rwxStorageClass as used in the existing installation. If you do not know what this is, it can be found by running:

oc get pvc -n test-system data-{my-rtas}-userlibs-0 \
   -ojsonpath='{.spec.storageClassName}' && echo

The value should be used in place of the one shown below.

helm repo update
helm pull --untar ibm-helm/ibm-rtas-prod --version 13.1054.0

# update the runAsUser and fsGroup to match scc policy
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

helm install {my-rtas} ./ibm-rtas-prod -n test-system \
  --set keycloak.signup.enabled=true \
  --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.ibmRtasCertSecretOptional=false \
  --set global.ibmRtasPasswordAutoGenSeed={my-super-secret} \
  --set global.ibmRtasRegistryPullSecret=cp.icr.io \
  --set global.rationalLicenseKeyServer=@{rlks-ip-address}

rm -fr ibm-rtas-prod
  • global.ibmRtasCertSecretOptional=false should be set only when an ingress secret to store the CA was created above.

  • The rwxStorageClass is cloud provider dependent, the value provided is only an example.

  • The password seed is used to create default passwords and should be stored securely. Its required again to restore from a backup.

  • When the ingress domain is accessible to untrusted parties, keycloak.signup.enabled should be set to false.

  • The default openshift-cluster-dns-name referred to above can be found using:

oc get --namespace=openshift-ingress-operator ingresscontroller/default -ojsonpath='{.status.domain}'

The default certificate which terminates TLS connections, has a single wildcard. This means that only a single hostname segment can be prefixed. Therefore using the ingress domain my.server.{openshift-cluster-dns-name} would typically be invalid.

Note: During install a job is used to initialize the PostgresQL database. On successful completion it can optionally be removed

oc delete job {my-rtas}-postgresql-init -n test-system

Installing in an airgap environment using a bastion host

General guidance on installing in airgap environ

Deploy ibm-rtas-prod with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-rtas-prod on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartibm-rtas-prod is pinned at v13.1054.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply