Skip to content

Commit

Permalink
Bump default MySQL connector version to 8.0.23 and allow disabling th…
Browse files Browse the repository at this point in the history
…e default HTTP connector (#369)

* Allow disabling the default connector. Fixes #85

* Bump MySQL connector version to something non-EOL. Still works with older mysql
  • Loading branch information
oranenj authored Apr 20, 2021
1 parent c5cfe0f commit 69a0969
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 5 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
Boolean $oracle_use_sid = true,
$dbschema = undef,
# MySQL Connector Settings
$mysql_connector_manage = true,
$mysql_connector_version = '5.1.34',
$mysql_connector_product = 'mysql-connector-java',
$mysql_connector_format = 'tar.gz',
Boolean $mysql_connector_manage = true,
String $mysql_connector_version = '8.0.23',
String $mysql_connector_product = 'mysql-connector-java',
String $mysql_connector_format = 'tar.gz',
Stdlib::Absolutepath $mysql_connector_install = '/opt/MySQL-connector',
Stdlib::HTTPUrl $mysql_connector_url = 'https://dev.mysql.com/get/Downloads/Connector-J',
Optional[Integer[0]] $pool_min_size = undef,
Expand Down Expand Up @@ -143,6 +143,7 @@
Hash $proxy = {},
# Options for the AJP connector
Hash $ajp = {},
Boolean $tomcat_default_connector = true,
# Additional connectors in server.xml
Jira::Tomcat_connectors $tomcat_additional_connectors = {},
# Context path (usualy used in combination with a reverse proxy)
Expand Down
4 changes: 3 additions & 1 deletion spec/classes/jira_config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,12 @@
end
end

context 'tomcat additional connectors' do
context 'tomcat additional connectors, without default' do
let(:params) do
{
version: '8.13.5',
javahome: '/opt/java',
tomcat_default_connector: false,
tomcat_additional_connectors: {
8081 => {
'URIEncoding' => 'UTF-8',
Expand All @@ -475,6 +476,7 @@

it do
is_expected.to contain_file('/opt/jira/atlassian-jira-software-8.13.5-standalone/conf/server.xml').
without_content(%r{<Connector port="8080"}).
with_content(%r{<Connector port="8081"}).
with_content(%r{connectionTimeout="20000"}).
with_content(%r{protocol="HTTP/1\.1"}).
Expand Down
2 changes: 2 additions & 0 deletions templates/server.xml.epp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />

<Service name="Catalina">
<% if $jira::tomcat_default_connector { -%>
<Connector port="<%= $jira::tomcat_port %>"
<%- if $jira::tomcat_address { -%>
address="<%= $jira::tomcat_address %>"
Expand Down Expand Up @@ -55,6 +56,7 @@
<% } -%>
<% } -%>
/>
<%- } -%>

<% if $jira::tomcat_native_ssl { -%>
<Connector
Expand Down

0 comments on commit 69a0969

Please sign in to comment.