There comes a point in any enterprise J2EE application’s life when sitting on a single instance of the server on a single piece of hardware just doesn’t seem to cut it anymore. Enter the cluster; load-balancing, failover and distribution for free!. But that is not quite so accurate or quite so free. Having been involved in two new products that evolved to work on a cluster, it seems that applications built from the ground up to work in a cluster will work outside of a cluster, but not necessarily the other way around. It makes sense then to start your testing efforts in a clustered environment right from the get go. Don’t have a pool of machines to make a cluster with? No Problem. The following is a step-by-step hand holding on how to install a WebLogic 8.1 and then cluster it on a single piece of hardware.

Installation
Clustering
Running
Deployment

Installation

  1. This is just a splash screen, click Next
  2. Does anyone actually read these, or if they do say no? I didn’t think so. Choose Yes, then click Next
  3. Choose your install location. Doesn’t matter where, then click Next
  4. Choose Custom since we don’t care about anything other than the server. Click Next
  5. Unselect everything except Server. Click Next
  6. Take the default here, then click Next
  7. If on windows, you might as well choose Yes, but I would then go change the startup mode in the Services Console to be Manual instead of Automatic — especially if you are using doing this on a shared resource. Click Next
  8. Twiddle thy thumbs whilst the intaller installs
  9. If you choose not to Run Quickstart here, you will have to launch it in bea/weblogic81/common/bin/quickstart.[cmd|sh]. Either way, click Done

Clustering

  1. Click Create a new domain configuration or extend and existing one to launch the wizard
  2. This tutorial assumes you are going to Create a new WebLogic configuration, so choose it and click Next
  3. Choose Basic WebLogic Server Domain to get a domain without all the example cruft. Click Next
  4. Since clustering is a more advanced feature, click Custom and then Next
  5. In this step, we are creating the admin server instance which will control the cluster nodes. So name it whatever you like, but admin makes sense. Tweak the address and ssl as much as you like, then click Next
  6. Pretty obvious. Choose Yes, I want to cluster my server, then click Next
  7. In this screen we create our actual nodes. You can do this two ways since this is all contained on one server. You can say All Local Addresses and use different ports (not forgetting that the admin one you created above is also using a specific port), or you could bind multiple addresses to your nic and use the same port but a specific address for each node. Different ports is easier. Click Next
  8. Name your cluster here, leave everything else as the default and click Next
  9. Using the arrow in the middle, move your nodes to your cluster. In the image I moved all (two) of my nodes over but there is no rule that you have to do that. Click Next when you are done
  10. Here we are configuring a physical machine. The Name can be anything, but the Node manager listen address needs to be the FQDN or IP of the machine you are configuring on. Click Next
  11. Using the arrow in the middle, move your nodes to your machine. Do not however, move your admin server. We want that seperate. Click Next
  12. Unless you have JDBC stuff to configure, say No, then click Next
  13. Unless you have JMS stuff to configure, say No, then click Next
  14. Create the user that will lord over this cluster. These are the credentials you will log into the WebLogic console with. Click Next
  15. Clearly this was a windows install, so you might as well make your life easier by putting the control options in the start menu and configuring it as a service. Again, you might consider changing it from an Automatic to a Manual start. Click Next
  16. This is just a bit of customization around what to call the shortcut in the start menu. Change the Shortcut Name if you plan on having multiple domains on the machine. Click Next
  17. Choose your WebLogic Configuration Startup Mode. I would strongly suggest that for QA/Test, it should always be Production Mode as that will more accurately replicate when your product is deployed into production. Choose too your Java SDK. Click Next
  18. Nothing much on this screen aside from giving your whole configuration a name, then clicking Create

Running

  • Start your Admin Server (created in step 5 of Clustering)
  • Start the Node Manager (if it is not already installed as a service, run BEA_HOME\weblogic81\server\bin\installNodeMgrSvc.cmd)
  • Login to the WL console
  • Choose Cluster -> <your cluster> -> Control -> Start your cluster

Deployment

  • When deploying an application, choose to push it to the entire cluster. It’s that easy — or should be. If it isn’t, perhaps you have a deployability bug to be addressed in your product