Thursday, October 11, 2012

The Final Furlong - Installing WebSphere Application Server 8.5 on a remote Linux server via Job Manager

This is the final ( for now ) instalment of my series covering the remote installation and management of WebSphere Application Server 8.5 using the Job Manager service that was introduced in WAS 7.0 in 2010.

Following on from the last two posts: -

I now have IBM Installation Manager (IIM) installed and configured on my remote server.

I've also used the IBM Packaging Utility: -

to create a repository ( located on the server that's hosting Job Manager ), containing the WAS 8.5 

Initially, I was going to use the submitCommand task within Job Manager to have the remote server execute a shell script ( install_WAS_via_HTTP.sh ) which would drive IIM to install WAS 8.5 using a response file ( installWAS85_via_HTTP.rsp ).

However, I found an even more elegant solution - the manageOfferings task - which avoids the need to deploy any files to the remote box .... or so I now know :-)

So I decided to dispense with the Job Manager GUI, and instead submit the manageOfferings task via wsadmin as follows: -

$ cd 
./wsadmin.sh -lang jython -user wasadmin -password passw0rd
wsadmin> AdminTask.submitJob ('-jobType manageOfferings -targetList rhel6.uk.ibm.com -username wasadmin -password passw0rd -jobParams [ [responseFile /tmp/installWAS85_via_HTTP.rsp] [acceptLicense TRUE] [IMPath /opt/IBM/InstallationManager] ]')

which I expected to start IIM ( from /opt/IBM/InstallationManager ) and install WAS using the response file /tmp/installWAS85_via_HTTP.rsp ( which I'd previously uploaded and unpacked ).

Imagine my surprise when this completely failed with: -

CWMRI1077E: Command manageOfferings failed on host rhel6.uk.ibm.com. The exception is "CWMRI1052E: The specified response file path name is invalid or the specified response file does not exist.".

Can you spot the obvious mistake ?

Yes, I was expecting Job Manager to look for the response file on the target remote box rather than on my own local machine ( from whence I'm running Job Manager ).

Can you say "Doh!" ??

Of course, this obviates the need for me to deploy the installation script and response file across to the target box - Job Manager will read the response file locally, and that's all it takes :-)

Once I changed the wsadmin command: -

AdminTask.submitJob ('-jobType manageOfferings -targetList rhel6.uk.ibm.com -username wasadmin -password passw0rd -jobParams [ [responseFile /mnt/hgfs/Source/Scripts/installWAS85_via_HTTP.rsp] [acceptLicense TRUE] [IMPath /opt/IBM/InstallationManager] ]')

it worked like a dream, as evidenced by the log files within Job Manager: -

/opt/IBM/WebSphere/profiles/JobMgr01/config/temp/JobManager/134996759161882899/rhel6.uk.ibm.com/logs/stdOut.txt

Installed 8.5.0.0-WS-WAS-IFPM62795_8.5.0.20120503_1150 to the /opt/IBM/WebSphere/AppServer directory.
Installed 8.5.0.0-WS-WAS-IFPM63690_8.5.0.20120611_1318 to the /opt/IBM/WebSphere/AppServer directory.
Installed 8.5.0.0-WS-WAS-IFPM63827_8.5.0.20120503_1507 to the /opt/IBM/WebSphere/AppServer directory.
Installed 8.5.0.0-WS-WASND-DistExceptIBMi-IFPM64890_8.5.0.20120608_1634 to the /opt/IBM/WebSphere/AppServer directory.
Installed 8.5.0.0-WS-WASND-DistExceptIBMi-IFPM66137_8.5.0.20120615_0733 to the /opt/IBM/WebSphere/AppServer directory.
Installed 8.5.0.0-WS-WASProd-IFPM64186_8.5.0.20120611_1543 to the /opt/IBM/WebSphere/AppServer directory.
Installed 8.5.0.0-WS-WASProd-MultiOS-IFPM63479_8.5.0.20120613_2056 to the /opt/IBM/WebSphere/AppServer directory.
Installed com.ibm.websphere.ND.v85_8.5.0.20120501_1108 to the /opt/IBM/WebSphere/AppServer directory.

and the versionInfo.sh command: -

$ /opt/IBM/WebSphere/AppServer/bin/versionInfo.sh

WVER0010I: Copyright (c) IBM Corporation 2002, 2012; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.1.48, dated 2/8/12

--------------------------------------------------------------------------------
IBM WebSphere Product Installation Status Report
--------------------------------------------------------------------------------

Report at date and time 11 October 2012 16:20:31 BST

Installation
--------------------------------------------------------------------------------
Product Directory        /opt/IBM/WebSphere/AppServer
Version Directory        /opt/IBM/WebSphere/AppServer/properties/version
DTD Directory            /opt/IBM/WebSphere/AppServer/properties/version/dtd
Log Directory            /home/wasadmin/var/ibm/InstallationManager/logs

Product List
--------------------------------------------------------------------------------
ND                       installed

Installed Product
--------------------------------------------------------------------------------
Name                  IBM WebSphere Application Server Network Deployment
Version               8.5.0.0
ID                    ND
Build Level           gm1218.01
Build Date            5/1/12
Package               com.ibm.websphere.ND.v85_8.5.0.20120501_1108
Architecture          x86-64 (64 bit)
Installed Features    IBM 64-bit WebSphere SDK for Java
                      WebSphere Application Server Full Profile
                      EJBDeploy tool for pre-EJB 3.0 modules
                      Embeddable EJB container
                      WebSphere Application Server Liberty Profile
                      Sample applications
                      Stand-alone thin clients and resource adapters

--------------------------------------------------------------------------------
End Installation Status Report
--------------------------------------------------------------------------------


Right, now it's time to use Job Manager to create a profile on the remote box, and then go and grab a cup of tea :-)

No comments:

Post a Comment