Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tomcat to 70a1b729140ee803724933edf839f5d7ae4daf39
Browse files Browse the repository at this point in the history
70a1b729140ee803724933edf839f5d7ae4daf39 Merge pull request redhat-openstack#113 from puppetlabs/1.3.x
e93da60ae443dc30763a463475edf6cd58eef7d8 Merge pull request redhat-openstack#111 from GeoffWilliams/augeas_segfault_workaround
6c5c77e7cf959abdd1ace4294bdb5728b9e27e06 Merge pull request redhat-openstack#110 from tphoney/release_1.3.3
259ed084aca3360d7dfc86e54072fb0e06b0cbfd 1.3.3 release prep
957dfdc5884a1ebe29dc296d8616339d20ffaae9 delete realm nodes in depth-first order to workaround augeas segfault (hercules-team/augeas#319)
501ad90d4f5391f79ec37f192a4dbc9ab4779e30 Merge pull request redhat-openstack#107 from joshbeard/purge_connector_readme
f277c2fa1f84f5e4c9325c7929e7f4024e558c14 Document 'purge_connectors'
cf4e55790aeefd8c558681d9d475e84a3b52b9cc Merge pull request redhat-openstack#105 from joshbeard/purge_connectors
ed4f2e98ab10256d5fad53468a9904e3be1ddff3 Merge pull request redhat-openstack#106 from DavidS/add-package-install-options
c6d42c40deca6025899df8579dd6cc61a6aac645 (MAINT) enable install options in package resource
23eeb156c63f8870c3b1ac398c9842dda33512ae Specify port when purging connectors
34d866bf2f455cf771262e147c5bd5722690e008 Merge pull request redhat-openstack#104 from puppetlabs/1.3.x

Change-Id: I084ab5906e10e01a9d1d6f488c4421b7bf5c4d3e
xbezdick committed Dec 15, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 4a0c586 commit 1e6614b
Showing 11 changed files with 61 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
@@ -255,7 +255,7 @@ mod 'timezone',
:git => 'https://github.com/saz/puppet-timezone.git'

mod 'tomcat',
:commit => '019772988b39cb259bf281ab9655e8a83c7bc2d8',
:commit => '70a1b729140ee803724933edf839f5d7ae4daf39',
:git => 'https://github.com/puppetlabs/puppetlabs-tomcat.git'

mod 'tripleo',
5 changes: 5 additions & 0 deletions tomcat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 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.
12 changes: 11 additions & 1 deletion tomcat/README.md
Original file line number Diff line number Diff line change
@@ -257,7 +257,9 @@ Determines whether to create the specified user, if it doesn't exist. Uses Puppe

#####`purge_connectors`

Specifies whether to purge any unmanaged Connector elements from the configuration file. Valid options: 'true' and 'false'. Default: 'false'.
Specifies whether to purge any unmanaged Connector elements that match
defined protocol but have a different port
from the configuration file. Valid options: 'true' and 'false'. Default: 'false'.

#####`purge_realms`

@@ -331,6 +333,10 @@ Specifies which Service element the Connector should nest under. Valid options:

Specifies a protocol to use for handling incoming traffic. Maps to the [protocol XML attribute](http://tomcat.apache.org/tomcat-8.0-doc/config/http.html#Common_Attributes). Valid options: a string. Default: $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: 'true' and 'false'. Default: 'false'.

#####`server_config`

Specifies a server.xml file to manage. Valid options: a string containing an absolute path. Default: '${catalina_base}/config/server.xml'.
@@ -657,6 +663,10 @@ Determines whether the specified package should be installed. Only valid if `ins

*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](https://docs.puppetlabs.com/references/latest/type.html#package-attribute-install_options) for possible values.

#####`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: 'true' and 'false'. Default: 'true'.
4 changes: 2 additions & 2 deletions tomcat/manifests/config/server/connector.pp
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
validate_hash($additional_attributes)
validate_bool($purge_connectors)
validate_re($catalina_base, '^.*[^/]$', '$catalina_base must not end in a /!')

if $protocol {
$_protocol = $protocol
} else {
@@ -44,7 +44,7 @@
$path = "Server/Service[#attribute/name='${parent_service}']"

if $purge_connectors {
$_purge_connectors = "rm Server//Connector[#attribute/protocol='${_protocol}']"
$_purge_connectors = "rm Server//Connector[#attribute/protocol='${_protocol}'][#attribute/port!='${port}']"
} else {
$_purge_connectors = undef
}
10 changes: 9 additions & 1 deletion tomcat/manifests/config/server/realm.pp
Original file line number Diff line number Diff line change
@@ -46,7 +46,15 @@
}

if $purge_realms {
$_purge_realms = 'rm Server//Realm'
# Perform deletions in reverse depth order as workaround for
# https://github.com/hercules-team/augeas/issues/319
$_purge_realms = [
'rm //Realm//Realm',
'rm //Context//Realm',
'rm //Host//Realm',
'rm //Engine//Realm',
'rm //Server//Realm',
]
} else {
$_purge_realms = undef
}
5 changes: 4 additions & 1 deletion tomcat/manifests/instance.pp
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@
# to in the package resource.
# - $package_name is the name of the package you want to install. Required if
# $install_from_source is false.
# - $package_options to pass extra options to the package resource.
define tomcat::instance (
$catalina_home = undef,
$catalina_base = undef,
@@ -25,6 +26,7 @@
$source_strip_first_dir = undef,
$package_ensure = undef,
$package_name = undef,
$package_options = undef,
) {

if $install_from_source {
@@ -74,7 +76,8 @@
}
} else {
tomcat::instance::package { $package_name:
package_ensure => $package_ensure,
package_ensure => $package_ensure,
package_options => $package_options,
}
}

9 changes: 6 additions & 3 deletions tomcat/manifests/instance/package.pp
Original file line number Diff line number Diff line change
@@ -5,9 +5,11 @@
# Parameters:
# - $package_ensure is the ensure passed to the package resource.
# - The $package_name you want to install.
# - $package_options to pass extra options to the package resource.
define tomcat::instance::package (
$package_ensure = 'installed',
$package_name = undef,
$package_ensure = 'installed',
$package_name = undef,
$package_options = undef,
) {
if $caller_module_name != $module_name {
fail("Use of private class ${name} by ${caller_module_name}")
@@ -20,7 +22,8 @@
}

package { $_package_name:
ensure => $package_ensure
ensure => $package_ensure,
install_options => $package_options,
}

}
4 changes: 2 additions & 2 deletions tomcat/metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-tomcat",
"version": "1.3.2",
"version": "1.3.3",
"author": "puppetlabs",
"summary": "Installs, deploys, and configures Apache Tomcat web services.",
"license": "Apache 2.0",
@@ -64,7 +64,7 @@
"requirements": [
{
"name": "pe",
"version_requirement": ">= 3.3.0 < 2015.3.0"
"version_requirement": ">= 3.3.0 < 2015.4.0"
},
{
"name": "puppet",
2 changes: 1 addition & 1 deletion tomcat/spec/defines/config/server/connector_spec.rb
Original file line number Diff line number Diff line change
@@ -73,7 +73,7 @@
'lens' => 'Xml.lns',
'incl' => '/opt/apache-tomcat/test/conf/server.xml',
'changes' => [
'rm Server//Connector[#attribute/protocol=\'AJP/1.3\']',
'rm Server//Connector[#attribute/protocol=\'AJP/1.3\'][#attribute/port!=\'8180\']',
'set Server/Service[#attribute/name=\'Catalina2\']/Connector[#attribute/port=\'8180\']/#attribute/port 8180',
'set Server/Service[#attribute/name=\'Catalina2\']/Connector[#attribute/port=\'8180\']/#attribute/protocol AJP/1.3',
'set Server/Service[#attribute/name=\'Catalina2\']/Connector[#attribute/port=\'8180\']/#attribute/redirectPort \'8543\'',
6 changes: 5 additions & 1 deletion tomcat/spec/defines/config/server/realm_spec.rb
Original file line number Diff line number Diff line change
@@ -70,7 +70,11 @@
'lens' => 'Xml.lns',
'incl' => '/opt/apache-tomcat/test/conf/server.xml',
'changes' => [
"rm Server//Realm",
"rm //Realm//Realm",
"rm //Context//Realm",
"rm //Host//Realm",
"rm //Engine//Realm",
"rm //Server//Realm",
"set Server/Service[#attribute/name='Catalina']/Engine[#attribute/name='Catalina']/Realm/#attribute/className org.apache.catalina.realm.JNDIRealm",
"set Server/Service[#attribute/name='Catalina']/Engine[#attribute/name='Catalina']/Realm[#attribute/className='org.apache.catalina.realm.JNDIRealm']/#attribute/connectionURL 'ldap://localhost'",
"set Server/Service[#attribute/name='Catalina']/Engine[#attribute/name='Catalina']/Realm[#attribute/className='org.apache.catalina.realm.JNDIRealm']/#attribute/roleName 'cn'",
15 changes: 15 additions & 0 deletions tomcat/spec/defines/instance_spec.rb
Original file line number Diff line number Diff line change
@@ -65,6 +65,21 @@
'ensure' => 'installed',
)
}
context "with additional package_options set" do
let :params do
{
:install_from_source => false,
:package_name => 'tomcat',
:package_options => [ '/S' ],
}
end
it {
is_expected.to contain_package('tomcat').with(
'ensure' => 'installed',
'install_options' => [ '/S' ],
)
}
end
end
context "install from package, set $catalina_base" do
let :facts do default_facts end

0 comments on commit 1e6614b

Please sign in to comment.