cancel
Showing results for 
Search instead for 
Did you mean: 

FlexNet Code Insight (Palamida) 6.11.3 Upgrade Guide

FlexNet Code Insight (Palamida) 6.11.3 Upgrade Guide

Summary

This article provides the requirements and instructions to upgrade FlexNet Code Insight (Palamida) to 6.10.3.

Synopsis

This guide is for upgrading the FlexNet Code Insight (Palamida) application. For Compliance Library upgrades, Compliance Library Upgrade Guide.

This guide is for upgrading to FlexNet Code Insight (Palamida) 6.11.3 only. For new installations, see the Install SysAdmin Guide include with the product.


IMPORTANT:

Do NOT perform an upgrade on a production server unless you are an experienced FlexNet Code Insight administrator.

It is highly recommended that you contact Flexera Software Support to assist you with the upgrade.

It is your responsibility to ensure the integrity and reliability of backups. Always test and verify backups, and maintain redundant offsite copies.

Flexera Software is not responsible for data loss due to corrupt or missing backups.


Discussion

Requirements

You must have one of these previous versions to use this guide:

6.11.1, 6.11.2, 6.10.0, 6.8.1, 6.8.0, 6.6.2, 6.6.1, 6.1.4, 6.1.3, 6.1.2, 6.1.1, 6.1.0, 6.0.5, 6.0.2, 5.2.4, 5.2.2

You will need the following to perform the upgrade:

  • The plain text database password for the user and database defined in core.db.properties.

  • You will need to run an Electronic Update as the final step in the upgrade. The core server must have outgoing Internet access on port 22, otherwise you will need to run the Electronic Update manually.

  • You will need enough free disk space to perform backups. Check the size of your workspaces directory, which may be large.

  • The FlexNet Code Insight 6.11.3 distribution zip file. Contact your Flexera representative if you do not have a copy.

  • The migrationImport.groovy script, located in /scriptRunner/scripts/ of your 6.11.3 application directory. This script copies the properties and configurations from your existing application directory (OLD_DIR) to the new application directory (NEW_DIR) and notifies you of any additional steps needed

  • The migrate.sh / migrate.bat script, located in /scriptRunner/bin/ of your 6.11.3 application directory. This script migrates your existing database schema from the existing version of FNCI to the new version.

  • If you have any custom core reports, you will need to re-run the custom SQL scripts that you initially used to install them.

Prepare Environment

NOTE: The commands in this guide are written for Linux. Windows users may choose to perform the steps with a mouse. Be sure to replace the sample values below with those of your installation.

This guide makes reference to the following variables. You can set these variables on the server in order to paste the commands in this guide.

# Current installed version
OLD_VER="6.11.1"

# Current app directory.
OLD_DIR="/opt/CodeInsight/6.11.1"

# New app directory, which will be created.
NEW_DIR="/opt/CodeInsight/6.10.3"

# Base directory for backups (a 6.11.3 subdirectory will be created)
BACK_DIR="/opt/CodeInsight/backup"

# Core server only - MySQL Database info.
DB_HOST="localhost"
DB_NAME="CodeInsight"
DB_USER="myUser"
DB_PASS="myDbPassword"

# Scan servers only - Workspaces directory.
WS_DIR="/opt/CodeInsight/workspaces"

You can paste the above into a file on the server (for example /tmp/code_insight_env) and edit the values. Then you can run source /tmp/code_insight_env to set the variables used in this guide. After the upgrade is complete, be sure to rm /tmp/code_insight_env, if it contains the database password.

