Skip to main content

Migrating to HA Setup

Overview

Existing workloads of IQ Servers running in the traditional non-HA mode can be migrated to HA setups to take advantage of the benefits offered by high availability. This section covers detailed steps for migrating to HA setup.

We have thoroughly tested and verified the functionality and performance of the Sonatype IQ Server with the named third-party tools, technologies, and platforms mentioned in this section. Using other equivalent technologies and platforms may not result in the exact same outcomes, and is not supported by Sonatype.

Prerequisites

  1. Check general system requirements for HA and installation requirements on AWS or on-premises (depending on your target deployment).

  2. If your existing installation does not include an external database (PostgreSQL) for IQ Server, migrate your existing database to a PostgreSQL instance.

  3. Check your current IQ Server version. We recommend upgrading to version 152 or above, for the best results.

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-serverdirectory to the clusterDirectory in your IQ Server HA setup. NOTE: Based on your specific configuration settings of IQ Server, you may not have all the directories specified here. Please copy the ones that are available.

  4. By default, the clusterDirectory 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 clusterDirectory should be the same as it was in the / sonatype-work/clm-serverdirectory in the original IQ installation. For example, / sonatype-work/clm-server/reportshould be located at /sonatype-work/clm-cluster/report.

It is not necessary to re-deploy the cluster after file transfer. The files will be accessible to the cluster instantaneously.

Step 5: Configuration updates (optional)

If the baseUrl for the cluster is different from the original installation, then you can use the Configuration REST API to update it.