Forge Home

tomcat6

Installs and Manages Tomcat6

12,079 downloads

12,079 latest version

2.9 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.3 (latest)
released Mar 3rd 2015
This version is compatible with:

Start using this module

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

Add this module to your Puppetfile:

mod 'landcareresearch-tomcat6', '0.1.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add landcareresearch-tomcat6
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install landcareresearch-tomcat6 --version 0.1.3

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

landcareresearch/tomcat6 — version 0.1.3 Mar 3rd 2015

Tomcat6 puppet module

Puppet Forge Bitbucket Build Status

About

This module installs, configures, and manages Apache Tomcat6. Note, uses the system's default version of java.

Requirements

Note, the puppet packages below should automatically be installed if the puppet module command is used.

  • Ubuntu Operating System.
  • Depedencies listed in the Modulefile.

Configuration

There is one class that needs to be declared. The class installs and manages a single instance of tomcat6. The tomcat6 class is a paramaterized class with 1 optional paramater. There is one defined type called tomcat6::app. The tomcat6::app defines a webapp to be installed into the typical webapp directory of tomcat.

Tomcat6 Optional Parameter

The parameters listed in this section can optionally be configured.

resources

Tomcat6 static resources defined in the context.xml file. More details about the configuraiton can be found here. This variable is an array of hashes. Valid hash values defined below.

  • name
  • auth
  • type
  • driverClassName
  • url
  • username
  • password
  • maxActive
  • minIdle
  • maxIdle
  • maxWait
  • minEvictableIdleTimeMillis
  • timeBetweenEvictionRunsMillis
  • numTestsPerEvictionRun
  • poolPreparedStatements
  • maxOpenPreparedStatements
  • testOnBorrow
  • accessToUnderlyingConnectionAllowed
  • validationQuery

Usage

This section shows example uses of the tomcat6 module.

Example 1

This example demonstrates the most basic usage of the tomcat6 module. Deploys tomcat6 with the default configuration.

class {'tomcat6': }

Example 2

This example demonstrates a static resource type configured for a web app called pidsvc.

Declaring a hash for the static resource.

$tomcat_resources = {
    pidsvc => {
        'name' => 'jdbc/pidsvc',
        'auth' => 'Container',
        'type' => 'javax.sql.DataSource',
        'driverClassName' => 'org.postgresql.Driver',
        'url' => "jdbc:postgresql://$pidservice::servername:5432/pidsvc",
        'username' => "$pidservice::db_user",
        'password' => "$pidservice::db_passwd",
        'maxActive' => '-1',
        'minIdle' => '0',
        'maxIdle' => '10',
        'maxWait' => '10000',
        'minEvictableIdleTimeMillis' => '300000',
        'timeBetweenEvictionRunsMillis' => '300000',
        'numTestsPerEvictionRun' => '20',
        'poolPreparedStatements' => 'true',
        'maxOpenPreparedStatements' => '100',
        'testOnBorrow' => 'true',
        'accessToUnderlyingConnectionAllowed' => 'true',
        'validationQuery' => 'SELECT VERSION();'
    }
}

Declaring tomcat6 with the resoures.

class { 'tomcat6': 
    resources => $tomcat_resources,
}

Declaring an app that eventually utilizes the static resource.

tomcat6::app{'pidsvc':
    war_url => 'https://cgsrv1.arrc.csiro.au/swrepo/PidService/jenkins/trunk/pidsvc-latest.war',
    jar_lib_url => 'http://jdbc.postgresql.org/download/postgresql-9.3-1100.jdbc4.jar',
}

Limitations

Only works with debian based OS's.

Development

The module is open source and available on github. Please fork!