Skip to main content

Migrating to HA Setup

Installations running on a single instance may be migrated to an HA deployment to take advantage of the benefits offered by high availability. This section covers the steps needed for migration.

We have tested and verified the functionality and performance of the IQ Server using the named third-party tools, technologies, and platforms mentioned in this section. Using other technologies and platforms may not result in the same outcomes, and are not supported.

Prerequisites

  1. Review the system requirements for high availability and installation depending on your target environment: AWS or on-premises

  2. Migrate to a PostgreSQL database if using the internal H2 database

  3. Upgrade to the latest version of IQ Server before beginning

Steps to Migrate to HA

Step 1: Stop all IQ Server processes

All IQ Server processes should be stopped, prior to migration, as the following steps require copying the existing server state.

Step 2: Backup your existing database

We recommend taking a current backup of your in-use IQ Server database. See Backing up the IQ Server.

Step 3: Prepare external database for HA

If you are not planning to use the existing PostgreSQL database for the new HA setup, you must clone/copy the existing database to the new PostgreSQL instance using PostgreSQL tools or utilities.

If you are planning to migrate a self-managed PostgreSQL database instance to Amazon RDS, we recommend using Amazon DMS.

Step 4: Transferring file system data

  1. During a first-time deployment, ensure that the cluster containing the pods for IQ Server, is correctly mapped to the database.

  2. Start the cluster and make sure it is up and running at the time of file transfer.

  3. Copy the directories (as shown in the table below) available from the existing /sonatype-work/clm-server directory to the cluster directory in your IQ Server HA setup. NOTE: Based on your specific configuration settings of IQ Server, you may not have all the directories specified.

  4. By default, the cluster directory is mapped to /sonatype-work/clm-cluster directory in each IQ pod. This directory is a network file system area mounted on each pod and is shared by each pod in the cluster. Use the kubectl cp command to copy the above assets into the /sonatype-work/clm-cluster directory in any one pod. These will be visible to all the pods in the cluster.

The cluster directory, once set, should store the following:

Directories containing

Path in cluster directory

Scan files

.../clusterDirectory/scan/…

Report files

.../clusterDirectory/report/…

Component details JSON files

.../clusterDirectory/componentDetails/…

Organization icons

.../clusterDirectory/data/organization/…

Application icons

.../clusterDirectory/data/application/…

Advanced Search index

.../clusterDirectory/search/…

CIP audit JSON files

.../clusterDirectory/audit/…

Trash files

.../clusterDirectory/trash/...

After the files are copied, the subdirectory layout of the cluster directory should be the same as it was in the /sonatype-work/clm-server directory in the original IQ installation. For example, /sonatype-work/clm-server/report should be located at /sonatype-work/clm-cluster/report.

It is not necessary to redeploy the cluster after file transfer. The files will be accessible to the cluster right away.

Step 5: Configuration updates (optional)

If the base URL for the cluster is different from the original installation, update using the Configuration REST API