Re: Using smart-frog to automate management of JBoss

[email protected] Wed, 9 Jan 2008 10:37:01 -0500
Newsgroups gmane.comp.java.smartfrog.devel
Message-ID <OFEFEE5576.9021AA69-ON852573CB.0052A279-852573CB.0055E92C@wiley.com>
Hi Steve,

In our environment JBoss 4.x is running on 
- RHEL 3 and 4
- Sun JVM 1.4.2 and 1.5.0. 

Most of the times JBoss is deployed together with Apache 2.x. Some more 
complex deployments have also Squid caching servers and Terracotta 
(http://www.terracotta.org) servers for clustering of Java applications. 

There are many smaller applications hosted on stand-alone Tomcat 
5.x/Apache 2.x servers running on either Solaris 5.9 and RHEL 3/4.  We 
would like to be able to control them too.

There is also some number of older WebSphere applications running on 
Solaris 5.9 and IBM Java 1.4.x. They are not our primary target for our 
planned automation solution so we'll leave them for later.

I'll be glad to help with the testing. If SmartFrog works for us we'll 
extend it to all our systems and standardize on it. 

The three most important features we are looking at the beginning in any 
automation solution are:
a) Executing a sequence. Example of a simple one is stop Apache -> restart 
JBoss -> start Apache 
b) Task scheduling. Example: Restart all servers for application A in 
predetermined order at 5 am on Sat morning.
If something goes wrong with unattended restart the on-call person needs 
to be alerted.

When we get comfortable with a) and b) we would start implementing and 
testing deployments of the application.. At the beginning they would be 
initiated by an administrator but at a later phase we would like to 
schedule the deployment and do it automatically.

At the moment I am still reading the SmartFrog documentation. Please let 
me do some initial testing and get familiar with the framework and then we 
can start. I need couple of days.

Thanks for the help!

Dimitar Georgievski
----------------------------------------
Senior Unix Admin
Electronic Support Services
John Wiley & Sons, Inc.
email: [email protected]
----------------------------------------



Steve Loughran <[email protected]> 
01/09/2008 09:46 AM

To
[email protected]
cc
smartfrog-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject
Re: [Smartfrog-developer] Using smart-frog to automate management of JBoss






[email protected] wrote:
> Hi,
> 
> I am new to the list and SmartFrog. I would like to find out if anyone 
has 
> used SmartFrog to automate deployments and configuration management of 
> JBoss servers.  Our company in increasingly using them for hosting of 
> large volume Web applications. We reached the point when the automation 
of 
> their administration is needed. 
> 
> I've  already read the documentation and was pleased with the 
capabilities 
> of SmartFrog. Our concerns are related in great part to reliability, 
> scalability and performance penalties (CPU mainly) caused by 
introduction 
> of SmartFrog on a production host. It would be nice to hear expereinces 
> from other users.

One things are running, there's minimal CPU overhead. The only load on 
running systems is liveness, where a thread walks down the tree checking 
that everything is alive, according to their sfPing() methods. 
Components that do heavier work here (such as issue SQL commands or GET 
urls) can put load on the system. To manage this you can control the 
frequency of liveness checks. Memory footprint is a function of how many 
components are deployed...you can get away with the SmartFrog JVM being 
relatively small, and starting JBoss in its own process.


> Since SmartFrog is a framework we would need to invest significant 
effort 
> in building and testing the components required to support our 
> requirements. 

There is already a declaration to start up JBoss, extending the 
server-neutral deploy-by-copy www server, that handles deployment of 
things underneath just by copying the JAR files to a target directory. 
Here's the URL to the descriptor

http://smartfrog.svn.sourceforge.net/viewvc/smartfrog/trunk/core/components/www/src/org/smartfrog/services/www/servers/jboss4.sf?view=markup


To actually start JBoss, we just set up the Java component with the 
right arguments, and add the JDK's tools.jar to the classpath, which is 
needed to compile JSP pages.

I've also played with using Cargo under SmartFrog to manage the 
start/stop; Cargo is the tool from codehaus that can start/stop lots of 
different application servers:  http://cargo.codehaus.org/

As I recall, Cargo 0.8 was breaking with an NPE, and when I moved up to 
cargo 0.9. all our tests broke ( 
http://jira.smartfrog.org/jira/browse/SFOS-138 ). I haven't been doing 
any work on cargo since may/june.

Beyond that, there is JMX configuration. We do have a jmx component 
bundle, sf-jmx, that uses MX4J; we've been pondering moving to Java 5 
JMX instead, which would make for a lighter distribution. The JMX 
integration is two way: SF components become JMX configurable; JMX 
MBeans can be set under SmartFrog.  We've not looked at starting JBoss 
this way -yet.


I'd recommend you start with the jboss4.sf template, which ships within 
the sf-www component, then put enough pressure on me to bring the Cargo 
component up to cargo 0.9 and get the tests working again. Once we have 
those tests stable we can turn them on in the continuous integration 
servers, which stops any regressions creeping in to the SmartFrog side 
of the codebase. Any tests you can contribute here would be beneficial 
-currently we create a test WAR that we deploy in jetty, tomcat and 
jboss -I don't test EAR files, or the JBoss-specific SAR files. It would 
be good to create some of these and something that deploys anything else 
that is JBoss-specific.

As you're interested in JBoss support, I can put more some time into it, 
especially if you are willing to help with testing what I'm doing. What 
platform are you likely to run underneath -windows/unix? and which JVM?


>I am curious if anyone has tried to build a GUI that would 
> simplify the automation tasks. 

We have an Eclipse plugin, and a NetBeans component was contributed 
-I've been working on the latter recently but I havent cut a release of 
it yet. These are both essentially text editor modes with some ways of 
running SmartFrog.


-Steve

-----------------------
Hewlett-Packard Limited
Registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace