>
> I think a custom resource to drive asadmin is probably the right way to go.
> What version are you using?
> As of Glassfish v3 there's a good REST API ( v3asadmin is essentially
> a http client).
> See the article here:
>
> http://blogs.sun.com/aquatic/entry/glassfish_rest_interface_for_management
>
> (there are links to the dev. api there too).
>

That would make everything so much simpler.  Unfortunately we're still on
v2.1 so we can't leverage this yet.

>
> Out of interest, how do you install glassfish? I had a look round a while
> back
> and couldn't find any RPMs at all.
>
>
It isn't pretty but it seems to work.  The core parts of our manifest are
below:

  exec { "DownloadGlassfish":
    cwd     => "$download_dir",
    command => "wget $download_url",
    creates => "$download_dir/$prg_tarball",
  }

  exec { "InstallGlassfish":
    cwd     => "$download_dir",
    command => "echo 'A' | java -Xmx256m -jar $prg_tarball; mv glassfish
$installed; chmod -R +x $installed/lib/ant/bin; rm $installed/setup.xml",
    user    => pulse,
    creates => "$installed",
    require => [Exec["DownloadGlassfish"], File["/etc/init.d/glassfish"]],
  }

  exec { "ConfigureGlassfish":
    cwd       => "$installed",
    command   => "$installed/lib/ant/bin/ant -f setup.xml;
$installed/setup_glassfish_for_pulse.sh",
    user      => pulse,
    group     => pulse,
    creates   => "$installed/domains",
    require   => [File["/opt/glassfish/setup.xml"],
File["/opt/glassfish/setup_glassfish.sh"]],
    logoutput => true,
  }

Essentially we've scripted the standard install and then have a script full
of asadmin commands to configure Glassfish specific to our
needs/environment.  Really this should all be done by managing the
domain.xml which we've templatized now that we're getting more comfortable
with Puppet.  But even managing the domain.xml is proving to be difficult
because of how Glassfish reads and writes the domain.xml file on start and
stop.

I'm beginning to feel a custom resource is the way to go as well but there
are enough things about Glassfish which we find annoying that we might move
away from it rather than do that work.  If anyone else is starting to delve
into it though I'd be up for sharing our experiences and do what we can to
help it come into being.

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<puppet-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>

-- 
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