Monday, 24 June 2013

EPM OPatch Automation (Patch Delivery System or PDS)

I have posted about this before but this solution is a lot more complete.

Basically you cannot fully automate the patch process for EPM due to the pre and post patching steps required that it is not possible to automate and the need to for each patch to applied the individual needs of each customer.

This script basically takes some of the work out of patching by simplifying the parts that do require manual labour.

For it to work extract the attached ZIP file. Then make sure all your patches are in one folder with each one having a "readme.html" file in the patch folder (that's not case sensitive but it must be called "readme.html" NOT "readme.htm" or "readme.doc").

Next you must populate some files for each machine that needs patching. Some examples are in the ZIP. The first is, in the same folder as "patch_package.bat", to create a file with the server name and then ".patchunc" at the end. If you aren't sure of the server name just enter echo %COMPUTERNAME% in a command prompt. Inside the file enter the UNC path to the folder where all of the patches are being held. In the example file the server's name is "server2" and the UNC path is "\\sharename\patches\q4_patches".

Next in the folder where the patches are create a file in the same manner as the ".patchunc" file, with the server name and then ".patches" at the end. In this file enter the patch numbers, exactly as they appear in the folder that the file is in. In the example above the file would be in the location shown below (i.e. directly below the "Patches" folder):

Then to apply the patches just run the "patch_package.bat" file on the server you want to patch. It will run through the list of patches you entered in the file, copying them to the OPatch folder, opening the readme for you to follow when applying the patch and then attempting to apply the patch. It will prompt you if the patch was successful or not and if you want to continue patching or try to apply the patch again.

The thought behind this is that it removes the need to copy files to the OPatch directory (though you can do that beforehand if you wish) and keep track of the readmes and which patch to apply to which server and in which order. You find the information out beforehand and populate the files appropriately. I have used it a few times and it does certainly save you some time, as well as saving you from some confusion too!

You can download these scripts, collectively called Patch Delivery System here.

No comments:

Post a Comment