Forge Home

tomcat

Manages tomcat (version 6 or 7) in /etc/tomcat(6)

13,682 downloads

12,169 latest version

2.6 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.4.8 (latest)
  • 0.4.7
  • 0.4.6
  • 0.4.5
  • 0.4.1
  • 0.3.0
released Feb 6th 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 'sharumpe-tomcat', '0.4.8'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add sharumpe-tomcat
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install sharumpe-tomcat --version 0.4.8

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

sharumpe/tomcat — version 0.4.8 Feb 6th 2015

tomcat

Manages tomcat on OpenSuSE. This has defined types for tomcat-users.xml's roles and users, context.xml parameters, and most-used settings in server.xml. Also configures JAVA_OPTS and CATALINA_OPTS in tomcat(6).conf. This does NOT restart Tomcat on config file changes.

This is provided as-is, YMMV.

Examples

Include the module and set some Thread counts:

class { 'tomcat' :
    version         => 7,
    ajpMaxThreads       => 700,
    ajpMinSpareThreads  => 25,
    ajpMaxSpareThreads  => 75,
}

Full list of class parameters currently recognized, with their default values:

$version            = 7,
    $httpPort           = 8080,
    $httpRedirectPort   = 8443,
    $httpsPort          = 8443,
    $ajpPort            = 8009,
    $ajpRedirectPort    = 8443,
    $ajpMaxThreads      = 150,
    $ajpMinSpareThreads = 25,
    $ajpMaxSpareThreads = 50

Enable debug:

tomcat::conf { 'config' :
    debugEnable => true,
    debugPort   => 9666,
}

Full list of tomcat::conf parameters currently recognized, with their default values:

    $debugEnable    = false,
    $debugPort      = 9666,

    $jmxEnable      = false,
    $jmxPort        = 8666,

    $memoryMin      = 128,
    $memoryMax      = 1024,
    $memoryPermGen  = 256,

    $connectTimeout = 30,
    $readTimeout    = 300,

    $java_opt       = "",
    $catalina_opt   = ""

Set a default context parameter: (see .pp for defaults)

tomcat::context::parameter { 'serverName' :
    value       => 'vagrant.localdomain',
    description => 'The serverName for use by things.',
}

Set a default context environment value: (see .pp for defaults)

tomcat::context::environment { 'deploymentType' :
    value       => 'development',
    override    => false,
    type        => 'java.lang.String',
    description => 'The deploymentType for use by things.',
}

Set a server environment value in GlobalNamingResources: (see .pp for defaults)

tomcat::server::environment { 'isVagrant' :
    value       => 'true',
    override    => false,
    type        => 'java.lang.Boolean',
    description => 'Let apps know they are in Vagrant.',
}

Set up a user for the Tomcat Manager:

tomcat::role { 'manager' : }

tomcat::user { 'manager-vagrant' :
    user        => 'vagrant',
    password    => 'vagrant',
    role        => 'manager',
}

Contact

nospam@macwebb.com

If you send email, please include "sharumpe-tomcat" in the subject line.