4
votes

Environment :

  • Java EE webApp
  • JDK: 1.6,
  • AS: Websphere app server 7,
  • OS:redhatzLinux

I am not a websphere admin and I am asked to develop a way or a script to solve the issue below:

I have a cluster with three nodes NodeA NodeB and NodeC. My application runs on these clusters. I want to deploy my application on these nodes such that i dont need to bring all of them down at once. These days the deployments is done this way : we come at night to stop all the servers all at once from console. Then we install the application on the main node which is on the same machine as the deployment manager and then we synchronize and bring all the servers back up one by one.

What I am asked to do is that we upgrade the application or install the new ear file by not bringing everything down as this is causing downtime to the application. Is there a way to acheive this. WAS 7 is a very mature product i am sure there must be a way to do it.

I looked at the documentation/tutorial we can do something like "Update" where we select the application (from Apllications> websphere enterprise application)and select update and then select radio button "Replace Entire Application" and radio button"local file system" and point to the new ear file. But in that case the doc says that it will bring down all the servers as well when updating. its the same as before. no online deployment.

I am a java programmer so I thought of using what tools I have to solve this

Tell me if this is can be an issue :

1) We bring down NODEA 2) We remove the NODEA from the cluster (by pressing remove node button or using the removeNode.sh) 3) Install the new Ear on the NODEA (can we do this in the same admin console? or through shell script or jython or may be like a standalone server) 3) We then start it up back again and then add it to cluster. NOW we have NODEA with new applicaition while NODE B and NODEC are with old application versions.

Then we bring down NODEB remove NODEB from cluster install applciation on NODEB start it up again Add it back to cluster

NOW we have two nodes with new application and NODEC with old

we try the same process for NODEC.

Will this work. Has any one tried this. what issues can you think of that can happen.

I will so appreciate any feedback from here. I am sure there are experienced ppl on this forum. I dont think this is a rare issue,i believe this is something any organization would want with High Availability requirements.

Thanks for any help in advance. Syed...

2

2 Answers

2
votes

This is a possible duplicate of How can i do zero down time deployment on cluster environment?. Here is essentially my answer from that question:

After updating the application, you can utilize the "Rollout Update" feature. Rather than saving and synchronizing the nodes after updating, you can use this feature which automatically performs the following tasks to enable the changes to propagate to all deployment targets while maintaining high availability (assuming you have a horizontal cluster, such that cluster members exist on multiple nodes, which it sounds like you do):

  1. Save session changes to the master configuration
  2. For each node in the cluster (one at a time, to enable continuous availability):
    1. Stop the cluster members on the node
    2. Synchronize the node
    3. Start the application servers (which automatically starts the application)
0
votes

Alternatively, you can follow the following procedure.

  1. Stop all nodeagents except Node A.
  2. Comment out or disable the Node A from Load Balancer or Plugin (So the traffic will not come to the node)
  3. Deploy the application.
  4. Changes will be synchronized only on Node A as its nodeagent is up.
  5. Uncomment/enable the Node A from plugin / load balancer.

  6. Comment/disable Node B from plugin/load balancer to stop incomming traffic on the node.

  7. Start the nodeagent of Node B so it will synchronize the file changes on the Node. The ear application will stop and start after synchronization.
  8. Uncomment/enable the Node B from plugin / load balancer.

Repeat steps 6,7,8 for all the remaining nodes.

Regards, Laique Ahmed