WebSphere Network Deployment 8.5 – A Clustered Environment

21 10 2012

The post discusses deployment of WebSphere Application server in clustered mode. The topology used in this post is

All the installation and setup is done on the trial version of WebSphere Application Server Network Deployment 8.5 (WAS or WASND) and Installation Manager 1.5.2 (IM)

To install websphere application server network deployment 8.5, you will also need to download and install Installation manager.  Starting with WAS v8.0, Installation Manager become the primary installation and update tool for WAS (ref: http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14872861).

In general there are two modes of installation

1) Download the Installation manager only, during the installation it shall download the WAS installation (referred to as repository) through internet.

2) Download the WAS and IM installation directly from IBM website either through Download Director or Using HTTP. This post discusses this second option. The IM and WAS (trial version) can be downloaded from following links. This link refers to the http mode of download and may become obsolete over time.

(https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=swerpws-wasnd85&S_PKG=500026211&S_TACT=109J87BW&S_CMP=web_ibm_ws_appinfra_butt_wasnd&lang=en_US&cp=UTF-8&dlmethod=http)

Once the download is complete, unzip files for both IM and WAS and install IM by executing the command install present in the unzipped folder. This shall take you to the IM set-up screen. Install IM by providing appropriate option. It is assumed throughout this post that IM is installed at following location “/u01/IBM/InstallationManager”. On successful installation click on Restart Installation manager to Launch IM. IM can also be launched by executing command “launcher” from the following path “/u01/IBM/InstallationManager/eclipse”.

Next go to File –> Preferences and add the location where WAS archive files were unpacked and select the repository.config file. Select Ok and on the launchpad, choose the Install option. The next panel shall show you the option of installation WAS. Proceed with the installation of WAS. The post assumes following paths for installation.

Shared Resources Directory: /u01/IBM/IMShared

Installation Directory: /u01/IBM/WebSphere/AppServer

*Since we later want to deploy a cluster configuration, therefore select sample applications in the feature list so these can be deployed as test applications.

Once the installation reaches the final step it asks for execution of profile management tool (PMT). Select the option “Profile Management Tool to create a profile”.

Considering the above mentioned path, PMT can also be started through /u01/IBM/WebSphere/AppServer/bin/ProfileManagement/pmt.sh

Executing the PMT, and clicking on Create button shall take you to the screen with five options. Since we plan to use Clustered deployment, we will first create the management profile, which will create the deployment manager. Deployment Manager (DM) is a administrative agent that provides a centralized management view for the nodes.

While proceeding to the steps, select deployment manager, select advance profile creation, and name and path for the DM.

Next you will be asked for

Node Name: CellManager01

A node name is for administration of the DM, the name must be unique with in cell.

Host Name: wasnode1* (it is assumed that DM is deployed on node 1)

A hostname is the DNS or IP

Cell Name: was8Cell

A cell name is the logical name for the groups of nodes administrated by this DM.

Continue with installation and create the DM. Remember the ports as these will be used to access the DM. Next launch the FistSteps and verify the installation. This will start DM during the verification process. FirstSteps can also be started from the following location.

/u01/IBM/WebSphere/AppServer/profiles/Dmgr01/firststeps/firststeps.sh

Otherwise the DM can be started by /u01/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/startServer.sh dmgr -profileName Dmgr01

Once the DM is started, access the DM console by entering URL like

https://wasnode1:9043/ibm/console

After entering the user id and password, you will enter into WAS console. Our next step shall be addition of Nodes to this deployment Manager,

For addition of nodes to the deployment manager, the nodes must be federated. This can be done by creating a profile with an application server or create a custom profile which does not contain any server but provide the feature of federating the node with the deployment manager. Federation, here refers to the act of associating the node with the deployment manager.

1) Select Custom profile

2) Select Advance profile creation

3) Provide a profile name and path like

Profile Name: wasnode1

Path: /u01/IBM/WebSphere/AppServer/profiles/wasnode1

4) Give node a name and provide host name

Node Name: wasnode1

Host Name: wasnode1

5) Federate the profile by providing the details of DM and its credentials

