Introduction
The process of upgrading to CAST AIP 8.2.x is described in detail in Upgrading to CAST AIP 8.2.x. This process relies heavily on the GUI of the various tools and software involved, however it is possible to automate most of the upgrade tasks. This page of documentation therefore provides an explanation of how to automate the process of upgrading to CAST AIP 8.2.x using the CLI (command line interface) of the various tools involved.
Workflow
This guide uses the same workflow as described in Upgrading to CAST AIP 8.2.x (click to enlarge). It is possible to automate the first and third steps (marked in red in the image below) - this guide will concentrate on those steps.
In this section:
Target audience:
- CAST administrators
Step 1: Prepare the upgrade
Backup existing schemas on CAST Storage Service 2
Before starting the upgrade, CAST strongly recommends that any existing analysis and result data from previous releases of CAST AIP is backed up. You can automate the backup of any schemas you intend to upgrade and that are hosted on a CAST Storage Service 2 using the CLI based CSSBackup or CSSBackupAll tools. See Appendix - CAST Storage Service maintenance activities for more information.
Examples
To backup one schema (repeat for each schema you would like to backup):
CSSBackup.exe -schema <schema_name> -password <CSS_Operator_password> -file <path_and_name_of_backup_file.cssdmp> -log <path_and_name_of_log_file.log>
To backup all schemas hosted on the CAST Storage Service 2:
CSSBackupAll.exe -password <CSS_Operator_password> -dumpdir <path_to_the_dump_folder> -log <path_and_name_of_log_file.log>
Step 2: Update process
CAST Update Tool upgrade process without extensions in CLI mode
To perform the CAST Update Tool (CUT) upgrade in CLI mode, use CUT-CLI.exe located at the root of your new CAST AIP installation (i.e the installation you are upgrading to) use the following command line (please see Automating CAST Update Tool tasks for more information about the CLI options):
CUT-CLI.exe -productInstallationDir "C:\Program Files\CAST\<version>" -pmxFileLocation "%APPDATA%\CAST\CAST\<version>\cast-ms.connectionProfiles.pmx" -assessmentModelUpgrade <choose option> -y -logfile "D:\CUT-CLI.castlog2"
You must choose a parameter for the -assessmentModelUpgrade option depending on your requirements. Please see Automating CAST Update Tool tasks for more information.
This command line will:
- run the upgrade using the cast-ms.connectionProfiles.pmx file located in the %APPDATA%\CAST\CAST\<version> folder
- ALL CAST Management Services schemas declared in the cast-ms.connectionProfiles.pmx (together with their associated Analysis and Dashboard Service schemas) will be upgraded!
- the CAST Assessment Model will undergo the chosen upgrade process
- the use of the -y option will force you to interact with a decision prompt to start the upgrade process
- output the process to a log file.
When complete, please ensure you Validate the CAST Upgrade Tool execution to check additional logs generated by the CLI process.
CAST Update Tool upgrade process with extensions in CLI mode
Run the upgrade in CLI mode using the "retain" option
See Automating CAST Update Tool tasks for more information about the CAST Update Tool (CUT) CLI options.
CUT-CLI.exe -productInstallationDir "C:\Program Files\CAST\<version>" -pmxFileLocation "%APPDATA%\CAST\CAST\<version>\cast-ms.connectionProfiles.pmx" -assessmentModelUpgrade retain -y -logfile "D:\CUT-CLI.castlog2"
This command line will:
- run the upgrade using the cast-ms.connectionProfiles.pmx file located in the %APPDATA%\CAST\CAST\<version> folder
- ALL CAST Management Services schemas declared in the cast-ms.connectionProfiles.pmx (together with their associated Analysis and Dashboard Service schemas) will be upgraded!
- the CAST Assessment Model will NOT undergo any upgrade process at all and will be left exactly as it was in the previous release of CAST AIP
- the use of the -y option will force you to interact with a decision prompt to start the upgrade process
- output the process to a log file.
from your new installation of CAST AIP in CLI mode:
SERVMAN.EXE -INSTALL_CONFIG_FILE ("path_to_xml_file") -LOG(path_to_castlog,IMMEDIATE)
<?xml version="1.0" encoding="ISO-8859-1"?> <CAST-AutomaticInstall> <ServerInstall ProfileSystem="<name>" ServerType="CASTStorageService" UserSystem="operator" SystemPassword="CastAIP" ConnectionString="LIBPQ:<server_name>:2280" > <InstallDatabase DbName="<analysis_service_database_name>" > <!-- Extensions: install a specific version --> <Plugin id="com.castsoftware.angularjs" version="1.3.0-funcrel"/> <!-- Extensions: install most recent that has been downloaded --> <!-- <Plugin id="com.castsoftware.html5"/> --> <!-- Extensions: automatically install any required dependencies, using the most recent version that has been downloaded --> <InstallDependencies strategy="TakeLatest"/> <!-- Extensions: prevents installation from the legacy %programdata%\CAST\CAST\<version> location --> <SkipLookupLegacyUADefaultLocation/> </InstallDatabase> </ServerInstall> </CAST-AutomaticInstall>
Run the Assessment Model upgrade in CLI mode
Update process for CAST Measurement Service (CAST Server Manager)
- when migrating from CAST AIP 8.2.0 (baseline) to a Service Pack or between CAST AIP 8.2.x Service Packs, this CAST schema does NOT require an update and you can SKIP this section.
- CAST Server Manager must not be used for updating Management, Analysis and Dashboard Services
Run the CLI as follows, ensuring that the -UPGRADE switch is used:
SERVMAN.EXE -INSTALL_CONFIG_FILE ("path_to_xml_file") -UPGRADE -LOG(c:\log.castlog, -IMMEDIATE)
The XML file specified in the -INSTALL_CONFIG_FILE option should take the following form:
<?xml version="1.0" encoding="ISO-8859-1"?> <CAST-AutomaticInstall> <!-- Use either ServerName= or ConnectionString= --> <!-- <ServerInstall ProfileSystem="PROFILE_NAME" ServerType="CASTStorageService" UserSystem="operator" SystemPassword="CastAIP" ServerName="CEIRIAD:2280" > --> <ServerInstall ProfileSystem="PROFILE_NAME" ServerType="CASTStorageService" UserSystem="operator" SystemPassword="CastAIP" ConnectionString="LIBPQ:CEIRIAD:2280" > <InstallDatabase DbName="DB_NAME" > <PackName >AAD_MAIN</PackName> </InstallDatabase> </ServerInstall> </CAST-AutomaticInstall>