Chapter 1. Migrating your data before an upgrade With the release of Red Hat Trusted Profile Analyzer (RHTPA) version 1.2, we implemented a new schema for ingested software bill of materials (SBOM) and vulnerability exploitability exchange (VEX) data. Before upgrading, you must configure the RHTPA 1.2 values file to do a data migration to this new schema for your SBOM and VEX data. This data migration happens during the upgrade process to RHTPA version 1.2. Prerequisites Installation of RHTPA 1.1.2 on Red Hat OpenShift. A new PostgreSQL database. A workstation with the oc , and helm binaries installed. Procedure On your workstation, open a terminal, and log in to OpenShift by using the command-line interface: Syntax oc login --token=TOKEN --server= SERVER_URL_AND_PORT Example Note You can find your login token and URL from the OpenShift web console to use on the command line. Log in to the OpenShift web console. Click your user name, and click Copy login command. Offer your user name and password again, and click Display Token to view the command. Export the RHTPA project namespace: Syntax export NAMESPACE= RHTPA_NAMESPACE Example USD export NAMESPACE=trusted_profile_analyzer Verify that the RHTPA 1.1.2 installation is in the project namespace: Example USD helm list -n USDNAMESPACE Uninstall RHTPA 1.1.2: Example USD helm uninstall redhat-trusted-profile-analyzer -n USDNAMESPACE Open for editing the RHTPA 1.2 values file, and change the following things: Reference the new PostgreSQL database instance. Reference the same simple storage service (S3) storage used for version 1.1.2. Reference the same messaging queues used for version 1.1.2. Set the modules.vexinationCollector.recollectVEX and modules.bombasticCollector.recollectSBOM options to a value of true . Note See the Deployment Guide appendixes for value file templates used with RHTPA deployments on OpenShift. Start the upgrade by using the updated RHTPA 1.2 Helm chart for OpenShift: Syntax helm install redhat-trusted-profile-analyzer openshift-helm-charts/redhat-trusted-profile-analyzer -n USDNAMESPACE --values PATH_TO_VALUES_FILE --set-string appDomain=USDAPP_DOMAIN_URL Example Note You can run this Helm chart many times to apply the currently configured state from the values file. Verify the data migration was successful. View the SBOM and VEX indexer logs, looking for the Reindexing all documents and Reindexing finished messages: Example USD oc logs bombastic-indexer -n USDNAMESPACE USD oc logs vexination-indexer -n USDNAMESPACE You will also see the following error messages: Error syncing index: Open("Schema error: 'An index exists but the schema does not match.'"), keeping old Error loading initial index: Open("Schema error: 'An index exists but the schema does not match.'") Because of this schema mismatch, the bombastic-collector and vexination-collector pods start the recollect containers to gather all the existing SBOM and VEX data. Both recollect-sbom and recollect-vex init-containers should complete and stop successfully. Once the migration finishes, you can see all your existing SBOM and VEX data in RHTPA console. Additional resources Values file template for Amazon Web Services (AWS) . Values file template for other service providers .

Commands:
login --token=TOKEN --server= SERVER_URL_AND_PORT
oc login --token=sha256~ZvFDBvoIYAbVECixS4-WmkN4RfnNd8Neh3y1WuiFPXC --server=https://example.com:6443
export NAMESPACE= RHTPA_NAMESPACE
export NAMESPACE=trusted_profile_analyzer
helm list -n USDNAMESPACE
helm uninstall redhat-trusted-profile-analyzer -n USDNAMESPACE
helm install redhat-trusted-profile-analyzer openshift-helm-charts/redhat-trusted-profile-analyzer -n USDNAMESPACE --values PATH_TO_VALUES_FILE --set-string appDomain=USDAPP_DOMAIN_URL
helm install redhat-trusted-profile-analyzer openshift-helm-charts/redhat-trusted-profile-analyzer -n USDNAMESPACE --values values-rhtpa.yaml --set-string appDomain=USDAPP_DOMAIN_URL
oc logs bombastic-indexer -n USDNAMESPACE oc logs vexination-indexer -n USDNAMESPACE
Error syncing index: Open("Schema error: 'An index exists but the schema does not match.'"), keeping old Error loading initial index: Open("Schema error: 'An index exists but the schema does not match.'")