Skip to content

Commit 2e8b3db

Browse files
CIDM-1712 - Basic Repose 9 Support
1 parent a16b070 commit 2e8b3db

17 files changed

+457
-201
lines changed

.gemfiles/Gemfile.ruby187.rspec

Lines changed: 0 additions & 159 deletions
This file was deleted.

.travis.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
language: ruby
22
rvm:
3-
- 1.8.7
43
- 1.9.3
54
- 2.0.0
65
- 2.1.1
76

87
before_install:
98
- rm .gemfiles/Gemfile.rspec.lock || true
10-
- rm .gemfiles/Gemfile.ruby187.rspec.lock || true
9+
- rm .gemfiles/Gemfile.ruby193.rspec.lock || true
10+
- rm .gemfiles/Gemfile.ruby200.rspec.lock || true
1111

1212
gemfile:
1313
- .gemfiles/Gemfile.rspec
14-
- .gemfiles/Gemfile.ruby187.rspec
1514
- .gemfiles/Gemfile.ruby193.rspec
1615

1716
script:
@@ -35,10 +34,6 @@ env:
3534

3635
matrix:
3736
exclude:
38-
- rvm: 1.8.7
39-
gemfile: .gemfiles/Gemfile.rspec
40-
- rvm: 1.8.7
41-
gemfile: .gemfiles/Gemfile.ruby193.rspec
4237
- rvm: 1.9.3
4338
gemfile: .gemfiles/Gemfile.ruby187.rspec
4439
- rvm: 1.9.3
@@ -51,24 +46,6 @@ matrix:
5146
gemfile: .gemfiles/Gemfile.ruby187.rspec
5247
- rvm: 2.1.1
5348
gemfile: .gemfiles/Gemfile.ruby193.rspec
54-
- rvm: 1.8.7
55-
env: PUPPET_VERSION="~> 4.0.0"
56-
- rvm: 1.8.7
57-
env: PUPPET_VERSION="~> 4.1.0"
58-
- rvm: 1.8.7
59-
env: PUPPET_VERSION="~> 4.2.0"
60-
- rvm: 1.8.7
61-
env: PUPPET_VERSION="~> 4.3.0"
62-
- rvm: 1.8.7
63-
env: PUPPET_VERSION="~> 4.4.0"
64-
- rvm: 1.8.7
65-
env: PUPPET_VERSION="~> 4.5.0"
66-
- rvm: 1.8.7
67-
env: PUPPET_VERSION="~> 4.6.0"
68-
- rvm: 1.8.7
69-
env: PUPPET_VERSION="~> 4.7.0"
70-
- rvm: 1.8.7
71-
env: PUPPET_VERSION="~> 4.8.0"
7249
- rvm: 1.9.3
7350
env: PUPPET_VERSION="~> 2.7.0"
7451
- rvm: 2.0.0

manifests/filter/http_connection_pool.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
$default_tcp_nodelay = true,
153153
$default_keepalive_timeout = 0,
154154
$additional_pools = undef,
155+
$repose9 = false,
155156
) {
156157

157158
### Validate parameters

manifests/filter/system_model.pp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@
7575
# WARNING: This is a Repose version 8 and above feature only.
7676
# Defaults to <tt>{}</tt> Empty hash
7777
#
78+
# [*repose9*]
79+
# Boolean value which signals the system-model template to leave out the
80+
# cluster element in support of Repose v.9 and above. This is a half-step
81+
# measure before supporting the new way Repose handles clustering in the
82+
# system-model config.
83+
# Defaults to <tt>false</tt> False
84+
#
7885
# === Examples
7986
#
8087
# $app_name = 'repose'
@@ -126,6 +133,7 @@
126133
$endpoints = undef,
127134
$port = $repose::params::port,
128135
$https_port = undef,
136+
$repose9 = false,
129137
$rewrite_host_header = undef,
130138
$service_cluster = undef,
131139
$tracing_header = {},

manifests/init.pp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
$rh_old_packages = $repose::params::rh_old_packages,
8080
$cfg_new_namespace = $repose::params::cfg_new_namespace,
8181
$experimental_filters = $repose::params::experimental_filters,
82+
$identity_filters = $repose::params::identity_filters,
8283
) inherits repose::params {
8384

8485
### Validate parameters
@@ -163,13 +164,15 @@
163164
container => $container,
164165
rh_old_packages => $rh_old_packages,
165166
experimental_filters => $experimental_filters,
167+
identity_filters => $identity_filters,
166168
}
167169

168170
## service
169-
if $container == 'valve' {
171+
if ( $container in [ 'valve', 'repose9' ]) {
170172
class { 'repose::service':
171-
ensure => $ensure,
172-
enable => $enable,
173+
ensure => $ensure,
174+
enable => $enable,
175+
container => $container,
173176
}
174177
}
175178

manifests/package.pp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
# Boolean. Install the experimental filters bundle package
4545
# Defaults to <tt>false</tt>
4646
#
47+
# [*identity_filters*]
48+
# Boolean. Install the identity filters bundle package
49+
# Defaults to <tt>false</tt>
50+
#
4751
# === Examples
4852
#
4953
# Primarily to be used by the repose base class, but you can use:
@@ -65,6 +69,7 @@
6569
$container = $repose::params::container,
6670
$rh_old_packages = $repose::params::rh_old_packages,
6771
$experimental_filters = $repose::params::experimental_filters,
72+
$identity_filters = $repose::params::identity_filters,
6873
) inherits repose::params {
6974

7075
### Logic
@@ -85,11 +90,14 @@
8590
$container_package = $container ? {
8691
'tomcat7' => $repose::params::tomcat7_package,
8792
'valve' => $repose::params::valve_package,
93+
'repose9' => $repose::params::repose9_package,
8894
}
8995

9096
## Handle adding a dependency of service for valve
9197
if $container == 'valve' {
9298
$before = Service[$repose::params::service]
99+
} elsif $container == 'repose9' {
100+
$before = Service[$repose::params::repose9_service]
93101
} else {
94102
$before = undef
95103
}
@@ -114,7 +122,7 @@
114122

115123
if $experimental_filters == true {
116124
package { $repose::params::experimental_filters_packages:
117-
ensure => $package_ensure,
125+
ensure => $package_ensure,
118126
require => Package[$container_package],
119127
}
120128
} else {
@@ -124,4 +132,11 @@
124132
}
125133
}
126134

135+
if $identity_filters == true {
136+
package { $repose::params::identity_filters_packages:
137+
ensure => $package_ensure,
138+
require => Package[$container_package],
139+
}
140+
}
141+
127142
}

manifests/params.pp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
$container = 'valve'
4444

4545
## container_options
46-
$container_options = ['valve','tomcat7']
46+
$container_options = ['valve','tomcat7','repose9']
4747

4848
### Package specific in
4949

@@ -52,6 +52,11 @@
5252
/(RedHat|Debian)/ => 'repose-valve',
5353
}
5454

55+
## repose 9 service
56+
$repose9_service = $::osfamily ? {
57+
/(RedHat|Debian)/ => 'repose',
58+
}
59+
5560
## service capabilities
5661
$service_hasstatus = $::osfamily ? {
5762
/(RedHat|Debian)/ => true,
@@ -79,6 +84,13 @@
7984
/(RedHat|Debian)/ => [ 'repose-experimental-filter-bundle' ],
8085
}
8186

87+
## identity filters bundle package
88+
$identity_filters = false
89+
90+
$identity_filters_packages = $::osfamily ? {
91+
/(RedHat|Debian)/ => [ 'repose-identity-filter-bundle' ],
92+
}
93+
8294
## tomcat7_package
8395
$tomcat7_package = $::osfamily ? {
8496
/(RedHat|Debian)/ => 'repose-war',
@@ -89,6 +101,11 @@
89101
/(RedHat|Debian)/ => 'repose-valve',
90102
}
91103

104+
## repose9_package
105+
$repose9_package = $::osfamily ? {
106+
/(RedHat|Debian)/ => 'repose',
107+
}
108+
92109
## configdir
93110
$configdir = $::osfamily ? {
94111
/(RedHat|Debian)/ => '/etc/repose',

0 commit comments

Comments
 (0)