Last week I got a chance to learn how JBOSS Architecture fits together when scaling it out. It looks a little like this.
Some good links for understanding JBoss scaling.
Getting started with JBOSS blueprint apps, locally.
- Download the jboss jar http://www.jboss.org/download-manager/file/jboss-eap-6.3.0.GA-installer.jar
- Run it! java -jar jboss-eap-3.6.0.jar. It walks you through I nice little UI for setting up your server, initializing mvn repos , and so on.
- Make sure 8080 isnt being used by anything. netstat -tupln | grep 8080
- You will see a splash screen, just go through the defaults.
- Now, go to localhost:8080. You'll see an EAP server.
- git clone all the blueprints : https://github.com/jboss-developer/jboss-wfk-quickstarts/
- git checkout 2.7.x-develop (change to the dev branch w/ the latest code)
- Now this is the fun part. Just cd to one of the dirs (i.e. cd contacts-mobile-basic)
- run: "mvn clean package jboss-as:deploy" (this goal assumes localhost deployment)
After playing around with JBoss, to scale it in a cloud based environment, I'd highly suggest this video, which details some of the finer points around JGroups, Infinispan, and Standalone clustering.
Finally, as an example of how to test standalone distributed servers locally, you simply.
- Kill all jboss processes (you can find them with jps).
- Clean out directories if there are any old stuff in your data/ directory from starting standalone.
- Create a seconds standalone-ha.xml file, which has the changes (shown below in the image... basically, we modify it to bind to the public IP instead of the private IP, so that there are no collisions).
- Start both jboss instances.
- bin/standalone.sh --server-config=standalone-ha.xml -Djboss.server.data.dir=standalone/data1
- bin/standalone.sh --server-config=standalone2-ha.xml -Djboss.server.data.dir=standalone/data2
![]() |
| When creating standalone2-ha.xml, just replace the IP Addresses above with your public IP. In my case it was 10.18..... |
At some point when I circle back around to this, I will get clustering fully functional in this distributed local mode, and I will update this post. For now this should be a good start for anyone interested in getting a JBoss clustered mode deployment working without using "domain" mode, and instead using standalone-ha mode.
Links
Advanced JBoss in the Cloud (standalone, MapReduce, and infinispan details). Video.
4 ways to enable JGroups discovery for standalone mode clustering. (presentation)


No comments:
Post a Comment