Skip to content

Puppet module to setup and install Apache Tomcat application server

Notifications You must be signed in to change notification settings

sprater/puppet-tomcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

####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

About

Puppet module to setup and install Apache Tomcat application server

Resources

Stars

Watchers

Forks

Packages

No packages published