Upgrade FlexNet Code Insight

  1. Shutdown FlexNet Code Insight. For multi-server installs, shutdown all servers.

    cd $OLD_DIR/tomcat/bin
    ./shutdown.sh
  2. Backup the database. This step applies to CORE only.

    NOTE: These commands are for MySQL. If you are using Oracle, obtain a fresh backup from your DBA before proceeding. Make sure your DBA is available to restore the backup promptly, in case it is needed.

    mkdir -p $BACK_DIR/6.11.2
    cd $BACK_DIR/6.11.2
    mysqldump -h $DB_HOST -u "$DB_USER" --password="$DB_PASS" -r migration_db.sql $DB_NAME
  3. Backup workspaces directory. This step applies to all SCAN servers.

    NOTE: This may take a long time depending on the size of your workspaces directory.

    cd $WS_DIR
    tar cf $BACK_DIR/6.10.3/migration_ws.tar .
  4. Backup the installation directory.

    cd $OLD_DIR
    # clear the tomcat temp files
    rm -r tomcat/temp/*
    tar czf $BACK_DIR/6.10.3/migration_app.tgz .
  5. Extract the 6.11.3 distribution zip file (CodeInsight-6.11.3.zip) and move it to the new directory.

    unzip -q CodeInsight-6.11.3.zip -d /tmp
    mv /tmp/CodeInsight-6.11.3.zip $NEW_DIR
  6. Place the migration import script in the new directory, and run the script.

    
    cd $NEW_DIR/scriptRunner/bin
    ./scriptRunner.sh -n ../scripts/migrationImport.groovy $OLD_DIR
  7. Check the TODO log for any additional steps needed. Complete any necessary steps before continuing.

    cat $NEW_DIR/scriptRunner/log/migration.TODO.log
  8. Run the database schema migration. This step applies to CORE only.

    cd $NEW_DIR/scriptRunner/bin
    ./migrate.sh $OLD_VER

    If database errors are seen, please re-run the database schema migration after resolving the error.

  9. Run the new reports.sql to install new reports. Use the appropriate file according to your database vendor (MySQL in this example). This step applies to CORE only.

    Note: The reports.sql file will overwrite any modifications to the report tables in the database. If you have custom reports, you will need to re-run the custom SQL to install them after you have run the new reports.sql file. Make sure you have your custom SQL scripts before you run this.

    mysql -h $DB_HOST -u "$DB_USER" --password="$DB_PASS" -D $DB_NAME \
          -e "source $NEW_DIR/dbScripts/mysql/reports.sql"
  10. NOTE: FlexNet Code Insight 6.11.3 has features which requires a new Data Services Enabled key. You can continue to start and use the application with your existing key, but there will be errors seen with the features that require this key.

  11. Start the new FlexNet Code Insight application. For multi-server installs, do this after you have completed the previous steps on all servers.

    cd $NEW_DIR/tomcat/bin
    ./startup.sh && tail -f ../logs/catalina.out

    Check the log for any errors, and resolve them before continuing.

  12. Log into the WebUI and run the Electronic Update. This step applies to CORE only.

    NOTE: DO NOT SKIP THIS STEP.

    In most cases, the electronic update will be scheduled automatically. Check the Scheduler tab in the WebUI. If the update is not running, you can trigger it through Administration > Updates, and clicking Check for Electronic Update.

    If your installation does not have outgoing Internet access on port 22, you will need to run the update manually.

  13. If you face certificate errors on startup of the scan server or if you are unable to see your scan server from the application UI, then you will need to import the certificate being served by Tomcat on the scan server into the JDK of the core server.

Verify Upgrade

  1. Log into the WebUI and go to Help > About to verify the version.

  2. Create a test project and workspace.

  3. Ensure that the Detector client launches for the workspace.

  4. Close Detector and schedule a scan.

Revert to Previous Version

  1. Ensure the FlexNet Code Insight server is stopped. For multi-server installs, ensure all servers are stopped.

  2. Restore the database. This step applies to CORE only.

    NOTE: These commands are for MySQL. If you are using Oracle, have your DBA restore the backup.

    cd $BACK_DIR/6.10.0
    mysql -h "$DB_HOST" -u "$DB_USER" --password="$DB_PASS" -D "$DB_NAME" < db_migration.sql
  3. Restore workspaces backup. This step applies to all SCAN servers.

    NOTE: If you did not open, create, or scan any workspaces while the new version was running, you can skip this step.

    cd $WS_DIR
    tar xf $BACK_DIR/6.11.2/ws_migration.tar
  4. Start the previous installation. For multi-server installs, do this after you have completed the previous steps on all servers.

    cd $OLD_DIR/tomcat/bin
    ./startup.sh && tail -f ../logs/catalina.out
Labels (1)