A.4 Setup Compliance Studio Instance for Cloning the Filesystem

This section describes the process of cloning files from the Compliance Studio’s Primary server to the Compliance Studio’s Secondary server for the purpose of disaster recovery.

For more information about disaster recovery, see the Setup Disaster Recovery (DR) in Compliance Studio section in the OFS Compliance Studio Architecture Guide.

Prerequisites

  • OpenSearch should be installed in the Secondary server.

    Note:

    The following prerequisites are applicable for the case where Database schemas (for example: Studio Schema, ECM/BD Atomic Schema, and Graph Schema) are cloned in a different database.
  • Create a wallet for the Secondary Database. To create a wallet, see the Setup the Password Stores for Database User Accounts section.
  • Add Secondary database credentials in the wallet.
  • ER/FSDF Schema, Atomic Schema, Studio Schema, and Graph Schema names should be the same as the Primary Database.

Cloning Process

Note:

The Incremental file system changes from the Active Compliance Studio server should be synced/reflected in all the fail over Compliance Studio servers as well.

To clone files in the Compliance Studio, follow these steps:

  1. Zip the OFS_COMPLIANCE_STUDIO and Logstash-<version> directories from the Compliance Studio’s Primary Server.

    Note:

    The Logstash for OpenSearch is different, so based on the configuration the respective logstash should be configured. Logstash version depends on the OpenSearch version.
  2. To zip those directories, execute the following command.
    zip -r <DIRECTORY_NAME>.zip <DIRECTORY_NAME>

    For example, zip -r OFS_COMPLIANCE_STUDIO.zip OFS_COMPLIANCE_STUDIO

  3. Copy the zip file into the Compliance Studio’s Secondary server.
  4. Unzip the file from the Compliance Studio’s Secondary server by executing the following command.
    unzip -a <zip_file_name>.zip

Cloning OpenSearch

To clone the OpenSearch, follow these steps:

  1. Copy the folder “data” from this <OS_Installation_Path>/opensearch-<version> directory in the OpenSearch’s Primary server.

    Where <OS_Installation_Path> refers to OpenSearch installed path.

  2. Place the copied “data” folder into <OS_Installation_Path>/opensearch-<version> directory of the OpenSearch’s Secondary server.

If HTTPS and AUTH are enabled for OpenSearch, then follow these steps:

  1. To generate ca.crt file in the OpenSearch’s Secondary server, execute the following command.
    openssl x509 -outform der -in <path to/admin.pem> -out ca.crt
  2. Copy ca.crt file from OpenSearch’s Secondary server and place in the <COMPLIANCE_STUDIO_INSTALLATION_PATH>/logstash/config directory.
  3. To generate admin.p12 file in the OpenSearch’s Secondary server, execute the following command.
    openssl pkcs12 -export -out admin.p12 -inkey <path to/admin-key.pem> -in <path to/admin.pem>
  4. Copy admin.p12 file and place it in the following directories of the Compliance Studio’s server.
    <COMPLIANCE_STUDIO_INSTALLATION_PATH>/load-to-open-search/conf
    <COMPLIANCE_STUDIO_INSTALLATION_PATH>/deployed/load-to-open-search/conf
    <COMPLIANCE_STUDIO_INSTALLATION_PATH>/matching-service/conf
    <COMPLIANCE_STUDIO_INSTALLATION_PATH>/deployed/matching-service/conf

Cloning PGX Service

Note:

This section is applicable only for Graph use case.

