April 2008 Archives

Simplify Installation of Critical Fixes

| | Comments (0)
Another day, another critical fix. I think the profusion of critical fixes (CFs) from BEA's ALUI support group is a good thing actually because it indicates that they're really working to solve customer problems. Never mind that it also represents that the products have bugs, because all software does.

A CF usually consists of a readme file and one or two DLLs or JARs. The readme describes the issues addressed by the fix and includes instructions on how to install it. The instructions though often have several steps. You can avoid manually doing this work though. Consider these instructions I recently received that are typical:

         
This Critical-Fix is for AquaLogic Interaction 6.1 MP1 Patch 1. This Critical-Fix must be applied to machines that host the AquaLogic Interaction Portal.

To install the Critical-Fix:

  1. Shutdown the Application Server (IIS Admin Service).
  2. Backup the original version of the following files:
      Filename Location
      portaluiinfrastructure.dll %PT_HOME%\ptportal\6.1\webapp\portal\web\bin
      portaluiinfrastructure.dll %PT_HOME%\ptportal\6.1\bin\assemblies
    Note: BEA Systems recommends that you backup original files in a zip file to preserve path information and then save the zip file to a backup folder under the %PT_HOME% folder.
  3. Unzip the AquaLogicInteraction_6.1.1.325722.zip zip file onto the %PT_HOME% folder. Be sure to select the "Use folder names" option to expand all the files into the proper subfolders under the %PT_HOME% root.
  4. Restart the Application Server (IIS).

I am reluctant to use those steps for several reasons:

  • In a large enterprise environment, it's can be tedious to follow those many steps on every portal server in every dev, test, and prod environment. The task grows if you have a few critical fixes that apply to your environment.
  • Often time is of the essence, and anything that can save a minute or two during a system change window is worth doing.
  • Every manual step opens the possibility of variance and error. This is even more of an issue during a late-night maintenance window when people's mental acuity can slide.
  • Often system administrators process requests at their own pace, and I am not there to watch them install a CF. I'm less confident things are installed properly if they have several steps.

I am sure many others would agree with these reservations. So what can we do? Wrap the CF up in a batch file that does all the steps and logs it to a central location. What I do is create a folder on a network share that contains the CF documentation, the CF JARs or DLLs, and a batch file with a name like "install-cf-300253.bat." The batch file looks something like this:

set path_of_new_file="\\fileshare\alui\AquaLogicInteraction_6.1.1.316478"
set cfversion=6.1.1.316478
set logfile=%path_of_new_file%\ran.%cfversion%.%COMPUTERNAME%.log
set aluihome=i:\apps\plumtree
set servicename="w3svc"

@echo on
echo ----------- %date% %time% :: Begin install >> %logfile%
net stop %servicename% >> %logfile%


set thelib=openhttp.dll
echo Backing up previous %thelib% (2 locations)... >> %logfile%
move %aluihome%\ptportal\6.1\bin\assemblies\%thelib% %aluihome%\ptportal\6.1\bin\assemblies\pre.cf_%cfversion%.%thelib%.old   >> %logfile%
move %aluihome%\ptportal\6.1\webapp\portal\web\bin\%thelib% %aluihome%\ptportal\6.1\webapp\portal\web\bin\pre.cf_%cfversion%.%thelib%.old  >> %logfile%
echo Copying in new %thelib% (2 locations)... >> %logfile%
copy %path_of_new_file%\%thelib% %aluihome%\ptportal\6.1\bin\assemblies\%thelib% >> %logfile%
copy %path_of_new_file%\%thelib% %aluihome%\ptportal\6.1\webapp\portal\web\bin\%thelib% >> %logfile%


net start %servicename%  >> %logfile%

@echo off
pause

Then instead of giving the server administrator a long list of instructions, or instead of having error-prone steps on my list of late-night upgrade activities, I just say:

          Open each portal server, and paste the following into the Start->Run window:

\\fileshare\alui\AquaLogicInteraction_6.1.1.316478\install-cf-316478.bat

The script stops the service, backs up the necessary files, copies in the new ones, starts the service again, and logs all this activity to my central fileshare for easy auditing.

It's also easy to adapt this batch file for other CFs. When the CF has more than one DLL or JAR, for example, you can copy the block that begins with "set thelib=openhttp.dll" and modify the library you need. You do the same with the service name (perhaps you are working with the Automation server or Analytics).

Enjoy.