Once the Installation is completed, open DM console (https://wasnode1:9043/ibm/console) and navigate to System Administration –> Nodes on the left pane. The view should look like

And System Administration –> Node Agents

Create a custom profile for node 2 also and check nodes and nodes agent. It should now reflect both nodes and node agent

Nodes

Node Agents

Next step is to start the node agents. The node agents can be started by executing following commands on respective nodes.

/u01/IBM/WebSphere/AppServer/profiles/wasnode1/bin/startNode.sh

/u01/IBM/WebSphere/AppServer/profiles/wasnode2/bin/startNode.sh

Logs similar to this shall appear during the node startup

ADMU0116I: Tool information is being logged in file

/u01/IBM/WebSphere/AppServer/profiles/wasnode1/logs/nodeagent/startServer.log

ADMU0128I: Starting tool with the wasnode1 profile

ADMU3100I: Reading configuration for server: nodeagent

ADMU3200I: Server launched. Waiting for initialization status.

ADMU3000I: Server nodeagent open for e-business; process id is 7817

Once the node agents are started, see the updated statuses of both the node agent in the DM console.

Now, we will proceed to creating cluster and adding application servers to it. As the topology says, we will create two clusters, one for application servers that shall host the applications and other for proxy servers that shall redirect user requests to the application servers (Proxy servers are new feature for IBM WAS and for its usage vs IBM HTTP server can be reviewed in the following document. http://www.ibm.com/developerworks/websphere/techjournal/1010_pape/1010_pape.html).

For creation of cluster, navigate to Servers –> Cluster and click WebSphere application server clusters. Press New to add a new cluster.

1) Provide Cluster Name, remember to check HTTP session memory to memory replication, this is required when applications are using web sessions and requests are forwarded in round-robin fashion so that user when reaches other server, it does not fail to find its session information

2) Provide the name of the application server. On creation of the cluster, this application server shall also be created.

3) Add additional members in the cluster.

4) Proceed to the summary tab and click Finish

*If asked, save changes to master repository.

For verification of application server creation, navigate to Servers –> WebSphere Application Server and a screen similar to this should be viewable.

Next Go to cluster, select the cluster and click start.

After some time, the cluster and the associated Application servers shall be started. Again navigate to application servers and view the state of application servers, which now both shall be running.

Next, we will create the cluster of proxy server, as already described; the proxy servers in the cluster shall forward the request to the application server.

For creation of cluster, navigate to Servers –> Cluster and click proxy server clusters. Press New to add a new cluster.

1) Provide Cluster Name

2) Provide proxy server details

3) provide other member of proxy cluster

4) Proceed to summary tab and click finish.

*If asked, save changes to master repository.

For verification of proxy server, navigate to Servers –> WebSphere Proxy Servers

Now navigate back to Proxy Server Cluster and start the Proxy Cluster. After sometime, both the proxy server shall have status running.

The setup has been completed. Now we deploy a sample application to test the behavior of the cluster, proxy and application servers.

Navigate to Applications –> New Application and select New Enterprise Application. Provide following path in the remote file system tab (if this path differs/not present in your file system, then you may install any web application

/u01/IBM/WebSphere/AppServer/profiles/Dmgr01/config/temp/upload/1350858060044/DefaultApplication.ear.

Select fast paced and the next screen shown shall contain 3 steps.

1) In the first step change the name of the application to DefaultApplication.

2) Select both the items in the list in “Map modules to servers”.

3) Move to summary tab and click finish.

The messages should end with following line

ADMA5013I: Application DefaultApplication installed successfully.

*save the configuration, if asked to do so.

Next start the application by navigating to Applications à All Applications. Select the application, make sure action is set to Start, and click Submit Action. Following should appear on successful start of the application

To verify the application, hit the following URLs

Application accessed directly through Application Servers

http://wasnode1:9080/hitcount

http://wasnode2:9080/hitcount

Application accessed through proxy server

http://wasnode1/hitcount

http://wasnode2/hitcount

Stop one application server (say cl_appserv2), by Navigating to Servers à WebSphere Application Server and again access the applications through all four URLs

Application accessed directly through Application Servers

http://wasnode1:9080/hitcount –> Success

http://wasnode2:9080/hitcount –> Failure

Application accessed through proxy server

http://wasnode1/hitcount –> Success

http://wasnode2/hitcount –> Success


Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: