Has anyone found a clean way to manage Glassfish configuration with puppet?

Glassfish was designed to be managed through a WebUI or a CLI tool known as
asadmin.  Making changes using these tools modifies a domain.xml file.
 Glassfish reads and writes this file every time it restarts, even if the
contents are the same, which changes the timestamp.  I believe this can be
addressed by setting puppet to use a different checksum.

However, the real question is should the domain.xml be managed directly?  It
is a messy file and some configuration updates made through the asadmin tool
change the file in several places.  I thought I might make things simpler by
using templates and creating a domain.xml.erb and this is working but
porting changes I make from a local development Glassfish instance back to
that file is tedious and error prone.

One approach could be to create a mechanism to manage incremental changes
(asadmin commands) which modify the underlying structure (domain.xml) like
RoR's migrations or Java's bering do with SQL statements to modify a schema.
 But I don't see an easy way to use the current abstractions in puppet to do
this.

Another approach would be to have puppet really understand Glassfish as a
resource similar to users in puppet currently.  You manage them at a high
level using tools like adduser to make modifications and getent to verify a
configuration as opposed to managing the /etc/passwd and /etc/group files
directly.  My fear with this approach is I'm not sure asadmin is robust
enough to query and return current settings and that I'll end up writing a
lot of code to parse and search for nasty XML fragments and this will be
brittle as the Glassfish team changes the format of the domain.xml as
development progresses.

I'd like to know if others have found a good way of approaching this kind of
problem?  I expect to encounter the same type of issues with OpenMQ and I
imagine many of the other appservers could pose similar challenges.

thanks,
chuck

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to