Forge Home

glassfish

A plugin to manage Glassfish instalation and domains, system-properties, jdbc-connection-pools and jdbc-resources and application deployment.

12,596 downloads

5,643 latest version

5.0 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

  • 1.0.0 (latest)
  • 0.4.0
released Jun 21st 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 <6.0.0
  • , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'wavesoftware-glassfish', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install wavesoftware-glassfish --version 1.0.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.

Download

Documentation

wavesoftware/glassfish — version 1.0.0 Jun 21st 2018

Puppet Glassfish plugin

This plugin for Puppet installs Glassfish Application Server and adds resource types and providers for managing Glassfish domains, system-properties, jdbc-connection-pools, jdbc-resources, custom-resources, auth-realms and application deployment by using the asadmin command line tool.

License: GPLv3

Default settings:

This plugin uses the executable asadmin of Glassfish instalation. Plugin installs Glassfish in version 3.1.2.2 as standard and using java-7-oracle (also supports other JDK versions: java-7-oracle, java-7-openjdk, java-6-oracle, java-6-openjdk). It will also starts it as a service.

Example instalation usage:

Simple (using defaults):

include glassfish

or explicit:

class { glassfish:
  java => 'java-7-openjdk', # optional, can be one of: java-7-oracle, java-7-openjdk, java-6-oracle, java-6-openjdk
  version => '3.1.2.2',     # glassfish version
  extrajars => [            # extra jars to install
    "http://jdbc.postgresql.org/download/postgresql-9.2-1002.jdbc4.jar",
  ],
}

More examples on using various types:

Domain {
  user         => 'gfish',
  asadminuser  => 'admin',
  passwordfile => '/home/gfish/.aspass',
}

domain {
  'mydomain':
    ensure => present;

  'devdomain':
    ensure   => present,
    portbase => '5000';

  'myolddomain':
    ensure => absent;
}

Systemproperty {
  user         => 'gfish',
  asadminuser  => 'admin',
  passwordfile => '/home/gfish/.aspass',
}

systemproperty { 'search-url':
  ensure   => present,
  portbase => '5000',
  value    => 'http://www.google.com',
  require  => Domain['devdomain'];
}

Jdbcconnectionpool {
  ensure              => present,
  user                => 'gfish',
  asadminuser         => 'admin',
  passwordfile        => '/home/gfish/.aspass',
  datasourceclassname => 'com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource',
  resourcetype        => 'javax.sql.ConnectionPoolDataSource',
  require             => Glassfish['mydomain'],
}

jdbcconnectionpool {'MyPool':
  properties => {
    'password' => 'mYPasS',
    'user' => 'myuser',
    'url' => 'jdbc:mysql://host.ex.com:3306/mydatabase',
    'useUnicode' => true,
    'characterEncoding' => 'utf8',
    'characterResultSets' => 'utf',
    'autoReconnect' => true,
    'autoReconnectForPools' => true,
  }
}

Jdbcresource {
  ensure       => present,
  user         => 'gfish',
  passwordfile => '/home/gfish/.aspass',
}

jdbcresource { 'jdbc/MyPool':
  connectionpool => 'MyPool',
}

Customresource {
  ensure       => present,
  restype => 'java.util.Properties',
  factoryclass => 'org.glassfish.resources.custom.factory.PropertiesFactory',
}

customresource { 'custom/SampleProperties':
  properties => {
    "type" => 'local',
    "path" => '/tmp/published',
  }
}

Application {
  ensure       => present,
  user         => 'gfish',
  passwordfile => '/home/gfish/.aspass',
}

application {
  'pluto':
    source => '/home/gfish/pluto.war';

  'myhello':
    source  => '/home/gfish/hello.war',
    require => Application['pluto'];
}

Jvmoption {
  ensure       => present,
  user         => 'gfish',
  passwordfile => '/home/gfish/.aspass',
}

jvmoption {
  ['-DjvmRoute=01', '-server']:
}

Authrealm {
  ensure       => present,
  user         => 'gfish',
  asadminuser  => 'admin',
  passwordfile => '/Users/larstobi/.aspass',
}

authrealm {
  'agentRealm':
    ensure     => present,
    classname  => 'com.sun.identity.agents.appserver.v81.AmASRealm',
    properties => ['jaas-context=agentRealm:foo=bar'],
    require    => Domain['mydomain'];
}