@@ -21,47 +21,14 @@ class { 'mysql::server':
2121 grant => ['ALL'],
2222 }
2323
24- class { 'java':
25- distribution => 'jre',
26- }
27-
28- exec { 'tmpkey':
29- command => "openssl req -x509 -nodes -days 1 -subj '/C=CA/ST=QC/L=Montreal/O=FOO/CN=${facts['networking']['fqdn']}' -newkey rsa:1024 -keyout /tmp/key.pem -out /tmp/cert.pem",
30- path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ],
31- creates => '/tmp/cert.pem',
32- }
33-
34- java_ks { 'jira':
35- ensure => present,
36- name => 'jira',
37- certificate => '/tmp/cert.pem',
38- private_key => '/tmp/key.pem',
39- target => '/tmp/jira.ks',
40- password => 'changeit',
41- require => Exec['tmpkey'],
42- }
43-
44- # There is a bug in the check-java.sh that prevents jira from starting on Centos Stream 8
45- # https://jira.atlassian.com/browse/JRASERVER-77097
46- # Running with script_check_java_manage => true to solve this
4724 class { 'jira':
48- installdir => '/opt/atlassian-jira',
49- homedir => '/opt/jira-home',
50- javahome => '/usr',
51- jvm_type => 'oracle-jdk-1.8',
52- db => 'mysql',
53- dbport => 3306,
54- dbdriver => 'com.mysql.jdbc.Driver',
55- dbtype => 'mysql',
56- tomcat_port => 8081,
57- tomcat_native_ssl => true,
58- tomcat_keystore_file => '/tmp/jira.ks',
59- script_check_java_manage => true,
60- require => [Mysql::Db['jira'], Java_ks['jira']],
25+ db => 'mysql',
26+ require => Mysql::Db['jira'],
6127 }
6228 EOS
6329
64- wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081'
30+ # jira just takes *ages* to start up :-(
31+ wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080'
6532 apply_manifest ( pp , catch_failures : true )
6633 sleep SLEEP_SECONDS
6734 shell wget_cmd , acceptable_exit_codes : [ 0 , 8 ]
@@ -75,7 +42,7 @@ class { 'jira':
7542 it { is_expected . to be_running }
7643 end
7744
78- describe port ( 8081 ) do
45+ describe port ( 8080 ) do
7946 it { is_expected . to be_listening }
8047 end
8148
@@ -89,14 +56,8 @@ class { 'jira':
8956 it { is_expected . to have_login_shell '/bin/true' }
9057 end
9158
92- specify do
93- expect ( command ( 'wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- localhost:8081' ) ) .
94- to have_attributes ( stdout : %r{8.13.5} )
95- end
96-
97- specify do
98- expect ( command ( 'wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- https://localhost:8443' ) ) .
99- to have_attributes ( stdout : %r{8.13.5} )
59+ describe command ( 'wget -q --tries=54 --retry-connrefused --read-timeout=10 -O- localhost:8080' ) do
60+ its ( :stdout ) { is_expected . to include ( '9.12.0' ) }
10061 end
10162
10263 describe 'shutdown' do
0 commit comments