Forge Home

tomcat

The tomcat module installs the Apache Tomcat binary distribution.

18,691 downloads

16,781 latest version

3.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.0.5 (latest)
  • 0.0.4 (deleted)
  • 0.0.2 (deleted)
released Feb 23rd 2014

Start using this module

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

Add this module to your Puppetfile:

mod '7terminals-tomcat', '0.0.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install 7terminals-tomcat --version 0.0.5

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

7terminals/tomcat — version 0.0.5 Feb 23rd 2014

####Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Prerequisites
  4. Setup - The basics of getting started with tomcat
  5. Usage - Configuration options and additional functionality
  6. Reference - An under-the-hood peek at what the module is doing and how
  7. Limitations - OS compatibility, etc.
  8. Development - Guide for contributing to the module

##Overview

The tomcat module installs the Apache Tomcat binary distribution.

##Module Description

The Tomcat module installs the Apache Tomcat binary distribution onto your nodes. You may set the Tomcat binary distribution package, the directory into which it will install, the user that will own the package, and whether or not a number of default Tomcat resources will be installed as well.

##Prerequisites

You'll also need to download the Apache Tomcat binary distribution package:

Choose the correct tar-gzipped package for your platform. Only *.tar.gz packages are supported at this time.

##Setup

###What tomcat affects

  • Tomcat base directory

This module installs a standalone version of Apache Tomcat, separate from any OS-supplied Tomcat package.

It should work on any Unix environment.

###Beginning with tomcat

include 'tomcat' in the puppet master's site.pp file is enough to get you up and running. It can also be included in any other caller module.

Set this in site.pp or in your caller module:

include tomcat

or, alternatively (to override the default parameters):

class { '::tomcat'
  source        => 'apache-tomcat-7.0.39.tar.gz',
  deploymentdir => '/home/example.com/apps/apache-tomcat',
  user          => 'example.com',
  group         => 'mygroup',
  default_webapp_docs        => 'present',
  default_webapp_examples    => 'present',
  default_webapp_hostmanager => 'present',
  default_webapp_manager     => 'present',
  default_webapp_root        => 'present'
}

Then you can use the type tomcat::install:

tomcat::install { 'example.com-tomcat':
  source        => 'apache-tomcat-7.0.39.tar.gz',
  deploymentdir => '/home/example.com/apps/apache-tomcat',
  user          => 'example.com',
  group         => 'mygroup',
  default_webapp_docs        => 'present',
  default_webapp_examples    => 'present',
  default_webapp_hostmanager => 'present',
  default_webapp_manager     => 'present',
  default_webapp_root        => 'present'
}

##Usage

##Reference

###Classes

####Public Classes

  • tomcat: Main class
  • tomcat::install: Puppet resource that installs the Tomcat binary package.

####Private Classes

  • tomcat::params: The default configuration parameters.

###Parameters

The following parameters are available in the tomcat module.

The defaults are defined in tomcat::params, and may be changed there, or overridden in the Puppet files that include the tomcat class.

#####source

The file that contains the Tomcat binary distribution. This file must be in the files directory in the caller module.
Only .tar.gz source archives are supported.

Default: apache-tomcat-7.0.50.tar.gz

#####deploymentdir

The absolute path to the directory where Tomcat will be installed.

Default: /opt/tomcat7

#####user

The Unix user that will own the Tomcat installation.

Default: tomcat

#####group

The Unix group that will own the Tomcat installation.

Default: tomcat

#####default_webapp_docs

Whether Tomcat's default webapp documentation should be present or not. Valid arguments are "present" or "absent".

Default: present

#####default_webapp_examples

Whether Tomcat's default example webapps should be present or not. Valid arguments are "present" or "absent".

Default: present

#####default_webapp_hostmanager

Whether Tomcat's default webapp for host management should be present or not. Valid arguments are "present" or "absent".

Default: present

#####default_webapp_manager

Whether Tomcat's default webapp for server configuration should be present or not. Valid arguments are "present" or "absent".

Default: present

#####default_webapp_root

Whether Tomcat's default webapp root directory should be present or not. Valid arguments are "present" or "absent".

Default: present

##Limitations

This module does not define the raw filesystem devices, nor mount any filesystems. Nor dies it create nor ensure the Unix user. Make sure the filesystem in which the Tomcat install will reside is created and mounted, and that the Unix user exists.

This module has been built and tested using Puppet 3.4.x. on RHEL6. It should work on all Unices, but your mileage may vary.

##Development

See https://github.com/7terminals/puppet-tomcat