users@glassfish.java.net

Glassfish under NFS...

From: <glassfish_at_javadesktop.org>
Date: Thu, 05 Mar 2009 00:26:31 PST

Hi gang,

  We're in the process of deploying a new application using glassfish (hooray) and as the systems admin in charge of the project, I'm looking for some best practices or ideas.

  Right now, our existing tomcat applications are setup in containers that utilize NFS as the main storage medium, and we have an F5 for the front-end load balancing (using sticky sessions). We usually do something like the following:

/web/common/java/jdk-<version>
/web/<domain name>/servers/tomcat/host.domain.name <-- holds the main tomcat code
  |--logs/ <--symlinked to /web/<domain name>/logs/tomcat/host.domain.name
  |--webapps/ <--symlinked to /web/<domain name>/webapps/host.domain.name

We usually modify the tomcat startup scripts to add -Dcatalina.node=`uname -n`, and modify server.xml and any log4j or other configuration files to append the node-name of the system it's running on as well. This allows for "node specific" log files (e.g. catalina.out_nodename), and allows us the use of server-specific work/ directories.

The benefit of a layout like this should be fairly obvious - application code, JDK versions, and the tomcat appserver itself are all guaranteed to be the same version. I can also save some (minor) cost on storage on the application servers (currently X4200's), since we work in pools behind an F5 my app servers only have a single drive. And of course, it's extremly simple to scale - jumpstart a box, mount the NFS file system, and bam. "Bare metal" to production in just a few hours.

Is it possible to do something similar with Glassfish? I'd like to be able to keep as much of the same style of file system layout as possible, as it makes it easier on my team if they don't have to learn a new layout. I'm just not quite sure how to go about doing it at this point, especially since one of the goals is to move *away* from sticky sessions - which is one of the reasons we went with GF instead of sticking to tomcat.

Now I realize that GF is a *much* more mature system than TC is (Huzzah!). Centralized configurations pushed from an admin server, domain based deployments, node management, deployed code "pushes" to cluster members, etc. All of this takes care of a lot of what we were doing with our existing system. But. I'd still like to at least be able to centralize logs, the glassfish code, etc. I am, after all, working on boxes with single-drives and not a lot of space.

Does anyone have any suggestions? Is GF under NFS even a good idea? Are there caveats I ought to be aware of?
[Message sent by forum member 'jmccombs' (jmccombs)]

http://forums.java.net/jive/thread.jspa?messageID=335225