File tree Expand file tree Collapse file tree 4 files changed +30
-1
lines changed
Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -139,6 +139,7 @@ The following parameters are available in the `jira` class:
139139* [ ` tomcat_address ` ] ( #-jira--tomcat_address )
140140* [ ` tomcat_port ` ] ( #-jira--tomcat_port )
141141* [ ` tomcat_shutdown_port ` ] ( #-jira--tomcat_shutdown_port )
142+ * [ ` jvm_route ` ] ( #-jira--jvm_route )
142143* [ ` tomcat_max_http_header_size ` ] ( #-jira--tomcat_max_http_header_size )
143144* [ ` tomcat_min_spare_threads ` ] ( #-jira--tomcat_min_spare_threads )
144145* [ ` tomcat_connection_timeout ` ] ( #-jira--tomcat_connection_timeout )
@@ -832,6 +833,14 @@ Tomcat shutdown command port
832833
833834Default value: ` 8005 `
834835
836+ ##### <a name =" -jira--jvm_route " ></a >` jvm_route `
837+
838+ Data type: ` Optional[String[1]] `
839+
840+ The jvmRoute to use for load balancing
841+
842+ Default value: ` undef `
843+
835844##### <a name =" -jira--tomcat_max_http_header_size " ></a >` tomcat_max_http_header_size `
836845
837846Data type: ` Integer `
Original file line number Diff line number Diff line change 180180# Tomcat bind port
181181# @param tomcat_shutdown_port
182182# Tomcat shutdown command port
183+ # @param jvm_route
184+ # The jvmRoute to use for load balancing
183185# @param tomcat_max_http_header_size
184186# Tomcat connector setting
185187# @param tomcat_min_spare_threads
387389 Optional[String] $tomcat_address = undef ,
388390 Stdlib::Port $tomcat_port = 8080,
389391 Stdlib::Port $tomcat_shutdown_port = 8005,
392+ Optional[String[1]] $jvm_route = undef ,
390393 Integer $tomcat_max_http_header_size = 8192,
391394 Integer[0] $tomcat_min_spare_threads = 25,
392395 Integer[0] $tomcat_connection_timeout = 20000,
Original file line number Diff line number Diff line change @@ -112,6 +112,23 @@ def self.clear_cache
112112 end
113113 end
114114
115+ context 'with jvm_route' do
116+ let ( :params ) do
117+ {
118+ javahome : '/opt/java' ,
119+ version : DEFAULT_VERSION ,
120+ jvm_route : 'node1' ,
121+ }
122+ end
123+
124+ it { is_expected . to compile . with_all_deps }
125+
126+ it 'configures jvmRoute in server.xml' do
127+ is_expected . to contain_file ( FILENAME_SERVER_XML ) .
128+ with_content ( %r{<Engine name="Catalina" defaultHost="localhost" jvmRoute="node1">} )
129+ end
130+ end
131+
115132 context 'with custom session_timeout' do
116133 let ( :params ) do
117134 {
Original file line number Diff line number Diff line change 108108< % } -% >
109109 / >
110110< % } - %>
111- <Engine name =" Catalina" defaultHost =" localhost" >
111+ <Engine name =" Catalina" defaultHost =" localhost" <% if $jira::jvm_route { %> jvmRoute=" <%= $jira :: jvm_route %> " <% } %> >
112112 <Host name =" localhost" appBase =" webapps" unpackWARs =" true" autoDeploy =" true" >
113113
114114 <Context path =" <%= $jira::contextpath %>" docBase =" ${catalina.home}/atlassian-jira" reloadable =" false" useHttpOnly =" true" >
You can’t perform that action at this time.
0 commit comments