Skip to content

Commit 6ba0a98

Browse files
committed
Drop JIRA pre 8.0.0 support; it's EOL
1 parent 1108b79 commit 6ba0a98

File tree

11 files changed

+162
-254
lines changed

11 files changed

+162
-254
lines changed

jira.yaml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
# 2.) Modify the database settings below according to your setup
1919
#
2020
# Atlassian jira Git Enterprise Source Control Server
21-
jira::jira_name: jira
22-
jira::version: 5.1.7
23-
jira::format: tar.gz
21+
jira::version: 8.13.5
2422

2523
# Directory where the webapp will run from
2624
jira::installdir: /opt/jira
@@ -40,14 +38,6 @@ jira::db: postgresql
4038
#jira::db: oracle
4139
#jira::db: sqlserver
4240

43-
jira::dbtype: postgres72
44-
#jira::dbtype: mysql
45-
#jira::dbtype: mssql
46-
47-
jira::dbdriver: org.postgresql.Driver
48-
#jira::dbdriver: com.mysql.jdbc.Driver
49-
#jira::dbdriver: com.microsoft.sqlserver.jdbc.SQLServerDriver
50-
5141
# Change these values to your jira database credentials
5242
jira::dbuser: jiraadm
5343
jira::dbpassword: jiraadm
@@ -62,8 +52,6 @@ jira::dbport: 5432
6252
# Schema
6353
# Default for postgres
6454
jira::dbschema: 'public'
65-
# Default for mssql
66-
#jira::dbschema: 'dbo'
6755

6856
# The connection pool parameters
6957
jira::pool_min_size: 20
@@ -83,11 +71,10 @@ jira::pool_test_on_borrow: true
8371
jira::dbserver: localhost
8472

8573
# Tomcat configuration
86-
# TODO because I'm never a fan of the stock tomcat settings
87-
jira::javahome: /opt/java/jdk1.6.0_33
74+
jira::javahome: /opt/java/openjdk-11-jre
8875
jira::jvm_xmx: 1024m
89-
jira::jvm_optional: -XX:-HeapDumpOnOutOfMemoryError
90-
#jira::jvm_optional: -XX:NewSize=256m -XX:MaxNewSize=256m -XX:SurvivorRatio=16
76+
jira::java_opts: -XX:-HeapDumpOnOutOfMemoryError
77+
#jira::java_opts: -XX:NewSize=256m -XX:MaxNewSize=256m -XX:SurvivorRatio=16
9178
# the New and SR figures are purely optional
9279
# for heap dumps add -XX:-HeapDumpOnOutOfMemoryError
9380
# by default jira has 256m permgen which is a good setting to go with

manifests/config.pp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,7 @@
101101
}
102102
}
103103

104-
if $jira::tomcat_protocol_ssl {
105-
$tomcat_protocol_ssl_real = $jira::tomcat_protocol_ssl
106-
} else {
107-
if versioncmp($jira::version, '7.3.0') >= 0 {
108-
$tomcat_protocol_ssl_real = 'org.apache.coyote.http11.Http11NioProtocol'
109-
} else {
110-
$tomcat_protocol_ssl_real = 'org.apache.coyote.http11.Http11Protocol'
111-
}
112-
}
104+
$tomcat_protocol_ssl_real = pick($jira::tomcat_protocol_ssl, 'org.apache.coyote.http11.Http11NioProtocol')
113105

114106
$jira_properties = {
115107
'jira.websudo.is.disabled' => !$jira::enable_secure_admin_sessions,

manifests/init.pp

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,8 @@
3333
class jira (
3434

3535
# Jira Settings
36-
String $version = '8.13.4',
36+
String $version = '8.13.5',
3737
String $product = 'jira',
38-
String $format = 'tar.gz',
3938
Stdlib::Absolutepath $installdir = '/opt/jira',
4039
Stdlib::Absolutepath $homedir = '/home/jira',
4140
Boolean $manage_user = true,
@@ -165,6 +164,10 @@
165164
Optional[String] $java_opts = undef,
166165
Optional[Boolean] $enable_connection_pooling = undef,
167166
) inherits jira::params {
167+
if versioncmp($jira::version, '8.0.0') < 0 {
168+
fail('JIRA versions older than 8.0.0 are no longer supported. Please use an older version of this module to upgrade first.')
169+
}
170+
168171
if $datacenter and !$shared_homedir {
169172
fail("\$shared_homedir must be set when \$datacenter is true")
170173
}
@@ -179,13 +182,16 @@
179182
}
180183
}
181184

