Migrate your projects_root directoryMigrate your projects_root directoryYou can migrate your projects_root directory and configuration settings over to your new Klocwork installation by using the kwservice --migrate command. Typically, this process involves:
Before you beginWe recommend that you make a copy of your projects_root directory and migrate the copy. This way, users can continue to use Klocwork Static Code Analysis, though they should be instructed not to make any changes, such as changing an issue's status. To reduce the amount of time required for migration, we also strongly recommend that you delete unneeded projects and failed builds before migration, as detailed in the procedure that follows. If you do not use the default server settings, you will need to specify your custom settings prior to beginning the upgrade. Otherwise, during the installation these settings will revert back to the default settings. If you forget, you can always go in and change the settings for each of your environments after you have completed upgrading. To avoid losing issues, status changes or comments from the last release in your first Klocwork 2018.1 analysis run, make sure you read Before your first Klocwork 2018.1 integration build analysis. Tomcat server configuration: Klocwork Static Code Analysis's Tomcat server configuration (<projects_root>/tomcat/conf/server.template) will be backed up and replaced during migration. The backup file will be named server.template.bak or server.template.bak_X (where X is a number). If your server.template had modifications from the Klocwork Static Code Analysis defaults, you can copy them from the backup, ensuring that maxPostSize is set to -1, and re-start the Klocwork Static Code Analysis server.
Supported upgrade pathsFind your current version in the chart below and follow the appropriate upgrade path. If you need to upgrade from earlier versions of the product that aren't listed in the table below, use the import method. See Import your existing projects into a new projects_root for more information.
Interoperability between releasesTo take advantage of the latest improvements in Klocwork, we always recommend you upgrade your Server, Build, and Desktop Analysis plug-ins to the latest version of the product. Klocwork Server, Build and Desktop Analysis plug-ins are compatible within each major release, so you can use 2018 plug-ins with a version 2018.1 Klocwork Server. You can also use older build server tools with newer versions of the Klocwork Server, up to three minor releases back. For more information, see Cross-version support for builds.
Running two versions of the Klocwork ServersIf you will be running two sets of the Klocwork Servers, for example to test the Klocwork 2018.1 Servers while users continue to access your existing servers, you must run them on different projects_root directories (and set the ports appropriately). Prepare to upgradeFor details on starting and stopping the servers, see Starting the Klocwork Servers and Stopping the Klocwork Servers. To prepare to upgrade:
Install the Klocwork Server packageInstall the Klocwork 2018.1 Server package. For instructions, see Installing Klocwork. Validate your database (mandatory)dbvalidate is a tool that checks the consistency of data in your database. Running this tool is mandatory, so that any errors in your database can be corrected before you migrate or import. Use the version of the dbvalidate tool that matches your installed version of software. Note: The Database Server from your old installation must be running to validate the database. The Database Server is listed as a separate service from the Klocwork Server, so ensure that it is running.
Run the following command, for example:
java -jar <2018.1_server_install>/class/dbvalidate.jar --projects-root <projects_root>
where
Example java -jar /local/tools/klocwork/server/class/dbvalidate.jar --projects-root /local/tools/klocwork/server/projects_root The dbvalidate tool will report any errors between the "validation started" and "validation finished" lines: Wed Jun 01 07:53:58 CDT 2018 kw_central database (version: 95) validation started <detected errors appear here> Wed Jun 01 07:54:28 CDT 2018 Database validation finished.
Put your new license in the correct directoryIf you received a new license file from Customer Support, copy it to <projects_root>/licenses. Note: See Customizing licensing for information on licensing options.
Migrate your Klocwork dataTo migrate a projects_root, run the following command from <Klocwork_2018.1_Server_install>/bin: kwservice --projects-root <old_projects_root> start --migrate If the projects_root migrates successfully, the Klocwork Servers start on the port numbers picked up from the migrated projects_root. Notes:
If you customized configuration or metrics files
Notes
Test your upgradeEnsure that you can see your projects and builds in Klocwork Static Code Analysis. If you installed a new license file, ensure that it was installed correctly by checking that the number of licenses is correct. Upgrade all Desktop Analysis plug-insEnsure that all Klocwork plug-ins are upgraded to Klocwork 2018.1. Your users can reinstall their Klocwork Desktop Analysis plug-ins themselves by downloading the appropriate plug-ins from the Klocwork portal once it is up and running. See Downloading and deploying the desktop analysis plug-ins for instructions on how to download and deploy the plug-ins to the server.
Note: When upgrading to the Klocwork extension for Visual Studio, any analysis results data generated from the previous version of the plug-in will be removed. Therefore, any local defect citation information not already synchronized with the server will be lost. You can re-analyze your solution(s) to get the analysis results with the new plug-in.
Repeat upgrade steps on other projects_root directoriesTo migrate another projects_root, carry out the steps in this chapter again (except for installing Klocwork). Summary of upgrade steps for second or later projects_root directory:
Before your first integration build analysis using Klocwork 2018.1New releases of Klocwork normally have changes to the checker configuration to keep up with current events and respond to customer requests. These changes may mean that your checker configuration from the previous release isn't the same in the new release. Make sure that you have the right checkers enabled to match your old configuration. See What's New for a list of updated checkers, then make any changes to your checker configuration. After you're satisfied with your configuration, perform your first Klocwork 2018.1 integration build analysis on unmodified source code. Note: If you've already run your first Klocwork
2018.1 analysis and you're missing some issues or status changes, delete that build, reconfigure your checkers, and run a new analysis.
We recommend running your final pre-upgrade integration build analysis and your first Klocwork 2018.1 analysis on identical source code, and then comparing the two builds. This allows you to assess changes in the analysis engine. For details on improved, added, and removed checkers in this version, see What's New. |