Version information
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
Add this module to your Puppetfile:
mod 'puppetlabs-tomcat', '2.3.0'
Learn more about managing modules with a PuppetfileDocumentation
tomcat
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with tomcat
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Classes
- Defined types
- Parameters
- tomcat
- tomcat::config::properties::property
- tomcat::config::server
- tomcat::config::server::connector
- tomcat::config::server::context
- tomcat::config::server::engine
- tomcat::config::server::globalnamingresource
- tomcat::config::server::host
- tomcat::config::server::listener
- tomcat::config::server::realm
- tomcat::config::server::service
- tomcat::config::server::tomcat_users
- tomcat::config::server::valve
- tomcat::config::context
- tomcat::config::context::environment
- tomcat::config::context::manager
- tomcat::config::context::resource
- tomcat::config::context::resourcelink
- tomcat::config::context::valve
- tomcat::install
- tomcat::instance
- tomcat::service
- tomcat::setenv::entry
- tomcat::war
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
The tomcat module lets you use Puppet to install, deploy, and configure Tomcat web services.
Module Description
Tomcat is a Java web service provider. The tomcat module lets you use Puppet to install Tomcat, manage its configuration file, and deploy web apps to it. It supports multiple instances of Tomcat spanning multiple versions.
Setup
Requirements
The tomcat module requires puppetlabs-stdlib version 4.0 or newer. On Puppet Enterprise you must meet this requirement before installing the module. To update stdlib, run:
puppet module upgrade puppetlabs-stdlib
Beginning with tomcat
The simplest way to get Tomcat up and running with the tomcat module is to install the Tomcat source and start the service:
tomcat::install { '/opt/tomcat':
source_url => 'https://www-us.apache.org/dist/tomcat/tomcat-7/v7.0.x/bin/apache-tomcat-7.0.x.tar.gz',
}
tomcat::instance { 'default':
catalina_home => '/opt/tomcat',
}
Note: look up the correct version you want to install on the version list.
Usage
I want to run multiple instances of multiple versions of Tomcat
class { 'java': }
tomcat::install { '/opt/tomcat9':
source_url => 'https://www.apache.org/dist/tomcat/tomcat-9/v9.0.x/bin/apache-tomcat-9.0.x.tar.gz'
}
tomcat::instance { 'tomcat9-first':
catalina_home => '/opt/tomcat9',
catalina_base => '/opt/tomcat9/first',
}
tomcat::instance { 'tomcat9-second':
catalina_home => '/opt/tomcat9',
catalina_base => '/opt/tomcat9/second',
}
# Change the default port of the second instance server and HTTP connector
tomcat::config::server { 'tomcat9-second':
catalina_base => '/opt/tomcat9/second',
port => '8006',
}
tomcat::config::server::connector { 'tomcat9-second-http':
catalina_base => '/opt/tomcat9/second',
port => '8081',
protocol => 'HTTP/1.1',
additional_attributes => {
'redirectPort' => '8443'
},
}
tomcat::install { '/opt/tomcat7':
source_url => 'http://www-eu.apache.org/dist/tomcat/tomcat-7/v7.0.x/bin/apache-tomcat-7.0.x.tar.gz',
}
tomcat::instance { 'tomcat7':
catalina_home => '/opt/tomcat7',
}
# Change tomcat 7's server and HTTP/AJP connectors
tomcat::config::server { 'tomcat7':
catalina_base => '/opt/tomcat7',
port => '8105',
}
tomcat::config::server::connector { 'tomcat7-http':
catalina_base => '/opt/tomcat7',
port => '8180',
protocol => 'HTTP/1.1',
additional_attributes => {
'redirectPort' => '8543'
},
}
tomcat::config::server::connector { 'tomcat7-ajp':
catalina_base => '/opt/tomcat7',
port => '8109',
protocol => 'AJP/1.3',
additional_attributes => {
'redirectPort' => '8543'
},
}
Note: look up the correct version you want to install on the version list.
I want to configure SSL and specify which protocols and ciphers to use
file { $keystore_path:
ensure => present,
source => $keystore_source,
owner => $keystore_user,
mode => '0400',
checksum => 'md5',
checksum_value => $keystore_checksum,
} ->
tomcat::config::server::connector { "${tomcat_instance}-https":
catalina_base => $catalina_base,
port => $https_port,
protocol => $http_version,
purge_connectors => true,
additional_attributes => {
'SSLEnabled' => bool2str($https_enabled),
'maxThreads' => $https_connector_max_threads,
'scheme' => $https_connector_scheme,
'secure' => bool2str($https_connector_secure),
'clientAuth' => bool2str($https_connector_client_auth),
'sslProtocol' => $https_connector_ssl_protocol,
'sslEnabledProtocols' => join($https_connector_ssl_protocols_enabled, ","),
'ciphers' => join($ciphers_enabled, ","),
'keystorePass' => $keystore_pass.unwrap,
'keystoreFile' => $keystore_path,
},
}
See also: SSL/TLS Configuration HOW-TO
I want to deploy WAR files
Add the following to any existing installation with your own war source:
tomcat::war { 'sample.war':
catalina_base => '/opt/tomcat9/first',
war_source => '/opt/tomcat9/webapps/docs/appdev/sample/sample.war',
}
The name of the WAR file must end with .war
.
The war_source
can be a local path or a puppet:///
, http://
, or ftp://
URL.
I want to remove some configuration
Different configuration defined types will allow an ensure parameter to be passed, though the name may vary based on the defined type.
To remove a connector, for instance, the following configuration ensure that it is absent:
tomcat::config::server::connector { 'tomcat9-jsvc':
connector_ensure => 'absent',
catalina_base => '/opt/tomcat9/first',
port => '8080',
protocol => 'HTTP/1.1',
}
I want to manage a Connector or Realm that already exists
Describe the Realm or HTTP Connector element using tomcat::config::server::realm
or tomcat::config::server::connector
, and set purge_realms
or purge_connectors
to true
.
tomcat::config::server::realm { 'org.apache.catalina.realm.LockOutRealm':
realm_ensure => 'present',
purge_realms => true,
}
Puppet removes any existing Connectors or Realms and leaves only the ones you've specified.
Reference
Classes
Public Classes
tomcat
: Main class. Manages some of the defaults for installing and configuring Tomcat.
Private Classes
tomcat::params
: Manages Tomcat parameters.
Defined Types
Public Defined Types
tomcat::config::properties::property
: Adds a property to catalina.properties filetomcat::config::server
: Configures attributes for the Server element in$CATALINA_BASE/conf/server.xml
.tomcat::config::server::connector
: Configures Connector elements in$CATALINA_BASE/conf/server.xml
.tomcat::config::server::context
: Configures Context elements in$CATALINA_BASE/conf/server.xml
.tomcat::config::server::engine
: Configures Engine elements in$CATALINA_BASE/conf/server.xml
.tomcat::config::server::globalnamingresource
: Configures Global Resource elementstomcat::config::server::host
: Configures Host elements in$CATALINA_BASE/conf/server.xml
.tomcat::config::server::listener
: Configures Listener elements in$CATALINA_BASE/conf/server.xml
.tomcat::config::server::realm
: Configures Realm elements in$CATALINA_BASE/conf/server.xml
.tomcat::config::server::service
: Configures a Service element element nested in theServer
element in$CATALINA_BASE/conf/server.xml
.tomcat::config::server::tomcat_users
: Configures user and role elements for [UserDatabaseRealm] (http://tomcat.apache.org/tomcat-8.0-doc/realm-howto.html#UserDatabaseRealm) or [MemoryRealm] (http://tomcat.apache.org/tomcat-8.0-doc/realm-howto.html#MemoryRealm) in$CATALINA_BASE/conf/tomcat-users.xml
or any other specified file.tomcat::config::server::valve
: Configures a Valve element in$CATALINA_BASE/conf/server.xml
.tomcat::config::context
: Configures a Context element in$CATALINA_BASE/conf/context.xml
.tomcat::config::context::manager
: Configures a Manager element in$CATALINA_BASE/conf/context.xml
.tomcat::config::context::environment
: Configures a Environment element in$CATALINA_BASE/conf/context.xml
.tomcat::config::context::resource
: Configures a Resource element in$CATALINA_BASE/conf/context.xml
.tomcat::config::context::resourcelink
: Configures a ResourceLink element in$CATALINA_BASE/conf/context.xml
.tomcat::config::context::valve
: Configures a Valve element in$CATALINA_BASE/conf/context.xml
.tomcat::install
: Installs a Tomcat instance.tomcat::instance
: Configures a Tomcat instance.tomcat::service
: Provides Tomcat service management.tomcat::setenv::entry
: Adds an entry to a Tomcat configuration file (for example,setenv.sh
or/etc/sysconfig/tomcat
).tomcat::war
: Manages the deployment of WAR files.
Private defined types
tomcat::install::package
: Installs Tomcat from a package.tomcat::install::source
: Installs Tomcat from source.tomcat::instance::copy_from_home
: Copies required files from installation to instancetomcat::instance::dependencies
: Declares puppet dependency chain for an instance.tomcat::config::properties
: Creates instance catalina.properties
Parameters
All parameters are optional except where otherwise noted.
tomcat
The base class sets defaults used by other defined types, such as tomcat::install
and tomcat::instance
, such as a default catalina_home
.
catalina_home
Specifies the default root directory of the Tomcat installation.
Valid options: a string containing an absolute path.
Default value: '/opt/apache-tomcat'.
group
Specifies a default group to run Tomcat as.
Valid options: a string containing a valid group name.
Default value: 'tomcat'.
manage_group
Determines whether defined types should default to creating the specified group, if it doesn't exist. Uses Puppet's native group
resource type with default parameters.
Valid options: Boolean.
Default value: true
.
manage_user
Determines whether defined types should default to creating the specified user, if it doesn't exist. Uses Puppet's native user
resource type with default parameters.
Valid options: Boolean.
Default value: true
.
manage_base
Specifies the default value of manage_base
for all tomcat::install
instances.
Default value: true
.
manage_home
Specifies the default value of manage_home
for all tomcat::instance
instances.
Default value: true
.
manage_properties
Specifies the default value of manage_properties
for all tomcat::instance
instances.
Default value: true
.
purge_connectors
Specifies whether to purge any unmanaged Connector elements that match defined protocol but have a different port from the configuration file by default.
Valid options: Boolean.
Default value: false
.
purge_realms
Specifies whether to purge any unmanaged realm elements from the configuration file by default.
Valid options: Boolean.
Default value: false
. If two realms are defined for a specific server config only use purge_realms
for the first realm and ensure the realms enforce a strict order between each other.
user
Specifies a default user to run Tomcat as.
Valid options: a string containing a valid username.
Default value: 'tomcat'.
tomcat::config::properties::property
Specifies an additional entry for the catalina.properties file a given catalina base.
property
The name of the property.
Default value: $name
.
catalina_base
The catalina base of the catalina.properties file. The resource will manage the values in ${catalina_base}/conf/catalina.properties
.
Required
value
The value of the property.
Required
tomcat::config::server
address
Specifies a TCP/IP address on which to listen for the shutdown command. Maps to the address XML attribute.
Valid options: a string.
Default value: undef
.
address_ensure
Specifies whether the address XML attribute should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
catalina_base
Specifies the base directory of the Tomcat installation to manage.
Valid options: a string containing an absolute path.
Default value: '$tomcat::catalina_home'.
class_name
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute in the configuration file.
Valid options: a string containing a Java class name.
Default value: undef
.
class_name_ensure
Specifies whether the className XML attribute should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
port
Specifies a port on which to listen for the designated shutdown command. Maps to the port XML attribute.
Valid options: a string containing a port number.
Default value: undef
.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
shutdown
Designates a command that shuts down Tomcat when the command is received through the specified address and port. Maps to the shutdown XML attribute.
Valid options: a string.
Default value: undef
.
tomcat::config::server::connector
additional_attributes
Specifies any further attributes to add to the Connector.
Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
.
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
catalina_base
Specifies the base directory of the Tomcat installation to manage.
Valid options: a string containing an absolute path.
Default value: '$::tomcat/catalina_home'.
connector_ensure
Specifies whether the Connector XML element should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
parent_service
Specifies which Service element the Connector should nest under.
Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'.
port
Required if connector_ensure
is set to true
or 'present'. Sets a TCP port on which to create a server socket. Maps to the port XML attribute.
Valid options: a string.
protocol
Specifies a protocol to use for handling incoming traffic. Maps to the protocol XML attribute.
Valid options: a string.
Default value: $name
.
purge_connectors
Specifies whether to purge any unmanaged Connector elements that match defined protocol but have a different port from the configuration file.
Valid options: Boolean.
Default value: false
.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
tomcat::config::server::context
additional_attributes
Specifies any further attributes to add to the Context.
Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
.
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
catalina_base
Specifies the base directory of the Tomcat installation to manage.
Valid options: a string containing an absolute path.
Default value: '$::tomcat/catalina_home'.
context_ensure
Specifies whether the Context XML element should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
doc_base
Specifies a Document Base (or Context Root) directory or archive file. Maps to the docBase XML attribute.
Valid options: a string containing a path (either an absolute path or a path relative to the appBase directory of the owning Host).
Default value: $name
.
parent_engine
Specifies which Engine element the Context should nest under. Only valid if parent_host
is specified.
Valid options: a string containing the name attribute of the Engine.
Default value: undef
.
parent_host
Specifies which Host element the Context should nest under.
Valid options: a string containing the name attribute of the Host.
Default value: undef
.
parent_service
Specifies which Service XML element the Context should nest under.
Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
tomcat::config::server::engine
background_processor_delay
Determines the delay between invoking the backgroundProcess method on this engine and its child containers. Maps to the backgroundProcessorDelay XML attribute.
Valid options: an integer, in seconds.
Default value: undef
.
background_processor_delay_ensure
Specifies whether the backgroundProcessorDelay XML attribute should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
catalina_base
Specifies the base directory of the Tomcat installation to manage.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
class_name
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute.
Valid options: a string containing a Java class name.
Default value: undef
.
class_name_ensure
Specifies whether the className XML attribute should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
default_host
Required. Specifies a host to handle any requests directed to hostnames that exist on the server but are not defined in this configuration file. Maps to the defaultHost XML attribute of the Engine.
Valid options: a string containing a hostname.
engine_name
Specifies the logical name of the Engine, used in log and error messages. Maps to the name XML attribute.
Valid options: a string.
Default value: the name
passed in your defined type.
jvm_route
Specifies an identifier to enable session affinity in load balancing. Maps to the jvmRoute XML attribute.
Valid options: string.
Default value: undef
.
jvm_route_ensure
Specifies whether the jvmRoute XML attribute should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
parent_service
Specifies which Service element the Engine should nest under.
Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
start_stop_threads
Sets how many threads the Engine should use to start child Host elements in parallel. Maps to the startStopThreads XML attribute.
Valid options: a string.
Default value: undef
.
start_stop_threads_ensure
Specifies whether the startStopThreads XML attribute should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
tomcat::config::server::globalnamingresource
Configure GlobalNamingResources Resource elements in '$CATALINA_BASE/conf/server.xml'
ensure
Determines whether the specified XML element should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
resource_name
Optionally override the globalnamingresource name that is normally taken from the Puppet resource's $name
.
catalina_base
Specifies the base directory of the Tomcat instance.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
type
Specifies the type of element to create
Valid options: Resource
, Environment
or any other valid node.
Default value: Resource
.
Note: This is used verbatim in your configuration so make sure the case is correct.
additional_attributes
Specifies any further attributes to add to the Host.
Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
.
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
tomcat::config::server::host
additional_attributes
Specifies any further attributes to add to the Host.
Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
.
aliases
Optional array that specifies the list of Host Name Aliases for this particular Host. If omitted, any currently-defined Aliases will not be altered. If present, the list Aliases will be set to exactly match the contents of this array. Thus, for example, an empty array can be used to explicitly force there to be no Aliases for the Host.
app_base
Required unless host_ensure
is set to false
or 'absent'. Specifies the Application Base directory for the virtual host. Maps to the appBase XML attribute.
Valid options: a string.
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
catalina_base
Specifies the base directory of the Tomcat installation to manage.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
host_ensure
Specifies whether the virtual host (the Host XML element) should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
host_name
Specifies the network name of the virtual host, as registered on your DNS server. Maps to the name XML attribute.
Valid options: a string.
Default value: the 'name' passed in your defined type.
parent_service
Specifies which Service element the Host should nest under.
Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
tomcat::config::server::listener
additional_attributes
Specifies any further attributes to add to the Listener.
Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
.
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
catalina_base
Specifies the base directory of the Tomcat installation.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
class_name
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute of a Listener Element.
Valid options: a string containing a Java class name.
Default value: $name
.
listener_ensure
Specifies whether the Listener XML element should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
parent_engine
Specifies which Engine element this Listener should nest under.
Valid options: a string containing the name attribute of the Engine.
Default value: undef
.
parent_host
Specifies which Host element this Listener should nest under.
Valid options: a string containing the name attribute of the Host.
Default value: undef
.
parent_service
Specifies which Service element the Listener should nest under. Only valid if parent_engine
or parent_host
is specified.
Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
tomcat::config::server::realm
additional_attributes
Specifies any further attributes to add to the Realm element.
Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
.
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
catalina_base
Specifies the base directory of the Tomcat installation.
Default value: '$::tomcat::catalina_home'.
class_name
Specifies the Java class name of a Realm implementation to use. Maps to the className XML attribute.
Valid options: a string containing a Java class name.
Default value: the name
passed in your defined type.
parent_engine
Specifies which Engine element this Realm should nest under.
Valid options: a string containing the name attribute of the Engine.
Default value: 'Catalina'.
parent_host
Specifies which Host element this Realm should nest under.
Valid options: a string containing the name attribute of the Host.
Default value: undef
.
parent_realm
Specifies which Realm element this Realm should nest under.
Valid options: a string containing the className attribute of the Realm element.
Default value: undef
.
parent_service
Specifies which Service element this Realm element should nest under.
Valid options: a string containing the name attribute of the Service.
Default value: 'Catalina'.
purge_realms
Specifies whether to purge any unmanaged Realm elements from the configuration file.
Valid options: Boolean.
Default value: false
.
realm_ensure
Specifies whether the Realm element should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
tomcat::config::server::service
catalina_base
Specifies the base directory of the Tomcat installation.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
class_name
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute.
Valid options: a string containing a Java class name.
Default value: undef
.
class_name_ensure
Specifies whether the className XML attribute should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
service_ensure
Specifies whether the Service element should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
tomcat::config::server::tomcat_users
catalina_base
Specifies the base directory of the Tomcat installation.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
element
Specifies the type of element to manage.
Valid options: 'user' or 'role'.
Default value: user
.
element_name
Sets the element's username (or rolename, if element
is set to 'role').
Valid options: a string.
Default value: $name
.
ensure
Determines whether the specified XML element should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
file
Specifies the configuration file to manage.
Valid options: a string containing a fully-qualified path.
Default value: '$CATALINA_BASE/conf/tomcat-users.xml'.
group
Specifies the group of the configuration file.
Default value: $::tomcat::group
.
manage_file
Specifies whether to create the specified configuration file if it doesn't exist. Uses Puppet's native file
resource type with default parameters.
Valid options: Boolean.
Default value: true
.
owner
Specifies the owner of the configuration file.
Default value: $::tomcat::user
.
password
Specifies a password for user elements.
Valid options: a string.
Default value: undef
.
roles
Specifies one or more roles. Only valid if element
is set to 'role' or 'user'.
Valid options: an array of strings.
Default value: []
.
tomcat::config::server::valve
additional_attributes
Specifies any further attributes to add to the Valve.
Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
.
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
catalina_base
Specifies the base directory of the Tomcat installation.
Valid options: a string containing an absolute path.
Default value: $::tomcat::catalina_home
.
class_name
Specifies the Java class name of a server implementation to use. Maps to the className XML attribute.
Valid options: a string containing a Java class name.
Default value: the 'name' passed in your defined type.
parent_host
Specifies which virtual host the Valve should nest under.
Valid options: a string containing the name of a Host element.
Default value: If you don't specify a host, the Valve element nests under the Engine of your specified parent Service.
parent_service
Specifies which Service element the Valve should nest under.
Valid options: a string containing the name of a Service element.
Default value: 'Catalina'.
parent_context
Specifies which Context element the Valve should nest under.
Valid options: a string containing the name of a Context element (matching the docbase attribute).
Default value: If you don't specify a context, the Valve element nests under either the Parent Host if defined or the Engine of your specified parent Service.
server_config
Specifies a server.xml file to manage.
Valid options: a string containing an absolute path.
Default value: '${catalina_base}/config/server.xml'.
valve_ensure
Specifies whether the Valve should exist in the configuration file. Maps to the Valve XML element.
Valid options: 'present', 'absent'.
Default value: 'present'.
tomcat::config::context
Specifies a configuration Context element in ${catalina_base}/conf/context.xml
for other tomcat::config::context::*
defined types.
catalina_base
Specifies the root of the Tomcat installation.
tomcat::config::context::manager
Specifies a Manager element in the designated xml configuration.
ensure
specifies whether you are trying to add or remove the Manager element.
Valid options: 'present', 'absent'.
Default value: 'present'.
catalina_base
Specifies the root of the Tomcat installation.
Default value: '$tomcat::catalina_home'.
manager_classname
The name of the Manager to be created.
Default value: $name
.
additional_attributes
Specifies any additional attributes to add to the Manager.
Should be a hash of the format 'attribute' => 'value'.
Optional
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
tomcat::config::context::environment
Specifies Environment elements in ${catalina_base}/conf/context.xml
ensure
Specifies whether you are trying to add or remove the Environment element
Valid options: 'present', 'absent'.
Default value: 'present'.
environment_name
The name of the Environment Entry to be created, relative to the java:comp/env
context.
Default value: $name
.
type
The fully qualified Java class name expected by the web application for this environment entry.
Required to create the environment entry.
value
The value that will be presented to the application when requested from the JNDI context.
Required to create the environment entry.
description
The description is an an optional string for a human-readable description of this environment entry.
override
An optional string or Boolean to specify if you do not want an <env-entry>
for the same environment entry name to override the value specified here (set it to false
).
By default, overrides are allowed.
catalina_base
Specifies the root of the Tomcat installation.
Default value: '$tomcat::catalina_home'.
additional_attributes
Specifies any additional attributes to add to the Environment.
Should be a hash of the format 'attribute' => 'value'.
Optional
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
tomcat::config::context::resource
Specifies Resource elements in ${catalina_base}/conf/context.xml
ensure
Specifies whether you are trying to add or remove the Resource element.
Valid options: 'present', 'absent'.
Defaults value: 'present'
resource_name
The name of the Resource to be created, relative to the java:comp/env
context.
Default value: $name
.
resource_type
The fully qualified Java class name expected by the web application when it performs a lookup for this resource. Required to create the resource.
catalina_base
Specifies the root of the Tomcat installation.
Default value: '$tomcat::catalina_home'.
additional_attributes
Specifies any additional attributes to add to the Valve.
Should be a hash of the format 'attribute' => 'value'.
Optional
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
tomcat::config::context::valve
Specifies Valve elements in ${catalina_base}/conf/context.xml
ensure
Specifies whether you are trying to add or remove the Valve element.
Valid values are 'present', 'absent'.
Defaults to 'present'
resource_name
The name of the Resource to be created, relative to the java:comp/env context.
Default: $name
resource_type
The fully qualified Java class name expected by the web application when it performs a lookup for this resource. Required to create the resource.
catalina_base
Specifies the root of the Tomcat installation.
Default: $tomcat::catalina_home
additional_attributes
Specifies any further attributes to add to the Valve.
Valid options: a hash of '< attribute >' => '< value >' pairs.
Default value: {}
.
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
tomcat::config::context::resourcelink
Specifies a ResourceLink element in the designated xml configuration.
ensure
specifies whether you are trying to add or remove the ResourceLink element.
Valid options: 'present', 'absent'.
Default value: 'present'.
catalina_base
Specifies the root of the Tomcat installation.
Default value: $tomcat::catalina_home
.
resourcelink_name
The name of the ResourceLink to be created, relative to the java:comp/env
context.
Default value: $name
.
resourcelink_type
The fully qualified Java class name expected by the web application when it performs a lookup for this resource link.
additional_attributes
Specifies any additional attributes to add to the Valve.
Should be a hash of the format 'attribute' => 'value'.
Optional
attributes_to_remove
Specifies an array of attributes to remove from the element.
Valid options: an array of strings.
Default value: []
.
tomcat::install
Installs the software into the given directory from a source Apache Tomcat tarball. Alternatively, it may be used to install a tomcat package.
Tomcat instances may then be created from the install using tomcat::instance
and pointing tomcat::instance::catalina_home
to the directory managed by tomcat::install
.
catalina_home
specifies the directory of the Tomcat installation from which the instance should be created.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
install_from_source
Specifies whether to install from source or from a package. If set to true
installation uses the source_url
, source_strip_first_dir
, user
, group
, manage_user
, and manage_group
parameters. If set to false
installation uses the package_ensure
, package_name
, and package_options
parameters.
Valid options: Boolean.
Default value: true
.
source_url
In single-instance mode: Required if install_from_source
is set to true
. Specifies the source URL to install from.
Valid options: a string containing a puppet://
, http(s)://
, or ftp://
URL.
source_strip_first_dir
Specifies whether to strip the topmost directory of the tarball when unpacking it. Only valid if install_from_source
is set to true
.
Valid options: Boolean.
Default value: true
.
proxy_server
Specifies a proxy server to use when downloading Tomcat binaries. For example, 'https://example.com:8080'.
Default value: undef
.
proxy_type
Specifies the proxy server type used by proxy_server
. Normally this defaults to the protocol specified in the proxy_server
URI.
Default value: auto-detected from proxy_server
.
Valid options: 'none', 'http', 'https', 'ftp'.
allow_insecure
Specifies if HTTPS errors should be ignored when downloading the source tarball.
Default value: false
.
Valid options: Boolean.
user
Specifies the owner of the source installation directory.
Default value: $::tomcat::user
.
group
Specifies the group of the source installation directory.
Default value: $::tomcat::group
.
manage_user
Specifies whether the user should be managed by this module or not.
Default value: $::tomcat::manage_user
.
manage_group
Specifies whether the group should be managed by this module or not.
Default value: $::tomcat::manage_group
.
manage_home
Specifies whether the directory of catalina_home should be managed by puppet. This may not be preferable in network filesystem environments.
Default value: true
.
package_ensure
Determines whether the specified package should be installed. Only valid if install_from_source
is set to false
. Maps to the ensure
parameter of Puppet's native package
resource type.
Default value: 'present'.
package_name
Required if install_from_source
is set to false
. Specifies the package to install.
Valid options: a string containing a valid package name.
package_options
Unused if install_from_source
is set to true
. Specify additional options to use on the generated package resource. See the documentation of the package
resource type for possible values.
tomcat::instance
Declares a tomcat instance.
There are two different modes of use: a single tomcat installation and instance (called 'single-instance' by this readme), or a single tomcat installation with multiple instances, each with its own directory structure (called 'multi-instance' by this readme).
- single-instance: If a
tomcat::instance
is declared withcatalina_home
andcatalina_base
both pointing to the directory of atomcat::install
then it only configures a single instance. - multi-instance: If a
tomcat::instance
is declared withcatalina_home
pointing to the same directory as atomcat::install
andcatalina_base
pointing at a different directory then it is configured as an instance of the Apache Tomcat software. Multiple instances of a single install may be created using this method. Atomcat::install
declaration should use a user and/or group such thattomcat::instance
declarations can access the install.
catalina_base
Specifies the $CATALINA_BASE
of the Tomcat instance where logs, configuration files, and the 'webapps' directory are managed. For single-instance installs, this is the same as the catalina_home
parameter
Valid options: a string containing an absolute path.
Default value: $catalina_home
.
catalina_home
Specifies the directory where the Apache Tomcat software is installed by a tomcat::install
resource.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
dir_list
Specifies the subdirectories under catalina_base
to be managed for an instance (disabled via manage_dirs
Boolean).
Valid options: an array of strings, each being a relative subdirectory to catalina_base
.
Default value: ['bin','conf','lib','logs','temp','webapps','work']
.
dir_mode
Specifies a mode for the managed subdirectories under catalina_base
for an instance (as specified in dir_list
and disabled via manage_dirs
Boolean).
Valid option: a string containing a standard Linux mode.
Default value: '2770'.
copy_from_home_list
Specifies the full path of config files to copy from catalina_home
to catalina_base
for an instance (disabled via manage_copy_from_home
Boolean).
Valid options: array of strings containing path + filename.
Default value: [ '${_catalina_base}/conf/catalina.policy', '${_catalina_base}/conf/context.xml', '${_catalina_base}/conf/logging.properties', '${_catalina_base}/conf/server.xml', '${_catalina_base}/conf/web.xml', ]
copy_from_home_mode
Specifies the file mode when copying the initial config files from catalina_home
to catalina_base
.
Valid options: a string containing a standard Linux mode.
Default value: '0660'.
group
Specifies the group of the instance directories and files.
Default value: $::tomcat::group
.
java_home
Specifies the java home to be used when declaring a tomcat::service
instance. See [tomcat::service](# tomcatservice)
manage_base
Specifies whether the directory of catalina_base should be managed by Puppet. This might not be preferable in network filesystem environments.
Default value: true
.
manage_dirs
Determines whether subdirectories for catalina_base
should be managed as part of tomcat::instance. The default directories are listed in dir_list
.
Valid options: Boolean.
manage_copy_from_home
Specifies whether to copy the initial config files from catalina_home
to catalina_base
.
Valid options: Boolean.
Default value: true
.
manage_group
Specifies whether the group should be managed by this module or not.
Default value: $::tomcat::manage_group
.
manage_properties
Specifies whether the catalina.properties
file is created and managed. If true
, custom modifications to this file will be overwritten during runs
Valid options: Boolean
Default value: true
.
manage_service
Specifies whether a tomcat::service
corresponding to this instance should be declared.
Valid options: Boolean
Default value: true
(multi-instance installs), false
()single-instance installs).
manage_user
Specifies whether the user should be managed by this module or not.
Default value: $::tomcat::manage_user
.
use_init
Specifies whether an init script should be managed when declaring a tomcat::service
instance. See [tomcat::service](# tomcatservice)
use_jsvc
Specifies whether jsvc should be used when declaring a tomcat::service
instance.
Note that this module will not compile and install jsvc for you. See [tomcat::service](# tomcatservice)
user
Specifies the owner of the instance directories and files.
Default value: $::tomcat::user
.
tomcat::service
catalina_base
Specifies the base directory of the Tomcat installation.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
catalina_home
Specifies the root directory of the Tomcat installation.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home'.
java_home
Specifies where Java is installed. Only applies if use_jsvc
is set to true
.
Valid options: a string containing an absolute path.
Default value: undef
.
Note: If you don't specify a home path in this parameter, Puppet does not pass the
-home
switch to Tomcat. That can cause problems on some systems, so we recommend including this parameter.
service_enable
Specifies whether to enable the Tomcat service at boot. Only valid if use_init
is set to true
.
Valid options: Boolean.
Default value: true
, if use_init
is set to true
and service_ensure
is set to 'running' or true
.
service_ensure
Specifies whether the Tomcat service should be running. Maps to the ensure
parameter of Puppet's native service
resource type.
Valid options: 'running', 'stopped', true
, false
.
Default value: 'present'.
service_name
Required if use_init
is set to true
. Specifies the name of the Tomcat service.
Valid options: a string.
start_command
Designates a command to start the service.
Valid options: a string.
Default value: determined by the values of use_init
and use_jsvc
.
status_command
Designates a command to get the status of the service.
Valid options: a string.
Default value: determined by the values of use_init
and use_jsvc
.
stop_command
Designates a command to stop the service.
Valid options: a string.
Default value: determined by the values of use_init
and use_jsvc
.
use_init
Specifies whether to use a package-provided init script for service management.
$CATALINA_HOME/bin/catalina.sh start
$CATALINA_HOME/bin/catalina.sh stop
Valid options: Boolean.
Default value: false
.
Note that the tomcat module does not supply an init script. If both
use_jsvc
anduse_init
are set tofalse
, tomcat uses the following commands for service management:
use_jsvc
Specifies whether to use Jsvc for service management. If both use_jsvc
and use_init
are set to false
, tomcat uses the following commands for service management:
$CATALINA_HOME/bin/catalina.sh start
$CATALINA_HOME/bin/catalina.sh stop
Valid options: Boolean.
Default value: false
.
user
The user of the jsvc process when use_init => true
tomcat::setenv::entry
config_file
Specifies the configuration file to edit.
Valid options: a string containing an absolute path.
Default value: '$::tomcat::catalina_home/bin/setenv.sh.
ensure
Determines whether the fragment should exist in the configuration file.
Valid options: 'present', 'absent'.
Default value: 'present'.
group
Specifies the group of the config file.
Default value: $::tomcat::group
.
order
Determines the ordering of your parameters in the configuration file (parameters with lower order
values appear first.)
Valid options: an integer or a string containing an integer.
Default value: 10
.
addto
Defines an additional environment variable that will be added to the beginning of the param
param
Specifies a parameter to manage.
Valid options: a string.
Default value: the name
passed in your defined type.
quote_char
Specifies a character to include before and after the specified value.
Valid options: a string (usually a single or double quote).
Default value: (blank).
user
Specifies the owner of the config file.
Default value: $::tomcat::user
.
value
Required. Provides the value(s) of the managed parameter.
Valid options: a string or an array. If passing an array, separate values with a single space.
doexport
Specifies if you want to append export to the entry.
Valid options: Boolean
Default value: true
.
tomcat::war
allow_insecure
Specifies if HTTPS errors should be ignored when downloading the war tarball.
Default value: false
,
Valid options: Boolean.
app_base
Specifies where to deploy the WAR. Cannot be used in combination with deployment_path
.
Valid options: a string containing a path relative to $CATALINA_BASE
.
Default value: If you don't specify an app_base
, Puppet deploys the WAR to your specified deployment_path
. If you don't specify that either, the WAR deploys to ${catalina_base}/webapps
.
catalina_base
Specifies the base directory of the Tomcat installation.
Valid options: a string containing an absolute path.
Default value: $::tomcat::catalina_home
.
deployment_path
Specifies where to deploy the WAR. Cannot be used in combination with app_base
.
Valid options: a string containing an absolute path.
Default value: If you don't specify a deployment_path
, Puppet deploys the WAR to your specified app_base
. If you don't specify that either, the WAR deploys to ${catalina_base}/webapps
.
war_ensure
Specifies whether the WAR should exist.
Valid options: 'present', 'absent'.
Default value: 'present'.
war_name
Specifies the name of the WAR.
Valid options: a string containing a filename that ends in '.war'.
Default value: the name
passed in your defined type.
war_purge
Specifies whether to purge the exploded WAR directory. Only applicable when war_ensure
is set to 'absent' or false
.
Valid options: Boolean.
Default value: true
.
Note: Setting this parameter to
false
does not prevent Tomcat from removing the exploded WAR directory if Tomcat is running and autoDeploy is set totrue
.
war_source
Required unless war_ensure
is set to false
or 'absent'. Specifies the source to deploy the WAR from.
Valid options: a string containing a puppet://
, http(s)://
, or ftp://
URL.
user
The 'owner' of the tomcat war file.
Default value: 'tomcat'.
group
The 'group' owner of the tomcat war file.
Default value: 'tomcat'.
Limitations
This module only supports Tomcat installations on Unix-like systems. The tomcat::config::server*
defined types require Augeas version 1.0.0 or newer.
Multiple Instances
Some Tomcat packages do not let you install more than one instance. You can avoid this limitation by installing Tomcat from source.
Development
Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can't access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
For more information, see our module contribution guide.
Contributors
To see who's already involved, see the list of contributors.
Running tests
This project contains tests for both rspec-puppet and beaker-rspec to verify functionality. For in-depth information, please see their respective documentation.
Quickstart:
gem install bundler
bundle install
bundle exec rake spec
bundle exec rspec spec/acceptance
RS_DEBUG=yes bundle exec rspec spec/acceptance
Supported Release [2.3.0]
Summary
A release that introduced the module to the PDK through conversion. Also a dependancy bump on the archive module along with a small fix.
Changed
- puppet/archive compatibility version bumped from 2.0.0 to 3.0.0.
- Module is now converted with PDK 1.3.2.
Fixed
- (MODULES-6626) Fixed the generated shell when using addto.
Supported Release 2.2.0
Summary
A clean release made in order to Rubocop the module.
Changed
- Gemfile updates.
- Module sync updates.
- All ruby files altered to match the current rubocop standards.
Added
- Flexibility added to directory management in tomcat::instance.
- flexibility added to copy_from_home.
- Can now set status_command.
Fixed
- Spaces now accounted for in context elements.
- tomcat::war now copies the war as root user and not as tomcat.
- Syntax error in $addto parameter in tomcat::setenv::entry fixed.
- Test fix for Tomcat 8.
- Fix added to the travis/sync file via modulesync.
Removed
- Unsupported Debian 6.
Supported Release 2.1.0
Summary
Addition of user and group to tomcat war file, along with a couple of docs updates and some old Ubuntu support dropped.
Added
- User/group to tomcat war file.
Fixed
- Update to README around SSL configuration.
- A couple of other simple readme fixes.
- Lint warnings.
Removed
- Unsupported versions of Ubuntu 10.04, 12.04.
Supported Release 2.0.0
Summary
This major release drops puppet 3, changes dependencies from staging to archive, and adds various "real world" configuration abilities.
Changed
- Dependency puppet-staging (which is deprecated) removed in favor of puppet-archive
- Dropped compatibility with puppet 3.x series
- Remove
true
/false
as valid values for all ensure attributes as they are ambiguous.
Removed
- Deprecated
tomcat::setenv::entry
attributebase_path
. Useconfig_file
instead. - Base
tomcat
classinstall_from_source
parameter now does nothing. Usetomcat::install
attributeinstall_from_source
directly instead. - No longer testing tomcat 6 as it is EOL and removed from the mirrors.
tomcat::install
attributeenvironment
previously used for proxy settings. Useproxy_server
andproxy_type
instead.
Deprecated
tomcat::instance
define parametersinstall_from_source
,source_url
,source_strip_first_dir
,package_ensure
,package_name
, andpackage_options
have been unofficially deprecated since 1.5.0 and are now formally deprecated. Please usetomcat::install
instead and point anytomcat::instance::catalina_home
there. See the readme for further examples.
Added
- Compatibility with puppet 5.x series
- Puppet 4.x data type parameter validation.
tomcat::config::server::realm
Can manage multiple realms of identical class names.tomcat::config::server::tomcat_users
Can be declared multiple times for the same element name.tomcat::config::context::value
defined type.tomcat::install
attributesproxy_server
andproxy_type
for installing behind a proxy.tomcat::install
attributeallow_insecure
for disabling https verification.tomcat::war
ability to use context paths and versions withwar_name
attribute.tomcat::war
ability to ignore HTTPS errors withallow_insecure
attribute.
Fixed
- Corrected documentation for all
attributes_to_remove
attributes.
Supported Release 1.7.0
Summary
This release adds support for internationalization of the module. It also contains Japanese translations for the README, summary and description of the metadata.json and major cleanups in the README. Additional folders have been introduced called locales and readmes where translation files can be found. A number of features and bug fixes are also included in this release.
Added
- Addition of POT file for metadata translation for i18n.
- Readme update and edit in preparation for localization.
- Environment can now be passed through to staging, so we can set a proxy to download tomcat.
- Add optional
$type
parameter to globalnamingresources that allows the definition of the element to be used. Use "Environment" to set an environment. - Allow the resource name to be overridden with a new
$resource_name
parameter. - Added Ubuntu Xenial support to metadata.
- Bump in puppet-staging module dependancy for allowing newer versions.
- Ability to not manage catalina.properties.
Fixed
- (MODULES-4003) Adds a 'require => Tomcat::Install[$name]' to the ensure_resource function.
- (MODULES-4003) Removes logic that checks to see if catalina_base and catalina_home are the same.
- (MODULES-1986) Added newline to the inline template assigned to $_content.
- (MODULES-3224) Added mode attribute to concat resource that sets the executable bit for all permission levels.
- Fix for fixtures.yml, was pointing to nanliu-staging instead of puppet-staging.
- Fix duplicate resources in host/realm/valve.
- Fix faulty header and link in ToC.
- (MODULES-4528) Replace Puppet.version.to_f version comparison from spec_helper.rb.
- Puppet lint warning fix.
- (FM-6166) Updating tomcat tar mirror and test failure message.
- (FM-6166) Removing concat-fragment 'ensure'
Supported Release 1.6.1
Summary
This release removes an attempted bugfix made in 1.6.0 for working around strict
umasks. The previous change caused duplicate resource declarations when
downloading a tomcat tarball from puppet://
or local paths. The umask bug
remains (it is actually present in staging, not tomcat).
Fixed
- Fix duplicate resource declarations when using local source paths
Supported Release 1.6.0
Summary
This release adds two new defines for managing environment variables and manager elements, enhances multi-instance multi-user support, allows valves to be nested in contexts, fixes an issue with installing directly to NFS mounted directories, fixes installation on systems with a strict root umask,
Added
- Add
tomcat::config::context::environment
define - Add
tomcat::config::context::manager
define - Add
owner
andgroup
totomcat::config::server::tomcat_users
- Add
parent_context
totomcat::config::server::valve
- Add
manage_home
andmanage_base
totomcat
class - Add
manage_home
totomcat::install
- Add
manage_base
totomcat::instance
- Add
doexport
(MODULES-3436),user
, andgroup
totomcat::setenv::entry
- Change from
nanliu/staging
topuppet/staging
- Allow
role
to be set for user elements intomcat::config::server::tomcat_users
Fixed
- Fix globalresource missing (MODULES-3353)
- Fix strict vars for
tomcat::config::server::service
(MODULES-3742) - Work around duplicate user resources (PUP-5971)
Supported Release 1.5.0
Summary
General rewrite of the installation and instance management code, and better service management. Plus a handful of new configuration defined types and actual resource dependency ordering.
The primary improvement is that you may now use tomcat::install
for installing
various versions of tomcat into various directories (CATALINA_HOME
), then use
tomcat::instance
to create instances from those installs (CATALINA_BASE
).
Previously tomcat::instance
treated both CATALINA_HOME
and CATALINA_BASE
as identical and thus only allowed a single tomcat instance per tomcat installation.
Additionally, tomcat::service
allows use_init => true, use_jsvc => true
to
create an init script for service management of source-based installs. And
tomcat::instance
can declare a tomcat::service
resource for your instance to
make life easier.
Added
- Added
tomcat::config::properties::property
define - Added
tomcat::config::server::globalnamingresource
define - Added
tomcat::config::context
define - Added
tomcat::config::context::resource
define - Added
tomcat::config::context::resourcelink
define - Added
tomcat::install
define - Added
tomcat::config::server::host::aliases
parameter - Added
tomcat::service::user
parameter - Added
tomcat::setenv::entry
parameters:catalina_home
addto
- Added
tomcat::instance
parameters for multi-instance management:user
group
manage_user
manage_group
manage_service
java_home
use_jsvc
use_init
- Added Debian 8 compatibility
Fixed
- Fixed conflating
CATALINA_BASE
withCATALINA_HOME
- Made
tomcat::config::server::connector
protocol default to$name
- Lots of additional validation
- Added resource dependency declaration (so no more
<-
->
needed) - Undeprecated
tomcat::setenv::entry::order
parameter
Supported Release 1.4.1
Summary
Small release for bug with multiple Realms in the same parent path.
Added
- Improved documentation for purging connectors.
- Improved documentation for purging realms.
- Added package_options to tomcat::instance
Fixed
- Fixed bug where multiple Realms in the same parent would corrupt data.
- Added work-around for Augeas bug when purging Realms.
Supported Release 1.3.3
###Summary
Small release for support of newer PE versions. This increments the version of PE in the metadata.json file.
2015-08-11 - Supported Release 1.3.2
Summary
This release fixes username quoting and metadata.
Fixed
- Allow username values that contain non-string characters like whitespace
- Validate $catalina_base
- Correct pe/puppet compatibility metadata
2015-07-16 - Supported Release 1.3.1
Summary
This release fixes metadata because it supports puppet 4.
2015-06-09 - Supported Release 1.3.0
Summary
This is a feature release, with a couple of bugfixes and readme changes.
Added
- Update additional_attributes to support values with spaces
- Documentation changes
- Add a manifest for Context Containers in Tomcat configuration
- Manage User and Roles in Realms
- New manifests for context.xml configuration
- Added manifest for managing Realm elements in server.xml
- Ordering of setenv entries
- Adds parameter for enabling Tomcat service on boot
- Add ability to specify server_config location
- Allow configuration of location of server.xml
Fixed
- Make sure setenv entries have export
- Test improvements
- version pinning for acceptance tests
2014-11-11 - Supported Release 1.2.0
Summary
This is primarily a feature release, with a couple of bugfixes for tests and metadata.
Added
- Add
install_from_source
parameter to classtomcat
- Add
purge_connectors
parameter to classtomcat
and definetomcat::server::connector
Fixed
- Fix dependencies to remove missing dependency warnings with the PMT
- Use
curl -k
in the tests
2014-10-28 - Supported Release 1.1.0
Summary
This release includes documentation and test updates, strict variable support, metadata bugs, and added support for multiple connectors with the same protocol.
Added
- Strict variable support
- Support multiple connectors with the same protocol
- Update tests to not break when tomcat releases happen
- Update README based on QA feedback
Fixed
- Update stdlib requirement to 4.2.0
- Fix illegal version range in metadata.json
- Fix typo in README
2014-09-04 - Supported Release 1.0.1
Summary
This is a bugfix release.
Fixed
- Fix typo in tomcat::instance
- Update acceptance tests for new tomcat releases
2014-08-27 - Supported Release 1.0.0
Summary
This release has added support for installation from packages, improved WAR management, and updates to testing and documentation.
Added
- Updated tomcat::setenv::entry to better support installations from package
- Added the ability to purge auto-exploded WAR directories when removing WARs. Defaults to purging these directories
- Added warnings for unused variables when installing from package
- Updated acceptance tests and nodesets
- Updated README
Deprecated
- $tomcat::setenv::entry::base_path is being deprecated in favor of $tomcat::setenv::entry::config_file
2014-08-20 - Release 0.1.2
Summary
This release adds compatibility information and updates the README with information on the requirement of augeas >= 1.0.0.
2014-08-14 - Release 0.1.1
Summary
This is a bugfix release.
Fixed
- Update 'warn' to correct 'warning' function.
- Update README for use_init.
- Test updates and fixes.
2014-08-06 - Release 0.1.0
Summary
Initial release of the tomcat module.
Dependencies
- puppetlabs/stdlib (>= 4.6.0 < 5.0.0)
- puppetlabs/concat (>= 1.1.0 < 5.0.0)
- puppet/archive (>= 1.0.0 < 3.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.