Forge Home


Puppet module for Glassfish 3+


8,719 latest version

2.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
  • 0.0.1
released Sep 6th 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'DanielRedOak-glassfish', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add DanielRedOak-glassfish
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install DanielRedOak-glassfish --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



DanielRedOak/glassfish — version 0.1.0 Sep 6th 2013


A puppet module for installing Glassfish, including support for clustering.

##Notes This is the initial release of the Glassfish module. Some flexibility is already built into the module, more will be added down the line. Ex. providers for the install only includes 'custom' at the moment. In later releases, the installer might take in a version number and pull the official release from the web. As always, contributions are welcome!

Nodes are currently configured as CONFIG type. SSH support will be added in a later release.

##Requirements Java JDK is required to be installed prior to installing Glassfish using this module. The user and group specified must exist.


Install Glassfish using a provided linux sh installer

class {glassfish:
  target      => '/u01/glassfish',
  provider    => 'custom',
  installfile => '/tmp/',
  domain      => 'testDomain',
  adminuser   => 'admin',
  adminpass   => 'helloworld',
  adminport   => '4848',
  httpport    => '8080',
  jdk         => '/u01/java',
  user        => 'glassfish',
  group       => 'glassfish',
  secureadmin => 'true',
  startdomain => 'true',

Create the Glassfish DAS setup and create the cluster. If multicast_ip and multicast_port are not specified, Glassfish will choose them for you. The domain must be started for this process to work as it uses asadmin commands.

glassfish::cluster {'test_cluster':
  gfbase         => '/u01/glassfish',
  gfdomain       => 'domain1',
  asadmin        => '/u01/glassfish/glassfish/bin/asadmin',
  is_das         => true,
  gfuser         => 'glassfish',
  cluster_name   => 'testCluster',
  das_host       => 'localhost',
  das_port       => '4848',
  das_pass       => 'helloworld',
  multicast_ip   => '',
  multicast_port => '27745'
  instances      => ['instance1', 'instance2'],


Create local-instances on a node and add it to the cluster 'testCluster'.

glassfish::cluster {'test_cluster':
  gfbase         => '/u01/glassfish',
  gfdomain       => 'domain1',
  asadmin        => '/u01/glassfish/glassfish/bin/asadmin',
  instances      => ['instance1', 'instance2'],
  gfuser         => 'glassfish',
  cluster_name   => 'testCluster',
  das_host       => '',
  das_port       => '4848',
  das_pass       => 'helloworld',
  multicast_ip   => '',
  multicast_port => '27745',