182-
# The default Jira product starting with version 7 is 'jira-software'
183-
if ((versioncmp($version, '7.0.0') >= 0) and ($product == 'jira')) {
185+
# The default Jira product starting with version 7 is 'jira-software',
186+
# but some old configuration may explicitly specify 'jira'
187+
if $product == 'jira' {
184188
$product_name = 'jira-software'
185189
} else {
186190
$product_name = $product
187191
}
188192

193+
$webappdir = "${installdir}/atlassian-${product_name}-${version}-standalone"
194+
189195
if defined('$::jira_version') {
190196
# If the running version of JIRA is less than the expected version of JIRA
191197
# Shut it down in preparation for upgrade.
@@ -195,13 +201,6 @@
195201
}
196202
}
197203

198-
$extractdir = "${installdir}/atlassian-${product_name}-${version}-standalone"
199-
if $format == zip {
200-
$webappdir = "${extractdir}/atlassian-${product_name}-${version}-standalone"
201-
} else {
202-
$webappdir = $extractdir
203-
}
204-
205204
if ! empty($ajp) {
206205
if ! ('port' in $ajp) {
207206
fail('You need to specify a valid port for the AJP connector.')
@@ -219,13 +218,6 @@
219218
fail('You need to specify a value for javahome')
220219
}
221220

222-
# Archive module checksum_verify = true; this verifies checksum if provided, doesn't if not.
223-
if $checksum == undef {
224-
$checksum_verify = false
225-
} else {
226-
$checksum_verify = true
227-
}
228-
229221
contain jira::install
230222
contain jira::config
231223
contain jira::service

manifests/install.pp

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
}
3535
}
3636

37+
file { $jira::homedir:
38+
ensure => 'directory',
39+
owner => $jira::user,
40+
group => $jira::group,
41+
}
42+
3743
if ! defined(File[$jira::installdir]) {
3844
file { $jira::installdir:
3945
ensure => 'directory',
@@ -42,30 +48,9 @@
4248
}
4349
}
4450

45-
# Examples of product tarballs from Atlassian
46-
# Core - atlassian-jira-core-7.0.3.tar.gz
47-
# Software (pre-7) - atlassian-jira-6.4.12.tar.gz
48-
# Software (7 to 7.1.8 ) - atlassian-jira-software-7.0.4-jira-7.0.4.tar.gz
49-
# Software (7.1.9 and up) - atlassian-jira-software-7.1.9.tar.gz
50-
51-
if (versioncmp($jira::version, '7.1.9') < 0) {
52-
if ((versioncmp($jira::version, '7.0.0') < 0) or ($jira::product_name == 'jira-core')) {
53-
$file = "atlassian-${jira::product_name}-${jira::version}.${jira::format}"
54-
} else {
55-
$file = "atlassian-${jira::product_name}-${jira::version}-jira-${jira::version}.${jira::format}"
56-
}
57-
} else {
58-
$file = "atlassian-${jira::product_name}-${jira::version}.${jira::format}"
59-
}
60-
61-
if ! defined(File[$jira::extractdir]) {
62-
file { $jira::extractdir:
63-
ensure => 'directory',
64-
owner => $jira::user,
65-
group => $jira::group,
66-
}
67-
}
51+
$file = "atlassian-${jira::product_name}-${jira::version}.tar.gz"
6852

53+
# webappdir is defined in init.pp because other things depend on it.
6954
if ! defined(File[$jira::webappdir]) {
7055
file { $jira::webappdir:
7156
ensure => 'directory',
@@ -82,29 +67,22 @@
8267
source => "${jira::download_url}/${file}",
8368
creates => "${jira::webappdir}/conf",
8469
cleanup => true,
85-
checksum_verify => $jira::checksum_verify,
70+
checksum_verify => ($jira::checksum != undef),
8671
checksum_type => 'md5',
8772
checksum => $jira::checksum,
8873
user => $jira::user,
8974
group => $jira::group,
9075
proxy_server => $jira::proxy_server,
9176
proxy_type => $jira::proxy_type,
92-
before => File[$jira::homedir],
9377
require => [
9478
File[$jira::installdir],
95-
File[$jira::webappdir],
9679
User[$jira::user],
80+
File[$jira::webappdir],
9781
],
9882
}
9983

100-
file { $jira::homedir:
101-
ensure => 'directory',
102-
owner => $jira::user,
103-
group => $jira::group,
104-
}
105-
106-
-> exec { "chown_${jira::extractdir}":
107-
command => "/bin/chown -R ${jira::user}:${jira::group} ${jira::extractdir}",
84+
-> exec { "chown_${jira::webappdir}":
85+
command => "/bin/chown -R ${jira::user}:${jira::group} ${jira::webappdir}",
10886
refreshonly => true,
10987
subscribe => User[$jira::user],
11088
}

0 commit comments

Comments
 (0)