======================
###How to Install * Download and unzip the "UpgradeService" module in "MasterInstall/modules/seat/" folder.
###Variables The following bulit-in variables are provided to all scripts. These variables can be accesses and used by any of the scripts.
Provided Variable Name | Of Type |
---|---|
workbenchApp | WorkbenchApp |
gui | WorkbenchGui |
module | Module |
warnings | ArrayList<String> |
criticals | ArrayList<String> |
workbenchApp - This is a WorkbenchApp object.
gui - This is a WorkbenchGui object. This Gui component can be used for any gui purposes.
module - This is the Module object.
warnings - Add warning messages to this arraylist. All warning messages will be shown in a warning message pop-up gui.
criticals - Add critical/fatal messages to this arraylist. All critial messages will be shown in a critical message pop-up gui.
###Configuration The following configurations will be performed by the developers and no action is needed by the production personnel. On the other hand, the developers must complete these configurations, as appropriate, for the successfull running of this module.
upgradeTo - The upgrade to release number. Example: "4.4.10" for any Upgrade Service module engaged to upgrade a client install from 4.4.8 to 4.4.10 code base.
system/resources/AdditionalModulesToDownload.xml:
Scripts: There are five scripting hooks in place. These scripts are executed by five separate actions. It will be the task of the developers' to write and put these scripts in place to the path described. Following is the list of scripting hooks and the folders they need to be placed to be able to execute:
Pre-upgrade diagnostic action scripts - Place all the pre-upgrade diagnostic related scripts in the "modules/seat/UpgradeService/system/scripts/Before Upgrade/diagnostic/ReleaseNumber/ModuleName" folder where "ReleaseNumber" represents the point release number folder (example: "4.4.10.6") and the "ModuleName" can be the module name or any name (example: "Staker" for Field Designer related scripts, "AMP" for AMP upgrade related scripts)
Pre-upgrade Fix-it action scripts - Place all the pre-upgrade fix-it related scripts in the "modules/seat/UpgradeService/system/scripts/Before Upgrade/Fixit/ReleaseNumber/ModuleName" folder where "ReleaseNumber" represents the point release number folder (example: "4.4.10.6") and the "ModuleName" can be the module name or any name (example: "Staker" for Field Designer related scripts, "AMP" for AMP upgrade related scripts)
Scripted configuration changes action - If you want to automate any post upgrade configuration changes with scripts, place the scripts in the "modules/seat/UpgradeService/system/scripts/After Upgrade/AutomatedConfigurationChanges/ReleaseNumber/ModuleName" folder where "ReleaseNumber" represents the point release number folder (example: "4.4.10.6") and the "ModuleName" can be the module name or any name (example: "Staker" for Field Designer related scripts, "AMP" for AMP upgrade related scripts). All the scripts place in these folders will be run when the "Run scripted configuration changes" action will be clicked by the user.
Post-upgrade diagnostic action scripts - Place all the post upgrade diagnostic related scripts in the "modules/seat/UpgradeService/system/scripts/After Upgrade/Diagnostic/ReleaseNumber/ModuleName" folder where "ReleaseNumber" represents the point release number folder (example: "4.4.10.6") and the "ModuleName" can be the module name or any name (example: "Staker" for Field Designer related scripts, "AMP" for AMP upgrade related scripts)
Post-upgrade fix-it action scripts - Place all the post upgrade fix-it related scripts in the "modules/seat/UpgradeService/system/scripts/After Upgrade/Fixit/ReleaseNumber/ModuleName" folder where "ReleaseNumber" represents the point release number folder (example: "4.4.10.6") and the "ModuleName" can be the module name or any name (example: "Staker" for Field Designer related scripts, "AMP" for AMP upgrade related scripts)
Important: The "ReleaseNumber" folder must be of "x.x.x.x" format where "x" represents integer number. This is to be able to run the scripts based on increasing order of the releases. This means all scripts under "4.4.10.2" will be run prior to all scripts belongs to "4.4.10.4".
FolderIndex.csv - This file is an optional configuration item. In normal circumstances this file is not needed and will not be present. Rare cases when the low-to-high release sort order of the release number folders must be overwritten, create and place this csv file in any of the five folders. List the release number folder names under the "folderName" column in the order you want the scripts to be run.
This means, if you list "4.4.10.6", "4.4.10.2", and "4.4.10.4" in the "FolderIndex.csv" file under the "folderName" column in this file. Then, place this file in the "system/scripts/After Upgrade/Fixit" folder. When the "Run post-upgrade fix-it" action will be clicked, it will execute all the post upgrade fix it scripts in "4.4.10.6" first, then in "4.4.10.2", and finally in "4.4.10.4" folder accordingly.
ScriptIndex.csv - The file is an optional configuration as well and not present in the standard install. The main purpose of this file is to run the scripts in a folder in pre-defined order other than alphanumeric sort order it runs without this file. Create a .csv file and name it "ScriptIndex.csv". List all the scripts with extension (i.e. .groovy, .bsh etc.) under the column "scriptName". Place this file in the same folder where the scripts are. And, the module will run the scripts in the order they are listed.
Example: There are three scripts in the "AMP" folder. These scripts are Test1.groovy, Test2.groovy, and Test3.groovy. If we create the "ScriptIndex.csv" file and list as Test3.groovy, Test2.groovy, Test1.groovy under the "scriptName" column. The scripts will be run in the same order as they are listed.
###Run Location The "UpgradeService" module runs in the workbench launch by "MasterInstall/os/windows/programs/Workbench.bat" file. It runs within "MasterInstall" and the module files located under "MasterInstall/modules/seat/" folder.
Figure #1: Pre upgrade diagnostic scripts within the "4.4.10.4/Inspection" folder
will be run after it runs scripts in the 4.4.10 and 4.4.10.0 folder.
Figure #2: Pre upgrade diagnostic scripts. It maintains
the point releases' lower-to-higher sort order to run the scripts.
Figure #3: Post upgrade diagnostic and fixit folders
Figure #4: Post upgrade diagnostic scripts