To clone the PGX service, follow these steps:

  1. Copy the studio_server.p12 file from <COMPLIANCE_STUDIO_INSTALLATION_PATH>/ mmg-studio/conf directory of the Compliance Studio’s Primary server and place it to the <COMPLIANCE_STUDIO_INSTALLATION_PATH>/pgx-server/conf directory in the Compliance Studio’s Secondary server.
  2. Generate the graph-keystore.p12 file for PGX’s Secondary server. To generate graph- keystore.p12 file , see the Generate the graph-keystore.p12 File section.
  3. Navigate to the <PGX_HOME>/pgx/pgx-server/bin directory.
  4. Open the config.sh file and update the following parameter.

    GRAPH_SERVICE_URL=##SECONDARY_GRAPH_SERVICE_URL##

    GRAPH_KEYSTORE_PASSWORD=##SECONDARY_GRAPH_KEYSTORE_PASSWORD##

    The path where the pgx-server-<version>.zip file is unzipped and it is referred to as <PGX_HOME>. For more information, see the Configure the PGX Service section.

  5. To reinstall the PGX service, execute the following command.
    ./pgx-server --update

    (OR)

    ./pgx-server -u
  6. To start the PGX service, execute the following command.
    ./pgx-server --start

    (OR)

    ./pgx-server -s

Cloning Conda Environment

To clone Conda environment, follow these steps:

  1. Zip the miniconda directory from the Compliance Studio’s Primary Server.
  2. To zip the directory, execute the following command.
    zip -r <DIRECTORY_NAME>.zip <DIRECTORY_NAME>

    For example, zip -r OFS_MINICONDA_INSTALLATION.zip MINICONDA_INSTALLATION

  3. Copy the zip file into the Compliance Studio’s Secondary server.
  4. Unzip the miniconda file from the Compliance Studio’s Secondary server using the following command.
    unzip -a <zip_file_name>.zip

Configure Wallet

Copy wallet from Primary server to Secondary server when database schemas are same between the servers.

If the database schemas are different, you have to create a new wallet for Secondary server. To create a wallet, see the Setup Password Stores with Oracle Wallet section.

Note:

Open the sqlnet.ora file in the wallet location and update the path with wallet location path of the Secondary server.

Generate SSL Certificate

If SSL certificate generated in the Primary server is exclusive to that server only, then a new certificate has to be generated for the Secondary server.

To generate SSL certificate, see the Generate Compliance Studio Server SSL Configuration section.

Configuring config.sh File

