Clustering with Maximo and WebSphere 8.5.5 - Part 3 - Isolating Functionality and Deployment
Body
It's been a bit since my last entry in this series, so I thought I'd take some time this morning to finish off this tutorial on configuring a basic horizontal cluster. If you haven't read my previous posts, you can jump over to Part 1: WebSphere Configuration and Part 2: JMS Configuration.
In this final portion of the three part series, we will go over the following topics.
- Creating the Virtual Host
- Assigning Names to JVM's
- Building and Deploying ear files
- Isolating functionality
I will note again, this is a basic clustering scenario, it may not fit the exact needs of everyone, but can be used as a guide in your configuration. You may want to add more UI servers, a BROS or CRON JVM, or even some more advanced queue configuration.
So lets begin, the first step in this part of the guide is probably a step that could of been a section on Part 1 of the series, so I'm going to start with it first, this is creating the virtual host. The virtual host will define the addresses and ports of your cluster members and will map the web server to those JVM's web container ports.
Configuring the Virtual Host
1. Log in to your WebSphere console, expand 'Environment' and click on 'Virtual Hosts'
2. Click 'New' and enter maxcluster_host in the 'Name' field and click 'Apply'
3. From the maxcluster_host screen, click on ' Host Aliases'. We will now want to add our host names and ports for our UI JVM's as well as the web server. We will not be adding the MIF JVM to this virtual host as we don't want the web server to load balance users into that JVM. Click on 'New' and add your web servers and JVM's as well as their web container ports as seen below.
The first entry is our web server, which is on port 80. The second two entries are for our two UI JVM's, one on each node on port 9080. You will want to add all your UI servers to this virtual host.
4. Once your maxcluster_host is setup we will want to create another virtual host for your MIF server, this host will just contain the MIF JVM's web container port. Follow steps 1-3 above to create another virtual host called maxmif_host as seen below.
Now that our virtual hosts are created, we will assign JVM names to each server. This will help with isolating cron task functionality by ensuring all JVM's are starting up with a static mxe.name bound to them.
Assigning Names to JVM's
In WebSphere you can set the mxe.name property directly on the JVM. This is done in the Generic JVM arguments for each individual JVM. This prevents each cluster from starting up with a random name e.g. mxserverc1. This way we can specify the cron tasks do not run properties at the instance level for each JVM in the database.
1. In your WebSphere Console, expand 'Server Types' and click on 'WebSphere Application Servers'. From here click on MAXIMOUI1.
2. Under 'Server Infrastructure' expand 'Java and Process Management' and click on 'Process Definition'. Under 'Additional Properties' click on 'Java Virtual Machine'
3. There will be a box that says 'Generic JVM arguments' in here we want to enter -Dmxe.name=MAXIMOUI1 as seen below.
4. Repeat the above steps for your remaining JVM's. For example Dmxe.name=MAXIMOUI2 and Dmxe.name=MAXIMOIF
Building and Deploying Ear Files
We will be separating out most of our functionality using the mxe.crontask.donotrun property as an instance level property in the database, however we will still need to build multiple ear files to ensure our message-driven beans are only operating on the MIF server. Once done we will deploy two ears MAXIMOUI.ear and MAXIMOIF.ear to our cluster. As we are specifying our do not run information in the database, we won't need to duplicate the maximo.properties file.
1. On your Administrative workstation browse to maximo\applications\maximo\mboejb\ejbmodule\META-INF
2. Create two copies of both the ejb-jar.xml and ibm-ejb-jar-bnd.xmi and call them ejb-jarIF.xml, ejb-jarUI.xml, ibm-ejb-jar-bndIF.xmi, ibm-ejb-jar-bndUI.xmi and leave the original files as you see in the picture below.
We will now modify both the ejb-jarIF.xml and ibm-ejb-jar-bndIF.xmi to enable the MDB.
3. Open the ejb-jarIF.xml in a text editor and search for MEA MDB and un-comment the four sections returned, below are the screenshots of each section to un-comment, once done save the file.
a)
4. Open the ibm-ejb-jar-bndIF.xmi in a text editor, again search for MEA MDB and un-comment the two sections then save the file.
5. For the ejb-jarUI.xml and ibm-ejb-jar-bndUI.xmi you will want to ensure the above is reversed and all MEA MDB sections are commented out.
6. The last part to building the ear files is creating the separate build commands. As this is WebSphere 8.5.5 we will copy the buildmaximoearwas8.cmd file twice and rename the copies to buildmaximoearwas8IF.cmd and buildmaximoearwas8UI.cmd.
7. Open the buildmaximoearwas8IF.cmd in a text editor and add the following text to the top of the file below @echo off
copy /Y c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ejb-jarIF.xml c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ejb-jar.xml
@echo copied ejb-jarIF.xml to ejb-jar.xml
copy /Y c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ibm-ejb-jar-bndIF.xmi c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ibm-ejb-jar-bnd.xmi
@echo copied ibm-ejb-jar-bndIF.xmi to ibm-ejb-jar-bnd.xmi
@echo copied ejb-jarIF.xml to ejb-jar.xml
copy /Y c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ibm-ejb-jar-bndIF.xmi c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ibm-ejb-jar-bnd.xmi
@echo copied ibm-ejb-jar-bndIF.xmi to ibm-ejb-jar-bnd.xmi
The above entries will copy our modified MIF ejb files to the original files and build them into the ear.
In the same file change the ear file name to maximoIF.ear and save the file.
set EAR_FILENAME=maximoIF.ear
8. Open the buildmaximoearwas8UI.cmd in a text editor and add the following text to the top of the file below @echo off
copy /Y c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ejb-jarUI.xml c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ejb-jar.xml
@echo copied ejb-jarUI.xml to ejb-jar.xml
copy /Y c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ibm-ejb-jar-bndUI.xmi c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ibm-ejb-jar-bnd.xmi
@echo copied ibm-ejb-jar-bndUI.xmi to ibm-ejb-jar-bnd.xmi
@echo copied ejb-jarUI.xml to ejb-jar.xml
copy /Y c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ibm-ejb-jar-bndUI.xmi c:\IBM\MAXDEV\maximo\applications\maximo\mboejb\ejbmodule\meta-inf\ibm-ejb-jar-bnd.xmi
@echo copied ibm-ejb-jar-bndUI.xmi to ibm-ejb-jar-bnd.xmi
The above entries will copy our modified UI ejb files to the original files and build them into the ear.
In the same file change the ear file name to maximoUI.ear and save the file
set EAR_FILENAME=maximoUI.ear
9. Run both the buildmaximoearwas8IF.cmd and buildmaximoearwas8UI.cmd to create the ear files, ensure the first command completes fully before starting the other.
10. You can now deploy the ear files, I won't go in to detail of each step of the deployment. You can head over to the following IEA to watch a video on the basic ear deployment.
For the deploying the ears in the cluster we need to ensure 3 things.
- The application name for the deployment is different for each, for example MAXIMOUI and MAXIMOIF
- When deploying the UI ear, you want to ensure it's mapped to the MAXCLUSTER and the web server
- When deploying the MIF ear, you want to ensure it's mapped to just the MAXIMOIF JVM.
- And last ensure your UI ear is mapped to the maxcluster_host virtual host and your MIF ear is mapped to the maxmif_host.
Once your ear files are deployed, start the cluster and your MIF servers.
Isolating functionality
Our last step in this basic configuration will be to isolate the cron task functionality to the MIF server, so only the required will be running on the servers hosting your user load.
1. In Maximo, open the 'System Properties' application. Under Instance properties click 'New Row'. Our first row will have the following properties.
- Property Name: mxe.crontask.donotrun
- Server: MAXIMOIF
- Value: JMSQSEQCONSUMER.SEQQOUT
This says all cron tasks will run on the MAXIMOIF server other then the JMSSEQQCONSUMER.SEQQOUT which will be sending transactions outbound through the UI.
2. Click 'New Row' again and add another entry for the first UI server with the following properties.
- Property Name: mxe.crontask.donotrun
- Server: MAXIMOUI1
- Value: JMSQSEQCONSUMER.SEQQIN, BBCron.BBCRON1, ESCALATION. ESCESCBLTNEXP, REPORTLOCKRELEASE, REPORTLOCKRELEASE1, REPORTUSAGECLEANUP, REPORTUSAGECLEANUP1
Specifying all the cron tasks we don't want running on the UI1.
3. Click 'New Row' once more and add the final entry for our last UI server.
- Property Name: mxe.crontask.donotrun
- Server: MAXIMOUI2
- Value: JMSQSEQCONSUMER.SEQQIN, BBCron.BBCRON1, ESCALATION. ESCESCBLTNEXP, REPORTLOCKRELEASE, REPORTLOCKRELEASE1, REPORTUSAGECLEANUP, REPORTUSAGECLEANUP1
Again specifying all the cron tasks we don't want running on the UI.
4. These properties can not be live refreshed and will require a restart of the JVM's to take place.
The above is just a basic configuration, in a real scenario you will likely have many more cron tasks and instances to isolate. You can run a select from your crontaskinstance table to determine all the cron tasks and cron tasks instances in your environment and separate them accordingly.
5. We can also point our inbound web service calls to the MIF JVM specifically. From the system properties application search for mxe.int.webappurl set this to your MIF server and do a live refresh.
The above can be done for mxe.oslc.webappurl and mxe.rest.webappurl as well.
I think at this point I've covered most of the basic configuration of a horizontal cluster, there may be some advanced topics or configuration missed, if so please feel free to comment, ask questions or leave suggestions below. I will end this off with a couple of quick notes regarding the configuration.
* If required to send outbound messages from both the MIF and UI servers (events) the connection factories and queues will need to be defined at the server level instead of the cell level. This way you can use duplicate names. I will document this in a future blog
* the global directory specified in the system properties for your MIF files, must be accessible across all nodes.
* When doing the integration JMS configuration, if partial configuration existed before, ensure to remove it as you create the new configuration.
* mxe.crontask.donotrun properties can be added to the maximo.properties as well, this would require you to duplicate the maximo.properties and specify the mxe.crontask.donotrun properties for each the MIF and UI. You will also need to modify the build scripts to copy the maximo.properties as well.
If I think of any other notes, I will update this document going forward.
Series
Clustering with Maximo and WebSphere 8.5.5 - Part 3 - Isolating Functionality and Deployment