To configure the config.sh file, follow these steps:

  1. Navigate to the <COMPLIANCE_STUDIO_INSTALLATION_PATH>/bin directory in Compliance Studio’s Secondary server.
  2. Open the config.sh file and update parameters as mentioned in the following table.

    Note:

    For the parameter description, see the section.

    Table A-3 Parameter and its Values in Config.sh File

    Parameter Placeholder Value
    COMPLIANCE_STUDIO_INSTALLATION_PATH ##SECONDARY_COMPLIANCE_STUDIO_PATH##

    Note: If the OFS_COMPLIANCE_STUDIO path is same in the Compliance Studio’s Primary and Secondary Servers, then this parameter need not be changed.

    MINICONDA_INSTALLATION_HOME

    ##SECONDARY_MINICONDA_INSTALLATION_ PATH##

    Note: If miniconda path is different between Primary and Secondary servers, open the config.sh file and update the MINICONDA_INSTALLATION_HOME with the path in the Secondary server.

    LOGSTASH_HOME ##SECONDARY_LOGSTASH_HOME##
    LD_LIBRARY_PATH ##SECONDARY_LD_LIBRARY_PATH##
    SSL Configuration -
    STUDIO_SERVER_SSL_ALIAS ##SECONDARY_STUDIO_SERVER_SSL_ALIAS##
    DB Details of Studio Schema

    Note: This parameter is applicable when Database schemas are cloned to the different databases.

    -
    STUDIO_DB_HOSTNAME ## SECONDARY_STUDIO_DB_HOSTNAME ##
    STUDIO_DB_PORT ## SECONDARY_STUDIO_DB_PORT##
    STUDIO_DB_SERVICE_NAME ## SECONDARY_STUDIO_DB_SERVICE_NAME##
    STUDIO_DB_SID ## SECONDARY_STUDIO_DB_SID##
    STUDIO_DB_USERNAME ## SECONDARY_STUDIO_DB_USERNAME##
    DB Details of Atomic Schema

    Note: This parameter is applicable when Database schemas are cloned to the different databases.

    -
    ATOMIC_DB_HOSTNAME ## SECONDARY_ATOMIC_DB_HOSTNAME##
    ATOMIC_DB_PORT ## SECONDARY_STUDIO_DB_PORT##
    ATOMIC_DB_SERVICE_NAME ## SECONDARY ATOMIC_DB_SERVICE_NAME ##
    ATOMIC_DB_SID ## SECONDARY_ATOMIC_DB_SID##
    ATOMIC_DB_USERNAME ## SECONDARY_ATOMIC_DB_USERNAME##

    Graph Schema Configuration

    Note: This parameter is applicable when Database schemas are cloned to the different databases.

    -
    GRAPH_DB_SERVER_NAME ## SECONDARY_GRAPH_DB_SERVER_NAME##
    GRAPH_DB_PORT ## SECONDARY_GRAPH_DB_PORT##
    GRAPH_DB_SERVICE_NAME ## SECONDARY_GRAPH_DB_SERVICE_NAME##
    GRAPH_KEYSTORE_PASSWORD ## SECONDARY_GRAPH_KEYSTORE_PASSWORD##
    GRAPH_SCHEMA_DB_SCHEMA_NAME ##SECONDARY_GRAPH_SCHEMA_DB_SCHEMA_NAME# #
    GRAPH_SCHEMA_WALLET_ALIAS ## SECONDARY_GRAPH_SCHEMA_WALLET_ALIAS##

    Wallet Details

    Note: This parameter is applicable when Database schemas are cloned to the different databases.

    OR

    If the filesystem of the secondary server has a different folder structure than the Primary server.

    -
    WALLET_LOCATION ##WALLET_PATH_CONTAINING_SECONDARY_DB_CREDENTIALS##
    TNS_ADMIN_PATH ##TNS_ADMIN_PATH_CONTAINING_SECONDARY_DB_CREDENTIALS##
    GRAPH_SCHEMA_WALLET_LOCATION ##GRAPH_SCHEMA_WALLET_PATH_CONTAINING_SECONDARY_DB_CREDENTIALS##
    GRAPH_SCHEMA_TNS_ADMIN_PATH ##GRAPH_SCHEMA_TNS_ADMIN_PATH_CONTAINING_SECONDARY_DB_CREDENTIALS##
    Service Urls -
    PGX_SERVER_URL ##SECONDARY_PGX_SERVER_URL##
  3. Add Secondary Database credentials in the wallet. To add credentials, see the Setup the Password Stores for Database User Accounts section.
  4. In Studio Schema, delete the following row from the DATABASECHANGELOG table.

    author = 'Compliance Studio 8.1.3.0' and id = 'FCC_DATASTUDIO_CONFIG_8130'

  5. Navigate to the <COMPLIANCE_STUDIO_INSTALLATION_PATH>/bin directory.
  6. Reinstall Compliance Studio’s Secondary Server. To reinstall, execute the following command.
    ./compliance-studio.sh --update

    (OR)

    ./compliance-studio.sh -u
  7. Start Compliance Studio’s Secondary Server. To start, execute the following command.
    ./compliance-studio.sh --start
  8. Navigate to the <COMPLIANCE_STUDIO_INSTALLATION_PATH>/deployed/ficdb/confdirectory.
  9. Open the resources.xml file and update the following details for ER/FSDF schema.
    Example,
    <Resource
    id="##ER_DATA_SCHEMA_ALIAS_NAME##"
    name="jdbc/erdataschema"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.OracleDriver"
    url="jdbc:oracle:thin:@##ER_DATA_SCHEMA_ALIAS_NAME##"
    connectionProperties="oracle.net.wallet_location=/scratch/fccstudio/CS81300_CS_Cloning_0204/compStudio_02040741/OFS_COMPLIANCE_STUDIO/wallet;oracle.net.tns_admin=/scratch/fccstudio/CS81300_CS_Cloning_0204/compStudio_02040741/OFS_COMPLIANCE_STUDIO/wallet;"
    maxTotal="20"
    maxIdle="0"
    maxWaitMillis="-1">
    </Resource>