diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 048d2b55..6aaa603f 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -124,7 +124,7 @@ If you have Ruby 2.x or want a specific version of Puppet,
you must set an environment variable such as:
```sh
-export PUPPET_VERSION="~> 5.5.6"
+export PUPPET_GEM_VERSION="~> 6.1.0"
```
You can install all needed gems for spec tests into the modules directory by
@@ -232,19 +232,21 @@ simple tests against it after applying the module. You can run this
with:
```sh
-BEAKER_setfile=debian10-x64 bundle exec rake beaker
+BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
```
-You can replace the string `debian10` with any common operating system.
+You can replace the string `debian11` with any common operating system.
The following strings are known to work:
-* ubuntu1604
-* ubuntu1804
* ubuntu2004
-* debian9
-* debian10
+* ubuntu2204
+* debian11
* centos7
* centos8
+* centos9
+* almalinux8
+* almalinux9
+* fedora36
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).
diff --git a/.github/SECURITY.md b/.github/SECURITY.md
deleted file mode 100644
index cacadf22..00000000
--- a/.github/SECURITY.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Vox Pupuli Security Policy
-
-Our vulnerabilities reporting process is at https://voxpupuli.org/security/
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1dadbe82..7216724f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -4,85 +4,20 @@
name: CI
-on: pull_request
+on:
+ pull_request: {}
+ push:
+ branches:
+ - main
+ - master
-jobs:
- setup_matrix:
- name: 'Setup Test Matrix'
- runs-on: ubuntu-latest
- timeout-minutes: 40
- outputs:
- puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
- github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }}
- env:
- BUNDLE_WITHOUT: development:system_tests:release
- steps:
- - uses: actions/checkout@v2
- - name: Setup ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: '3.0'
- bundler-cache: true
- - name: Run static validations
- run: bundle exec rake validate lint check
- - name: Run rake rubocop
- run: bundle exec rake rubocop
- - name: Setup Test Matrix
- id: get-outputs
- run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false
-
- unit:
- needs: setup_matrix
- runs-on: ubuntu-latest
- timeout-minutes: 40
- strategy:
- fail-fast: false
- matrix:
- include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
- env:
- BUNDLE_WITHOUT: development:system_tests:release
- PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
- name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
- steps:
- - uses: actions/checkout@v2
- - name: Setup ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: ${{ matrix.ruby }}
- bundler-cache: true
- - name: Run tests
- run: bundle exec rake parallel_spec
+concurrency:
+ group: ${{ github.ref_name }}
+ cancel-in-progress: true
- acceptance:
- needs: setup_matrix
- runs-on: ubuntu-latest
- env:
- LANG: en_US
- LC_ALL: en_US.UTF-8
- BUNDLE_WITHOUT: development:test:release
- strategy:
- fail-fast: false
- matrix:
- include: ${{fromJson(needs.setup_matrix.outputs.github_action_test_matrix)}}
- name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
- steps:
- - uses: actions/checkout@v2
- - name: Setup ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: '3.0'
- bundler-cache: true
- - name: Run tests
- run: bundle exec rake beaker
- env:
- BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
- BEAKER_setfile: ${{ matrix.setfile.value }}
-
- tests:
- needs:
- - unit
- - acceptance
- runs-on: ubuntu-latest
- name: Test suite
- steps:
- - run: echo Test suite completed
+jobs:
+ puppet:
+ name: Puppet
+ uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
+ with:
+ pidfile_workaround: 'false'
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 664ba694..55324aa6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -9,26 +9,14 @@ on:
tags:
- '*'
-env:
- BUNDLE_WITHOUT: development:test:system_tests
-
jobs:
- deploy:
- name: 'deploy to forge'
- runs-on: ubuntu-latest
- if: github.repository_owner == 'voxpupuli'
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
- - name: Setup Ruby
- uses: ruby/setup-ruby@v1
- with:
- ruby-version: '2.7'
- bundler-cache: true
- - name: Build and Deploy
- env:
- # Configure secrets here:
- # https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
- BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
- BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
- run: bundle exec rake module:push
+ release:
+ name: Release
+ uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2
+ with:
+ allowed_owner: 'voxpupuli'
+ secrets:
+ # Configure secrets here:
+ # https://docs.github.com/en/actions/security-guides/encrypted-secrets
+ username: ${{ secrets.PUPPET_FORGE_USERNAME }}
+ api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}
diff --git a/.gitignore b/.gitignore
index 9b95224c..84fd904c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,23 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
-pkg/
-Gemfile.lock
-Gemfile.local
-vendor/
-.vendor/
-spec/fixtures/manifests/
-spec/fixtures/modules/
-.vagrant/
-.bundle/
-.ruby-version
-coverage/
-log/
-.idea/
-.dependencies/
-.librarian/
-Puppetfile.lock
+/pkg/
+/Gemfile.lock
+/Gemfile.local
+/vendor/
+/.vendor/
+/spec/fixtures/manifests/
+/spec/fixtures/modules/
+/.vagrant/
+/.bundle/
+/.ruby-version
+/coverage/
+/log/
+/.idea/
+/.dependencies/
+/.librarian/
+/Puppetfile.lock
*.iml
.*.sw?
-.yardoc/
-Guardfile
+/.yardoc/
+/Guardfile
diff --git a/.msync.yml b/.msync.yml
index 43966c2f..f46ee025 100644
--- a/.msync.yml
+++ b/.msync.yml
@@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
-modulesync_config_version: '4.2.0'
+modulesync_config_version: '7.3.0'
diff --git a/.pmtignore b/.pmtignore
index 65f50514..10b98306 100644
--- a/.pmtignore
+++ b/.pmtignore
@@ -1,37 +1,38 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
-docs/
-pkg/
-Gemfile
-Gemfile.lock
-Gemfile.local
-vendor/
-.vendor/
-spec/
-Rakefile
-.vagrant/
-.bundle/
-.ruby-version
-coverage/
-log/
-.idea/
-.dependencies/
-.github/
-.librarian/
-Puppetfile.lock
+/docs/
+/pkg/
+/Gemfile
+/Gemfile.lock
+/Gemfile.local
+/vendor/
+/.vendor/
+/spec/
+/Rakefile
+/.vagrant/
+/.bundle/
+/.ruby-version
+/coverage/
+/log/
+/.idea/
+/.dependencies/
+/.github/
+/.librarian/
+/Puppetfile.lock
*.iml
-.editorconfig
-.fixtures.yml
-.gitignore
-.msync.yml
-.overcommit.yml
-.pmtignore
-.rspec
-.rspec_parallel
-.rubocop.yml
-.sync.yml
+/.editorconfig
+/.fixtures.yml
+/.gitignore
+/.msync.yml
+/.overcommit.yml
+/.pmtignore
+/.rspec
+/.rspec_parallel
+/.rubocop.yml
+/.sync.yml
.*.sw?
-.yardoc/
-.yardopts
-Dockerfile
+/.yardoc/
+/.yardopts
+/Dockerfile
+/HISTORY.md
diff --git a/.puppet-lint.rc b/.puppet-lint.rc
new file mode 100644
index 00000000..dd8272c7
--- /dev/null
+++ b/.puppet-lint.rc
@@ -0,0 +1,3 @@
+--fail-on-warnings
+--no-parameter_documentation-check
+--no-parameter_types-check
diff --git a/Dockerfile b/Dockerfile
index e3cf307f..8dd82d63 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,7 +8,7 @@ WORKDIR /opt/puppet
# https://github.com/puppetlabs/puppet/blob/06ad255754a38f22fb3a22c7c4f1e2ce453d01cb/lib/puppet/provider/service/runit.rb#L39
RUN mkdir -p /etc/sv
-ARG PUPPET_VERSION="~> 6.0"
+ARG PUPPET_GEM_VERSION="~> 6.0"
ARG PARALLEL_TEST_PROCESSORS=4
# Cache gems
diff --git a/Gemfile b/Gemfile
index e43173e0..c03b7520 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,13 +1,13 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
-source ENV['GEM_SOURCE'] || "https://rubygems.org"
+source ENV['GEM_SOURCE'] || 'https://rubygems.org'
group :test do
- gem 'voxpupuli-test', '~> 2.5', :require => false
+ gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
- gem 'puppet_metadata', '~> 1.0', :require => false
+ gem 'puppet_metadata', '~> 3.5', :require => false
gem 'puppet-lint-param-docs', :require => false
end
@@ -17,19 +17,17 @@ group :development do
end
group :system_tests do
- gem 'voxpupuli-acceptance', '~> 1.0', :require => false
+ gem 'voxpupuli-acceptance', '~> 3.0', :require => false
end
group :release do
- gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
- gem 'voxpupuli-release', '>= 1.0.2', :require => false
- gem 'puppet-strings', '>= 2.2', :require => false
+ gem 'voxpupuli-release', '~> 3.0', :require => false
end
gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]
-puppetversion = ENV['PUPPET_VERSION'] || '>= 6.0'
+puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24'
gem 'puppet', puppetversion, :require => false, :groups => [:test]
# vim: syntax=ruby
diff --git a/REFERENCE.md b/REFERENCE.md
index 43d7f705..1e468dd4 100644
--- a/REFERENCE.md
+++ b/REFERENCE.md
@@ -20,18 +20,15 @@
### Functions
-#### Public Functions
-
-
#### Private Functions
* `jira::sort_hash`: Sort a hash
### Data types
-* [`Jira::Jvm_types`](#jirajvm_types): Java Virtual Machine (JVM) types
-* [`Jira::Tomcat_attributes`](#jiratomcat_attributes): A hash of string keys to arbitrary values that will be rendered as XML attributes
-* [`Jira::Tomcat_connectors`](#jiratomcat_connectors): A set of attribute hashes keyed by connector port number
+* [`Jira::Jvm_types`](#Jira--Jvm_types): Java Virtual Machine (JVM) types
+* [`Jira::Tomcat_attributes`](#Jira--Tomcat_attributes): A hash of string keys to arbitrary values that will be rendered as XML attributes
+* [`Jira::Tomcat_connectors`](#Jira--Tomcat_connectors): A set of attribute hashes keyed by connector port number
## Classes
@@ -57,124 +54,126 @@
The following parameters are available in the `jira` class:
-* [`version`](#version)
-* [`product`](#product)
-* [`installdir`](#installdir)
-* [`homedir`](#homedir)
-* [`manage_user`](#manage_user)
-* [`user`](#user)
-* [`group`](#group)
-* [`installdir_owner`](#installdir_owner)
-* [`installdir_group`](#installdir_group)
-* [`installdir_mode`](#installdir_mode)
-* [`homedir_mode`](#homedir_mode)
-* [`uid`](#uid)
-* [`gid`](#gid)
-* [`shell`](#shell)
-* [`enable_secure_admin_sessions`](#enable_secure_admin_sessions)
-* [`jira_config_properties`](#jira_config_properties)
-* [`datacenter`](#datacenter)
-* [`shared_homedir`](#shared_homedir)
-* [`ehcache_listener_host`](#ehcache_listener_host)
-* [`ehcache_listener_port`](#ehcache_listener_port)
-* [`ehcache_object_port`](#ehcache_object_port)
-* [`db`](#db)
-* [`dbname`](#dbname)
-* [`dbuser`](#dbuser)
-* [`dbpassword`](#dbpassword)
-* [`dbserver`](#dbserver)
-* [`dbport`](#dbport)
-* [`dbtype`](#dbtype)
-* [`dbdriver`](#dbdriver)
-* [`dbschema`](#dbschema)
-* [`dburl`](#dburl)
-* [`connection_settings`](#connection_settings)
-* [`oracle_use_sid`](#oracle_use_sid)
-* [`mysql_connector_manage`](#mysql_connector_manage)
-* [`mysql_connector_version`](#mysql_connector_version)
-* [`mysql_connector_product`](#mysql_connector_product)
-* [`mysql_connector_install`](#mysql_connector_install)
-* [`mysql_connector_format`](#mysql_connector_format)
-* [`mysql_connector_url`](#mysql_connector_url)
-* [`pool_min_size`](#pool_min_size)
-* [`pool_max_size`](#pool_max_size)
-* [`pool_max_wait`](#pool_max_wait)
-* [`validation_query`](#validation_query)
-* [`validation_query_timeout`](#validation_query_timeout)
-* [`min_evictable_idle_time`](#min_evictable_idle_time)
-* [`time_between_eviction_runs`](#time_between_eviction_runs)
-* [`pool_max_idle`](#pool_max_idle)
-* [`pool_remove_abandoned`](#pool_remove_abandoned)
-* [`pool_remove_abandoned_timeout`](#pool_remove_abandoned_timeout)
-* [`pool_test_while_idle`](#pool_test_while_idle)
-* [`pool_test_on_borrow`](#pool_test_on_borrow)
-* [`java_package`](#java_package)
-* [`javahome`](#javahome)
-* [`jvm_type`](#jvm_type)
-* [`jvm_xms`](#jvm_xms)
-* [`jvm_xmx`](#jvm_xmx)
-* [`java_opts`](#java_opts)
-* [`jvm_gc_args`](#jvm_gc_args)
-* [`jvm_code_cache_args`](#jvm_code_cache_args)
-* [`jvm_extra_args`](#jvm_extra_args)
-* [`jvm_nofiles_limit`](#jvm_nofiles_limit)
-* [`catalina_opts`](#catalina_opts)
-* [`download_url`](#download_url)
-* [`checksum`](#checksum)
-* [`disable_notifications`](#disable_notifications)
-* [`proxy_server`](#proxy_server)
-* [`proxy_type`](#proxy_type)
-* [`service_manage`](#service_manage)
-* [`service_ensure`](#service_ensure)
-* [`service_enable`](#service_enable)
-* [`service_notify`](#service_notify)
-* [`service_subscribe`](#service_subscribe)
-* [`stop_jira`](#stop_jira)
-* [`script_check_java_manage`](#script_check_java_manage)
-* [`script_check_java_template`](#script_check_java_template)
-* [`tomcat_address`](#tomcat_address)
-* [`tomcat_port`](#tomcat_port)
-* [`tomcat_shutdown_port`](#tomcat_shutdown_port)
-* [`tomcat_max_http_header_size`](#tomcat_max_http_header_size)
-* [`tomcat_min_spare_threads`](#tomcat_min_spare_threads)
-* [`tomcat_connection_timeout`](#tomcat_connection_timeout)
-* [`tomcat_enable_lookups`](#tomcat_enable_lookups)
-* [`tomcat_native_ssl`](#tomcat_native_ssl)
-* [`tomcat_https_port`](#tomcat_https_port)
-* [`tomcat_redirect_https_port`](#tomcat_redirect_https_port)
-* [`tomcat_protocol`](#tomcat_protocol)
-* [`tomcat_protocol_ssl`](#tomcat_protocol_ssl)
-* [`tomcat_use_body_encoding_for_uri`](#tomcat_use_body_encoding_for_uri)
-* [`tomcat_disable_upload_timeout`](#tomcat_disable_upload_timeout)
-* [`tomcat_key_alias`](#tomcat_key_alias)
-* [`tomcat_keystore_file`](#tomcat_keystore_file)
-* [`tomcat_keystore_pass`](#tomcat_keystore_pass)
-* [`tomcat_keystore_type`](#tomcat_keystore_type)
-* [`tomcat_accesslog_format`](#tomcat_accesslog_format)
-* [`tomcat_accesslog_enable_xforwarded_for`](#tomcat_accesslog_enable_xforwarded_for)
-* [`tomcat_max_threads`](#tomcat_max_threads)
-* [`tomcat_accept_count`](#tomcat_accept_count)
-* [`proxy`](#proxy)
-* [`ajp`](#ajp)
-* [`tomcat_default_connector`](#tomcat_default_connector)
-* [`tomcat_additional_connectors`](#tomcat_additional_connectors)
-* [`contextpath`](#contextpath)
-* [`resources`](#resources)
-* [`enable_sso`](#enable_sso)
-* [`application_name`](#application_name)
-* [`application_password`](#application_password)
-* [`application_login_url`](#application_login_url)
-* [`crowd_server_url`](#crowd_server_url)
-* [`crowd_base_url`](#crowd_base_url)
-* [`session_isauthenticated`](#session_isauthenticated)
-* [`session_tokenkey`](#session_tokenkey)
-* [`session_validationinterval`](#session_validationinterval)
-* [`session_lastvalidation`](#session_lastvalidation)
-* [`jvm_permgen`](#jvm_permgen)
-* [`poolsize`](#poolsize)
-* [`enable_connection_pooling`](#enable_connection_pooling)
-
-##### `version`
+* [`version`](#-jira--version)
+* [`product`](#-jira--product)
+* [`installdir`](#-jira--installdir)
+* [`homedir`](#-jira--homedir)
+* [`manage_user`](#-jira--manage_user)
+* [`user`](#-jira--user)
+* [`group`](#-jira--group)
+* [`installdir_owner`](#-jira--installdir_owner)
+* [`installdir_group`](#-jira--installdir_group)
+* [`installdir_mode`](#-jira--installdir_mode)
+* [`homedir_mode`](#-jira--homedir_mode)
+* [`uid`](#-jira--uid)
+* [`gid`](#-jira--gid)
+* [`shell`](#-jira--shell)
+* [`enable_secure_admin_sessions`](#-jira--enable_secure_admin_sessions)
+* [`jira_config_properties`](#-jira--jira_config_properties)
+* [`datacenter`](#-jira--datacenter)
+* [`shared_homedir`](#-jira--shared_homedir)
+* [`ehcache_listener_host`](#-jira--ehcache_listener_host)
+* [`ehcache_listener_port`](#-jira--ehcache_listener_port)
+* [`ehcache_object_port`](#-jira--ehcache_object_port)
+* [`use_jndi_ds`](#-jira--use_jndi_ds)
+* [`jndi_ds_name`](#-jira--jndi_ds_name)
+* [`db`](#-jira--db)
+* [`dbname`](#-jira--dbname)
+* [`dbuser`](#-jira--dbuser)
+* [`dbpassword`](#-jira--dbpassword)
+* [`dbserver`](#-jira--dbserver)
+* [`dbport`](#-jira--dbport)
+* [`dbtype`](#-jira--dbtype)
+* [`dbdriver`](#-jira--dbdriver)
+* [`dbschema`](#-jira--dbschema)
+* [`dburl`](#-jira--dburl)
+* [`connection_settings`](#-jira--connection_settings)
+* [`oracle_use_sid`](#-jira--oracle_use_sid)
+* [`mysql_connector_manage`](#-jira--mysql_connector_manage)
+* [`mysql_connector_version`](#-jira--mysql_connector_version)
+* [`mysql_connector_product`](#-jira--mysql_connector_product)
+* [`mysql_connector_install`](#-jira--mysql_connector_install)
+* [`mysql_connector_format`](#-jira--mysql_connector_format)
+* [`mysql_connector_url`](#-jira--mysql_connector_url)
+* [`pool_min_size`](#-jira--pool_min_size)
+* [`pool_max_size`](#-jira--pool_max_size)
+* [`pool_max_wait`](#-jira--pool_max_wait)
+* [`validation_query`](#-jira--validation_query)
+* [`validation_query_timeout`](#-jira--validation_query_timeout)
+* [`min_evictable_idle_time`](#-jira--min_evictable_idle_time)
+* [`time_between_eviction_runs`](#-jira--time_between_eviction_runs)
+* [`pool_max_idle`](#-jira--pool_max_idle)
+* [`pool_remove_abandoned`](#-jira--pool_remove_abandoned)
+* [`pool_remove_abandoned_timeout`](#-jira--pool_remove_abandoned_timeout)
+* [`pool_test_while_idle`](#-jira--pool_test_while_idle)
+* [`pool_test_on_borrow`](#-jira--pool_test_on_borrow)
+* [`java_package`](#-jira--java_package)
+* [`javahome`](#-jira--javahome)
+* [`jvm_type`](#-jira--jvm_type)
+* [`jvm_xms`](#-jira--jvm_xms)
+* [`jvm_xmx`](#-jira--jvm_xmx)
+* [`java_opts`](#-jira--java_opts)
+* [`jvm_gc_args`](#-jira--jvm_gc_args)
+* [`jvm_code_cache_args`](#-jira--jvm_code_cache_args)
+* [`jvm_extra_args`](#-jira--jvm_extra_args)
+* [`jvm_nofiles_limit`](#-jira--jvm_nofiles_limit)
+* [`download_url`](#-jira--download_url)
+* [`checksum`](#-jira--checksum)
+* [`disable_notifications`](#-jira--disable_notifications)
+* [`proxy_server`](#-jira--proxy_server)
+* [`proxy_type`](#-jira--proxy_type)
+* [`service_manage`](#-jira--service_manage)
+* [`service_ensure`](#-jira--service_ensure)
+* [`service_enable`](#-jira--service_enable)
+* [`service_notify`](#-jira--service_notify)
+* [`service_subscribe`](#-jira--service_subscribe)
+* [`stop_jira`](#-jira--stop_jira)
+* [`script_check_java_manage`](#-jira--script_check_java_manage)
+* [`script_check_java_template`](#-jira--script_check_java_template)
+* [`tomcat_address`](#-jira--tomcat_address)
+* [`tomcat_port`](#-jira--tomcat_port)
+* [`tomcat_shutdown_port`](#-jira--tomcat_shutdown_port)
+* [`tomcat_max_http_header_size`](#-jira--tomcat_max_http_header_size)
+* [`tomcat_min_spare_threads`](#-jira--tomcat_min_spare_threads)
+* [`tomcat_connection_timeout`](#-jira--tomcat_connection_timeout)
+* [`tomcat_enable_lookups`](#-jira--tomcat_enable_lookups)
+* [`tomcat_native_ssl`](#-jira--tomcat_native_ssl)
+* [`tomcat_https_port`](#-jira--tomcat_https_port)
+* [`tomcat_redirect_https_port`](#-jira--tomcat_redirect_https_port)
+* [`tomcat_protocol`](#-jira--tomcat_protocol)
+* [`tomcat_protocol_ssl`](#-jira--tomcat_protocol_ssl)
+* [`tomcat_use_body_encoding_for_uri`](#-jira--tomcat_use_body_encoding_for_uri)
+* [`tomcat_disable_upload_timeout`](#-jira--tomcat_disable_upload_timeout)
+* [`tomcat_key_alias`](#-jira--tomcat_key_alias)
+* [`tomcat_keystore_file`](#-jira--tomcat_keystore_file)
+* [`tomcat_keystore_pass`](#-jira--tomcat_keystore_pass)
+* [`tomcat_keystore_type`](#-jira--tomcat_keystore_type)
+* [`tomcat_accesslog_format`](#-jira--tomcat_accesslog_format)
+* [`tomcat_accesslog_enable_xforwarded_for`](#-jira--tomcat_accesslog_enable_xforwarded_for)
+* [`tomcat_max_threads`](#-jira--tomcat_max_threads)
+* [`tomcat_accept_count`](#-jira--tomcat_accept_count)
+* [`proxy`](#-jira--proxy)
+* [`ajp`](#-jira--ajp)
+* [`tomcat_default_connector`](#-jira--tomcat_default_connector)
+* [`tomcat_additional_connectors`](#-jira--tomcat_additional_connectors)
+* [`contextpath`](#-jira--contextpath)
+* [`resources`](#-jira--resources)
+* [`enable_sso`](#-jira--enable_sso)
+* [`application_name`](#-jira--application_name)
+* [`application_password`](#-jira--application_password)
+* [`application_login_url`](#-jira--application_login_url)
+* [`crowd_server_url`](#-jira--crowd_server_url)
+* [`crowd_base_url`](#-jira--crowd_base_url)
+* [`session_isauthenticated`](#-jira--session_isauthenticated)
+* [`session_tokenkey`](#-jira--session_tokenkey)
+* [`session_validationinterval`](#-jira--session_validationinterval)
+* [`session_lastvalidation`](#-jira--session_lastvalidation)
+* [`plugins`](#-jira--plugins)
+* [`jvm_permgen`](#-jira--jvm_permgen)
+* [`poolsize`](#-jira--poolsize)
+* [`enable_connection_pooling`](#-jira--enable_connection_pooling)
+
+##### `version`
Data type: `String`
@@ -182,7 +181,7 @@ The JIRA version to install or upgrade to. Changing this will trigger a restart
Default value: `'8.13.5'`
-##### `product`
+##### `product`
Data type: `String[1]`
@@ -190,7 +189,7 @@ Atlassian product to install.
Default value: `'jira'`
-##### `installdir`
+##### `installdir`
Data type: `Stdlib::Absolutepath`
@@ -198,7 +197,7 @@ The directory in which JIRA software packages will be extracted
Default value: `'/opt/jira'`
-##### `homedir`
+##### `homedir`
Data type: `Stdlib::Absolutepath`
@@ -206,15 +205,15 @@ The directory for JIRA's runtime data that persists between versions.
Default value: `'/home/jira'`
-##### `manage_user`
+##### `manage_user`
Data type: `Boolean`
Whether to manage the service user
-Default value: ``true``
+Default value: `true`
-##### `user`
+##### `user`
Data type: `String`
@@ -222,7 +221,7 @@ User that the service will run as
Default value: `'jira'`
-##### `group`
+##### `group`
Data type: `String`
@@ -230,7 +229,7 @@ Group that the service will run as
Default value: `'jira'`
-##### `installdir_owner`
+##### `installdir_owner`
Data type: `String[1]`
@@ -238,7 +237,7 @@ The owner of the installation directory.
Default value: `'root'`
-##### `installdir_group`
+##### `installdir_group`
Data type: `String[1]`
@@ -246,7 +245,7 @@ The group of the installation directory.
Default value: `'root'`
-##### `installdir_mode`
+##### `installdir_mode`
Data type: `Stdlib::Filemode`
@@ -254,31 +253,31 @@ The permissions of the installation directory. Note that the JIRA service user m
Default value: `'0755'`
-##### `homedir_mode`
+##### `homedir_mode`
Data type: `Optional[Stdlib::Filemode]`
The permissions of the service user's home directory, where JIRA's data will reside
-Default value: ``undef``
+Default value: `undef`
-##### `uid`
+##### `uid`
Data type: `Optional[Integer[0]]`
The desired UID for the service user
-Default value: ``undef``
+Default value: `undef`
-##### `gid`
+##### `gid`
Data type: `Optional[Integer[0]]`
The desired GID for the service group
-Default value: ``undef``
+Default value: `undef`
-##### `shell`
+##### `shell`
Data type: `Stdlib::Absolutepath`
@@ -286,15 +285,15 @@ The shell of the service user
Default value: `'/bin/true'`
-##### `enable_secure_admin_sessions`
+##### `enable_secure_admin_sessions`
Data type: `Boolean`
Enables secure administrator sessions
-Default value: ``true``
+Default value: `true`
-##### `jira_config_properties`
+##### `jira_config_properties`
Data type: `Hash`
@@ -303,47 +302,63 @@ See https://confluence.atlassian.com/adminjiraserver0813/advanced-jira-applicati
Default value: `{}`
-##### `datacenter`
+##### `datacenter`
Data type: `Boolean`
Set to true to enable clustered mode (JIRA Datacenter)
-Default value: ``false``
+Default value: `false`
-##### `shared_homedir`
+##### `shared_homedir`
Data type: `Optional[Stdlib::AbsolutePath]`
Shared data directory for all JIRA instances in a cluster
-Default value: ``undef``
+Default value: `undef`
-##### `ehcache_listener_host`
+##### `ehcache_listener_host`
Data type: `Optional[Stdlib::Host]`
EHCache configuration for clustered mode
-Default value: ``undef``
+Default value: `undef`
-##### `ehcache_listener_port`
+##### `ehcache_listener_port`
Data type: `Optional[Stdlib::Port]`
EHCache configuration for clustered mode
-Default value: ``undef``
+Default value: `undef`
-##### `ehcache_object_port`
+##### `ehcache_object_port`
Data type: `Optional[Stdlib::Port]`
EHCache configuration for clustered mode
-Default value: ``undef``
+Default value: `undef`
+
+##### `use_jndi_ds`
+
+Data type: `Boolean`
+
+If true, the database will be configured as JNDI datasource in server.xml and then referenced in dbconfig.xml
+
+Default value: `false`
-##### `db`
+##### `jndi_ds_name`
+
+Data type: `String[1]`
+
+Configures the JNDI datasource name
+
+Default value: `'JiraDS'`
+
+##### `db`
Data type: `Enum['postgresql','mysql','sqlserver','oracle','h2']`
@@ -351,7 +366,7 @@ The kind of database to use.
Default value: `'postgresql'`
-##### `dbname`
+##### `dbname`
Data type: `String`
@@ -359,7 +374,7 @@ The database name to connect to
Default value: `'jira'`
-##### `dbuser`
+##### `dbuser`
Data type: `String`
@@ -367,7 +382,7 @@ Database username
Default value: `'jiraadm'`
-##### `dbpassword`
+##### `dbpassword`
Data type: `String`
@@ -375,7 +390,7 @@ Database password
Default value: `'mypassword'`
-##### `dbserver`
+##### `dbserver`
Data type: `String`
@@ -383,47 +398,47 @@ Database host DNS name or IP address
Default value: `'localhost'`
-##### `dbport`
+##### `dbport`
Data type: `Optional[Variant[Integer,String]]`
The database port. Default depends on `$db`
-Default value: ``undef``
+Default value: `undef`
-##### `dbtype`
+##### `dbtype`
Data type: `Optional[String]`
The database type. Default depends on `$db`
-Default value: ``undef``
+Default value: `undef`
-##### `dbdriver`
+##### `dbdriver`
Data type: `Optional[String]`
The database driver class. Default depends on `$db`
-Default value: ``undef``
+Default value: `undef`
-##### `dbschema`
+##### `dbschema`
Data type: `Optional[String[1]]`
The database schema, if applicable. Defaults to 'public' with PostgreSQL
-Default value: ``undef``
+Default value: `undef`
-##### `dburl`
+##### `dburl`
Data type: `Optional[String]`
Set this if you wish to use a custom database URL
-Default value: ``undef``
+Default value: `undef`
-##### `connection_settings`
+##### `connection_settings`
Data type: `Optional[String]`
@@ -431,25 +446,25 @@ Configures additional JDBC connection properties in dbconfig.xml
For PostgreSQL, a default value of "tcpKeepAlive=true;socketTimeout=240" will be used
See https://confluence.atlassian.com/jirakb/connection-problems-to-postgresql-result-in-stuck-threads-in-jira-1047534091.html
-Default value: ``undef``
+Default value: `undef`
-##### `oracle_use_sid`
+##### `oracle_use_sid`
Data type: `Boolean`
Affects the database URL format for Oracle depending on whether you connect via a SID or a service name
-Default value: ``true``
+Default value: `true`
-##### `mysql_connector_manage`
+##### `mysql_connector_manage`
Data type: `Boolean`
If true, the module will download and install the MySQL connector for JDBC
-Default value: ``true``
+Default value: `true`
-##### `mysql_connector_version`
+##### `mysql_connector_version`
Data type: `String`
@@ -457,7 +472,7 @@ Version of the connector to install
Default value: `'8.0.23'`
-##### `mysql_connector_product`
+##### `mysql_connector_product`
Data type: `String`
@@ -465,7 +480,7 @@ Determines the filename for the download
Default value: `'mysql-connector-java'`
-##### `mysql_connector_install`
+##### `mysql_connector_install`
Data type: `Stdlib::Absolutepath`
@@ -473,7 +488,7 @@ Directory in which the connector will be installed
Default value: `'/opt/MySQL-connector'`
-##### `mysql_connector_format`
+##### `mysql_connector_format`
Data type: `String`
@@ -481,7 +496,7 @@ Format of the downloaded package
Default value: `'tar.gz'`
-##### `mysql_connector_url`
+##### `mysql_connector_url`
Data type: `Stdlib::HTTPUrl`
@@ -489,119 +504,119 @@ Source for the connector
Default value: `'https://dev.mysql.com/get/Downloads/Connector-J'`
-##### `pool_min_size`
+##### `pool_min_size`
Data type: `Optional[Integer[0]]`
Configures pool-min-size in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `pool_max_size`
+##### `pool_max_size`
Data type: `Optional[Integer[0]]`
Configures pool-max-size in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `pool_max_wait`
+##### `pool_max_wait`
Data type: `Optional[Integer[-1]]`
Configures pool-max-wait in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `validation_query`
+##### `validation_query`
Data type: `Optional[String]`
Configures validation_query in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `validation_query_timeout`
+##### `validation_query_timeout`
Data type: `Optional[Integer[0]]`
Configures validation_query_timeout in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `min_evictable_idle_time`
+##### `min_evictable_idle_time`
Data type: `Optional[Integer[0]]`
Configures min-evictable-idle-time-millis in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `time_between_eviction_runs`
+##### `time_between_eviction_runs`
Data type: `Optional[Integer[0]]`
Configures time-between-eviction-runs-millis in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `pool_max_idle`
+##### `pool_max_idle`
Data type: `Optional[Integer[0]]`
Configures pool-max-idle in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `pool_remove_abandoned`
+##### `pool_remove_abandoned`
Data type: `Optional[Boolean]`
Configures pool-remove-abandoned in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `pool_remove_abandoned_timeout`
+##### `pool_remove_abandoned_timeout`
Data type: `Optional[Integer[0]]`
Configures pool-remove-abandoned-timeout in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `pool_test_while_idle`
+##### `pool_test_while_idle`
Data type: `Optional[Boolean]`
Configures pool-test-while-idle in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `pool_test_on_borrow`
+##### `pool_test_on_borrow`
Data type: `Optional[Boolean]`
Configures pool-test-on-borrow in dbconfig.xml
-Default value: ``undef``
+Default value: `undef`
-##### `java_package`
+##### `java_package`
Data type: `Optional[String[1]]`
If defined, the module will install this package before installing JIRA.
-Default value: ``undef``
+Default value: `undef`
-##### `javahome`
+##### `javahome`
Data type: `Optional[Stdlib::AbsolutePath]`
The location of an installed JVM. Must be set even if you specify java_package
-Default value: ``undef``
+Default value: `undef`
-##### `jvm_type`
+##### `jvm_type`
Data type: `Jira::Jvm_types`
@@ -609,7 +624,7 @@ The type of JVM to use. Affects some defaults for the arguments below
Default value: `'openjdk-11'`
-##### `jvm_xms`
+##### `jvm_xms`
Data type: `String`
@@ -617,7 +632,7 @@ Java -Xms parameter
Default value: `'256m'`
-##### `jvm_xmx`
+##### `jvm_xmx`
Data type: `String`
@@ -625,39 +640,39 @@ Java -Xmx parameter
Default value: `'1024m'`
-##### `java_opts`
+##### `java_opts`
Data type: `Optional[String]`
Configures JVM_SUPPORT_RECOMMENDED_ARGS in setenv.sh. This is the preferred option to override.
-Default value: ``undef``
+Default value: `undef`
-##### `jvm_gc_args`
+##### `jvm_gc_args`
Data type: `Optional[String]`
Configures JVM_GC_ARGS in setenv.sh
-Default value: ``undef``
+Default value: `undef`
-##### `jvm_code_cache_args`
+##### `jvm_code_cache_args`
Data type: `Optional[String]`
Configures JVM_CODE_CACHE_ARGS in setenv.sh
-Default value: ``undef``
+Default value: `undef`
-##### `jvm_extra_args`
+##### `jvm_extra_args`
Data type: `Optional[String]`
Configures JVM_EXTRA_ARGS in setenv.sh
-Default value: ``undef``
+Default value: `undef`
-##### `jvm_nofiles_limit`
+##### `jvm_nofiles_limit`
Data type: `Integer`
@@ -665,15 +680,7 @@ Set the limit for open files
Default value: `16384`
-##### `catalina_opts`
-
-Data type: `String`
-
-Does nothing :-)
-
-Default value: `''`
-
-##### `download_url`
+##### `download_url`
Data type: `Stdlib::HTTPUrl`
@@ -681,47 +688,47 @@ Base URL for downloading Atlassian software
Default value: `'https://product-downloads.atlassian.com/software/jira/downloads'`
-##### `checksum`
+##### `checksum`
Data type: `Optional[String]`
Optional checksum to verify the downloaded package
-Default value: ``undef``
+Default value: `undef`
-##### `disable_notifications`
+##### `disable_notifications`
Data type: `Boolean`
Configures JIRA to disable e-mail handlers
-Default value: ``false``
+Default value: `false`
-##### `proxy_server`
+##### `proxy_server`
Data type: `Optional[String]`
Configures the proxy server to use for downloads
-Default value: ``undef``
+Default value: `undef`
-##### `proxy_type`
+##### `proxy_type`
Data type: `Optional[Enum['none','http','https','ftp']]`
Configures the proxy type
-Default value: ``undef``
+Default value: `undef`
-##### `service_manage`
+##### `service_manage`
Data type: `Boolean`
Whether to manage the jira service
-Default value: ``true``
+Default value: `true`
-##### `service_ensure`
+##### `service_ensure`
Data type: `Stdlib::Ensure::Service`
@@ -729,31 +736,31 @@ Service state to ensure
Default value: `'running'`
-##### `service_enable`
+##### `service_enable`
Data type: `Boolean`
Whether to enable the service on boot
-Default value: ``true``
+Default value: `true`
-##### `service_notify`
+##### `service_notify`
Data type: `Any`
Service notify parameter
-Default value: ``undef``
+Default value: `undef`
-##### `service_subscribe`
+##### `service_subscribe`
Data type: `Any`
Service subscribe parameter
-Default value: ``undef``
+Default value: `undef`
-##### `stop_jira`
+##### `stop_jira`
Data type: `String`
@@ -761,15 +768,15 @@ The command used to stop jira prior to upgrades. You can override this if you us
Default value: `'systemctl stop jira.service && sleep 15'`
-##### `script_check_java_manage`
+##### `script_check_java_manage`
Data type: `Boolean`
undocumented
-Default value: ``false``
+Default value: `false`
-##### `script_check_java_template`
+##### `script_check_java_template`
Data type: `String`
@@ -777,15 +784,15 @@ undocumented
Default value: `'jira/check-java.sh.erb'`
-##### `tomcat_address`
+##### `tomcat_address`
Data type: `Optional[String]`
Tomcat bind address
-Default value: ``undef``
+Default value: `undef`
-##### `tomcat_port`
+##### `tomcat_port`
Data type: `Stdlib::Port`
@@ -793,7 +800,7 @@ Tomcat bind port
Default value: `8080`
-##### `tomcat_shutdown_port`
+##### `tomcat_shutdown_port`
Data type: `Stdlib::Port`
@@ -801,7 +808,7 @@ Tomcat shutdown command port
Default value: `8005`
-##### `tomcat_max_http_header_size`
+##### `tomcat_max_http_header_size`
Data type: `Integer`
@@ -809,7 +816,7 @@ Tomcat connector setting
Default value: `8192`
-##### `tomcat_min_spare_threads`
+##### `tomcat_min_spare_threads`
Data type: `Integer[0]`
@@ -817,7 +824,7 @@ Tomcat connector setting
Default value: `25`
-##### `tomcat_connection_timeout`
+##### `tomcat_connection_timeout`
Data type: `Integer[0]`
@@ -825,23 +832,23 @@ Tomcat connector setting
Default value: `20000`
-##### `tomcat_enable_lookups`
+##### `tomcat_enable_lookups`
Data type: `Boolean`
Tomcat connector setting
-Default value: ``false``
+Default value: `false`
-##### `tomcat_native_ssl`
+##### `tomcat_native_ssl`
Data type: `Boolean`
Enables a native SSL connector
-Default value: ``false``
+Default value: `false`
-##### `tomcat_https_port`
+##### `tomcat_https_port`
Data type: `Stdlib::Port`
@@ -849,7 +856,7 @@ Tomcat port for the native SSL connector
Default value: `8443`
-##### `tomcat_redirect_https_port`
+##### `tomcat_redirect_https_port`
Data type: `Optional[Stdlib::Port]`
@@ -857,9 +864,9 @@ Specify which port to redirect internally when using port redirection from 80 to
from 443 to 8443 or with proxy server in front, defaults to $tomcat_https_port. To be used
with tomcat_native_ssl.
-Default value: ``undef``
+Default value: `undef`
-##### `tomcat_protocol`
+##### `tomcat_protocol`
Data type: `String`
@@ -867,31 +874,31 @@ Tomcat connector setting
Default value: `'HTTP/1.1'`
-##### `tomcat_protocol_ssl`
+##### `tomcat_protocol_ssl`
Data type: `Optional[String]`
Tomcat connector setting
-Default value: ``undef``
+Default value: `undef`
-##### `tomcat_use_body_encoding_for_uri`
+##### `tomcat_use_body_encoding_for_uri`
Data type: `Boolean`
Tomcat connector setting
-Default value: ``true``
+Default value: `true`
-##### `tomcat_disable_upload_timeout`
+##### `tomcat_disable_upload_timeout`
Data type: `Boolean`
Tomcat connector setting
-Default value: ``true``
+Default value: `true`
-##### `tomcat_key_alias`
+##### `tomcat_key_alias`
Data type: `String`
@@ -899,7 +906,7 @@ Key alias in the keystore for the SSL connector
Default value: `'jira'`
-##### `tomcat_keystore_file`
+##### `tomcat_keystore_file`
Data type: `Stdlib::Absolutepath`
@@ -907,7 +914,7 @@ Path to a Java keystore for the SSL connector
Default value: `'/home/jira/jira.jks'`
-##### `tomcat_keystore_pass`
+##### `tomcat_keystore_pass`
Data type: `String`
@@ -915,7 +922,7 @@ Keystore passphrase
Default value: `'changeit'`
-##### `tomcat_keystore_type`
+##### `tomcat_keystore_type`
Data type: `Enum['JKS', 'JCEKS', 'PKCS12']`
@@ -923,7 +930,7 @@ Keystore type
Default value: `'JKS'`
-##### `tomcat_accesslog_format`
+##### `tomcat_accesslog_format`
Data type: `String`
@@ -931,7 +938,7 @@ Format string for Tomcat access log
Default value: `'%a %{jira.request.id}r %{jira.request.username}r %t "%m %U%q %H" %s %b %D "%{Referer}i" "%{User-Agent}i" "%{jira.request.assession.id}r"'`
-##### `tomcat_accesslog_enable_xforwarded_for`
+##### `tomcat_accesslog_enable_xforwarded_for`
Data type: `Boolean`
@@ -940,9 +947,9 @@ If a proxy operates before JIRA, the access logs will only contain the IP addres
instead of the address of the user. With `X-Forwarded-For` the proxy can forward the users IP
address to the JIRA application server so that it can be logged correctly.
-Default value: ``false``
+Default value: `false`
-##### `tomcat_max_threads`
+##### `tomcat_max_threads`
Data type: `Integer`
@@ -950,7 +957,7 @@ Tomcat connector setting
Default value: `150`
-##### `tomcat_accept_count`
+##### `tomcat_accept_count`
Data type: `Integer`
@@ -958,7 +965,7 @@ Tomcat connector setting
Default value: `100`
-##### `proxy`
+##### `proxy`
Data type: `Hash`
@@ -967,7 +974,7 @@ The confusing naming is retained for backwards compatibility
Default value: `{}`
-##### `ajp`
+##### `ajp`
Data type: `Hash`
@@ -975,15 +982,15 @@ Properties for an AJP connector
Default value: `{}`
-##### `tomcat_default_connector`
+##### `tomcat_default_connector`
Data type: `Boolean`
If set to false, the default connector will be omitted
-Default value: ``true``
+Default value: `true`
-##### `tomcat_additional_connectors`
+##### `tomcat_additional_connectors`
Data type: `Jira::Tomcat_connectors`
@@ -1004,15 +1011,15 @@ https://confluence.atlassian.com/kb/how-to-bypass-a-reverse-proxy-or-ssl-in-appl
Default value: `{}`
-##### `contextpath`
+##### `contextpath`
-Data type: `String`
+Data type: `Optional[String[1]]`
Tomcat context path for the web service
-Default value: `''`
+Default value: `undef`
-##### `resources`
+##### `resources`
Data type: `Hash`
@@ -1020,15 +1027,15 @@ undocumented
Default value: `{}`
-##### `enable_sso`
+##### `enable_sso`
Data type: `Boolean`
Enable single sign-on via Crowd
-Default value: ``false``
+Default value: `false`
-##### `application_name`
+##### `application_name`
Data type: `String`
@@ -1036,7 +1043,7 @@ Crowd application name
Default value: `'crowd'`
-##### `application_password`
+##### `application_password`
Data type: `String`
@@ -1044,7 +1051,7 @@ Crowd application password
Default value: `'1234'`
-##### `application_login_url`
+##### `application_login_url`
Data type: `Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]`
@@ -1052,7 +1059,7 @@ Crowd application login URL
Default value: `'https://crowd.example.com/console/'`
-##### `crowd_server_url`
+##### `crowd_server_url`
Data type: `Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]`
@@ -1060,7 +1067,7 @@ Crowd server URL
Default value: `'https://crowd.example.com/services/'`
-##### `crowd_base_url`
+##### `crowd_base_url`
Data type: `Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]`
@@ -1068,7 +1075,7 @@ Crowd base URL
Default value: `'https://crowd.example.com/'`
-##### `session_isauthenticated`
+##### `session_isauthenticated`
Data type: `String`
@@ -1076,7 +1083,7 @@ undocumented SSO parameter
Default value: `'session.isauthenticated'`
-##### `session_tokenkey`
+##### `session_tokenkey`
Data type: `String`
@@ -1084,7 +1091,7 @@ undocumented SSO parameter
Default value: `'session.tokenkey'`
-##### `session_validationinterval`
+##### `session_validationinterval`
Data type: `Integer`
@@ -1092,7 +1099,7 @@ undocumented SSO parameter
Default value: `5`
-##### `session_lastvalidation`
+##### `session_lastvalidation`
Data type: `String`
@@ -1100,61 +1107,62 @@ undocumented SSO parameter
Default value: `'session.lastvalidation'`
-##### `jvm_permgen`
+##### `plugins`
+
+Data type: `Array[Hash]`
+
+an array of hashes defining custom plugins to install
+a single plugin configuration will has the following form
+ installation_name: this name wil be used to install the plugin within jira
+ source: url of plugin to be fetched
+ username: the username for authentification, if necessary
+ password: the password for authentification, if necessary
+ checksum: the checksum of the plugin, to determine the need for an upgrade
+ checksumtype: the type of checksum used (none|md5|sha1|sha2|sha256|sha384|sha512). (default: none)
+
+Default value: `[]`
+
+##### `jvm_permgen`
Data type: `Optional[String]`
Deprecated. Exists to notify users that they're trying to configure a parameter that has no effect
-Default value: ``undef``
+Default value: `undef`
-##### `poolsize`
+##### `poolsize`
Data type: `Optional[Integer[0]]`
Deprecated alias for `$pool_max_size`.
-Default value: ``undef``
+Default value: `undef`
-##### `enable_connection_pooling`
+##### `enable_connection_pooling`
Data type: `Optional[Boolean]`
Deprecated. Has no effect.
-Default value: ``undef``
-
-## Functions
+Default value: `undef`
## Data types
-### `Jira::Jvm_types`
+### `Jira::Jvm_types`
Java Virtual Machine (JVM) types
-Alias of
+Alias of `Enum['openjdk-11', 'oracle-jdk-1.8']`
-```puppet
-Enum['openjdk-11', 'oracle-jdk-1.8']
-```
-
-### `Jira::Tomcat_attributes`
+### `Jira::Tomcat_attributes`
A hash of string keys to arbitrary values that will be rendered as XML attributes
-Alias of
-
-```puppet
-Hash[String[1], Scalar]
-```
+Alias of `Hash[String[1], Scalar]`
-### `Jira::Tomcat_connectors`
+### `Jira::Tomcat_connectors`
A set of attribute hashes keyed by connector port number
-Alias of
-
-```puppet
-Hash[Stdlib::Port::Unprivileged, Jira::Tomcat_attributes]
-```
+Alias of `Hash[Stdlib::Port::Unprivileged, Jira::Tomcat_attributes]`
diff --git a/Rakefile b/Rakefile
index 80b799d6..7109e7f8 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,7 +1,7 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
-# Attempt to load voxupuli-test (which pulls in puppetlabs_spec_helper),
+# Attempt to load voxpupuli-test (which pulls in puppetlabs_spec_helper),
# otherwise attempt to load it directly.
begin
require 'voxpupuli/test/rake'
@@ -24,6 +24,10 @@ end
begin
require 'voxpupuli/release/rake_tasks'
rescue LoadError
+ # voxpupuli-release not present
+else
+ GCGConfig.user = 'voxpupuli'
+ GCGConfig.project = 'puppet-jira'
end
desc "Run main 'test' task and report merged results to coveralls"
@@ -37,36 +41,4 @@ task test_with_coveralls: [:test] do
end
end
-desc 'Generate REFERENCE.md'
-task :reference, [:debug, :backtrace] do |t, args|
- patterns = ''
- Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace])
-end
-
-begin
- require 'github_changelog_generator/task'
- require 'puppet_blacksmith'
- GitHubChangelogGenerator::RakeTask.new :changelog do |config|
- metadata = Blacksmith::Modulefile.new
- config.future_release = "v#{metadata.version}" if metadata.version =~ /^\d+\.\d+.\d+$/
- config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module."
- config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
- config.user = 'voxpupuli'
- config.project = metadata.metadata['name']
- end
-
- # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
- require 'rbconfig'
- if RbConfig::CONFIG['host_os'] =~ /linux/
- task :changelog do
- puts 'Fixing line endings...'
- changelog_file = File.join(__dir__, 'CHANGELOG.md')
- changelog_txt = File.read(changelog_file)
- new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
- File.open(changelog_file, "w") {|file| file.puts new_contents }
- end
- end
-
-rescue LoadError
-end
# vim: syntax=ruby
diff --git a/manifests/init.pp b/manifests/init.pp
index 20e84025..0761a0c6 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -144,8 +144,6 @@
# Configures JVM_EXTRA_ARGS in setenv.sh
# @param jvm_nofiles_limit
# Set the limit for open files
-# @param catalina_opts
-# Does nothing :-)
# @param download_url
# Base URL for downloading Atlassian software
# @param checksum
@@ -353,7 +351,6 @@
Optional[String] $jvm_code_cache_args = undef,
Optional[String] $jvm_extra_args = undef,
Integer $jvm_nofiles_limit = 16384,
- String $catalina_opts = '',
# Misc Settings
Stdlib::HTTPUrl $download_url = 'https://product-downloads.atlassian.com/software/jira/downloads',
Optional[String] $checksum = undef,
@@ -407,7 +404,7 @@
# Additional connectors in server.xml
Jira::Tomcat_connectors $tomcat_additional_connectors = {},
# Context path (usualy used in combination with a reverse proxy)
- String $contextpath = '',
+ Optional[String[1]] $contextpath = undef,
# Resources for context.xml
Hash $resources = {},
# Enable SingleSignOn via Crowd
@@ -514,10 +511,10 @@
}
$_password = !empty($plugin_data['password']) ? {
default => {},
- true => { password => $plugin_data['password'] }
+ true => { password => $plugin_data['password'] },
}
$_plugin_archive = {
- $target => $_target_defaults + $_username + $_password
+ $target => $_target_defaults + $_username + $_password,
}
create_resources(archive, $_plugin_archive)
}
diff --git a/metadata.json b/metadata.json
index 7f7e60f2..a1ae0c2e 100644
--- a/metadata.json
+++ b/metadata.json
@@ -14,15 +14,15 @@
"dependencies": [
{
"name": "puppet/systemd",
- "version_requirement": ">= 3.0.0 < 4.0.0"
+ "version_requirement": ">= 3.0.0 < 7.0.0"
},
{
"name": "puppetlabs/stdlib",
- "version_requirement": ">= 4.25.0 < 9.0.0"
+ "version_requirement": ">= 4.25.0 < 10.0.0"
},
{
"name": "puppet/archive",
- "version_requirement": ">= 1.0.0 < 7.0.0"
+ "version_requirement": ">= 1.0.0 < 8.0.0"
}
],
"requirements": [
diff --git a/spec/acceptance/default_parameters_spec.rb b/spec/acceptance/default_parameters_spec.rb
index a7d02f98..e46486a8 100644
--- a/spec/acceptance/default_parameters_spec.rb
+++ b/spec/acceptance/default_parameters_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper_acceptance'
describe 'jira postgresql' do
@@ -13,17 +15,27 @@
'Debian' => '/usr/lib/jvm/java-1.11.0-openjdk-amd64',
}
- class { 'postgresql::server': }
+ # The output of `systemctl status postgresql` is non ascii which
+ # breaks the Exec in Postgresql::Server::Instance::Reload
+ # on rhel based docker containers
+ # We don't need the output.
+ class { 'postgresql::server':
+ service_status => 'systemctl status postgresql > /dev/null'
+ }
postgresql::server::db { 'jira':
user => 'jiraadm',
password => postgresql::postgresql_password('jiraadm', 'mypassword'),
}
+ # There is a bug in the check-java.sh that prevents jira from starting on Centos Stream 8
+ # https://jira.atlassian.com/browse/JRASERVER-77097
+ # Running with script_check_java_manage => true to solve this
class { 'jira':
- java_package => $java_package,
- javahome => $java_home,
- require => Postgresql::Server::Db['jira'],
+ java_package => $java_package,
+ javahome => $java_home,
+ script_check_java_manage => true,
+ require => Postgresql::Server::Db['jira'],
}
EOS
pp_upgrade = <<-EOS
@@ -38,27 +50,30 @@ class { 'jira':
}
class { 'jira':
- version => '8.16.0',
- java_package => $java_package,
- javahome => $java_home,
+ version => '8.16.0',
+ java_package => $java_package,
+ javahome => $java_home,
+ script_check_java_manage => true,
}
EOS
# jira just takes *ages* to start up :-(
- WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080'.freeze
+ wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 localhost:8080'
apply_manifest(pp, catch_failures: true)
- sleep 60
- shell WGET_CMD, acceptable_exit_codes: [0, 8]
- sleep 60
- shell WGET_CMD, acceptable_exit_codes: [0, 8]
- sleep 60
- apply_manifest(pp_upgrade, catch_failures: true)
- sleep 60
- shell WGET_CMD, acceptable_exit_codes: [0, 8]
- sleep 60
- shell WGET_CMD, acceptable_exit_codes: [0, 8]
- sleep 60
+ sleep SLEEP_SECONDS
+ shell wget_cmd, acceptable_exit_codes: [0, 8]
+ sleep SLEEP_SECONDS
+ shell wget_cmd, acceptable_exit_codes: [0, 8]
+
+ apply_manifest(pp, catch_changes: true)
+
apply_manifest(pp_upgrade, catch_failures: true)
+ sleep SLEEP_SECONDS
+ shell wget_cmd, acceptable_exit_codes: [0, 8]
+ sleep SLEEP_SECONDS
+ shell wget_cmd, acceptable_exit_codes: [0, 8]
+
+ apply_manifest(pp_upgrade, catch_changes: true)
end
describe process('java') do
@@ -74,15 +89,8 @@ class { 'jira':
it { is_expected.to be_running }
end
- describe user('jira') do
- it { is_expected.to exist }
- end
-
describe user('jira') do
it { is_expected.to belong_to_group 'jira' }
- end
-
- describe user('jira') do
it { is_expected.to have_login_shell '/bin/true' }
end
diff --git a/spec/acceptance/mysql_spec.rb b/spec/acceptance/mysql_spec.rb
index 88859118..8bfb3777 100644
--- a/spec/acceptance/mysql_spec.rb
+++ b/spec/acceptance/mysql_spec.rb
@@ -1,10 +1,31 @@
+# frozen_string_literal: true
+
require 'spec_helper_acceptance'
describe 'jira mysql' do
it 'installs with defaults' do
pp = <<-EOS
+ # On ubuntu 20.04 and 22.04 the default is to install mariadb
+ # As the ubuntu 20.04 runner we use in github actions allready has mysql installed
+ # a apparmor error is triggerd when using mariadb in this test..
+ # Forcing the use of mysql
+ if $facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '20.04') >= 0 {
+ $mysql_service_name = 'mysql'
+ $mysql_server_package = 'mysql-server'
+ $mysql_client_package = 'mysql-client'
+ } else {
+ $mysql_service_name = undef
+ $mysql_server_package = undef
+ $mysql_client_package = undef
+ }
+
class { 'mysql::server':
root_password => 'strongpassword',
+ package_name => $mysql_server_package,
+ service_name => $mysql_service_name,
+ }
+ class { 'mysql::client':
+ package_name => $mysql_client_package,
}
# Default MySQL is too old for utf8mb4 on CentOS 7, or something. Also Ubuntu 20.04
@@ -44,29 +65,33 @@ class { 'java':
require => Exec['tmpkey'],
}
+ # There is a bug in the check-java.sh that prevents jira from starting on Centos Stream 8
+ # https://jira.atlassian.com/browse/JRASERVER-77097
+ # Running with script_check_java_manage => true to solve this
class { 'jira':
- installdir => '/opt/atlassian-jira',
- homedir => '/opt/jira-home',
- javahome => '/usr',
- jvm_type => 'oracle-jdk-1.8',
- db => 'mysql',
- dbport => 3306,
- dbdriver => 'com.mysql.jdbc.Driver',
- dbtype => 'mysql',
- tomcat_port => 8081,
- tomcat_native_ssl => true,
- tomcat_keystore_file => '/tmp/jira.ks',
- require => [Mysql::Db['jira'], Java_ks['jira']],
+ installdir => '/opt/atlassian-jira',
+ homedir => '/opt/jira-home',
+ javahome => '/usr',
+ jvm_type => 'oracle-jdk-1.8',
+ db => 'mysql',
+ dbport => 3306,
+ dbdriver => 'com.mysql.jdbc.Driver',
+ dbtype => 'mysql',
+ tomcat_port => 8081,
+ tomcat_native_ssl => true,
+ tomcat_keystore_file => '/tmp/jira.ks',
+ script_check_java_manage => true,
+ require => [Mysql::Db['jira'], Java_ks['jira']],
}
EOS
- WGET_CMD = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081'.freeze
+ wget_cmd = 'wget -q --tries=24 --retry-connrefused --read-timeout=10 --no-check-certificate localhost:8081'
apply_manifest(pp, catch_failures: true)
- sleep 60
- shell WGET_CMD, acceptable_exit_codes: [0, 8]
- sleep 60
- shell WGET_CMD, acceptable_exit_codes: [0, 8]
- sleep 60
+ sleep SLEEP_SECONDS
+ shell wget_cmd, acceptable_exit_codes: [0, 8]
+ sleep SLEEP_SECONDS
+ shell wget_cmd, acceptable_exit_codes: [0, 8]
+
apply_manifest(pp, catch_changes: true)
end
@@ -83,24 +108,19 @@ class { 'jira':
it { is_expected.to be_running }
end
- describe user('jira') do
- it { is_expected.to exist }
- end
-
describe user('jira') do
it { is_expected.to belong_to_group 'jira' }
- end
-
- describe user('jira') do
it { is_expected.to have_login_shell '/bin/true' }
end
- describe command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- localhost:8081') do
- its(:stdout) { is_expected.to include('8.13.5') }
+ specify do
+ expect(command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- localhost:8081')).
+ to have_attributes(stdout: %r{8.13.5})
end
- describe command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- https://localhost:8443') do
- its(:stdout) { is_expected.to include('8.13.5') }
+ specify do
+ expect(command('wget -q --tries=24 --retry-connrefused --no-check-certificate --read-timeout=10 -O- https://localhost:8443')).
+ to have_attributes(stdout: %r{8.13.5})
end
describe 'shutdown' do
diff --git a/spec/classes/jira_config_spec.rb b/spec/classes/jira_config_spec.rb
index 3f909485..a1311dc1 100644
--- a/spec/classes/jira_config_spec.rb
+++ b/spec/classes/jira_config_spec.rb
@@ -1,11 +1,13 @@
-require 'spec_helper.rb'
+# frozen_string_literal: true
+
+require 'spec_helper'
# set some constants to keep it DRY
-REGEXP_DISABLE_NOTIFICATIONS = %r{#DISABLE_NOTIFICATIONS=}
-REGEXP_POSTGRESQL_URL = %r{jdbc:postgresql://localhost:5432/jira}
-REGEXP_PUBLIC_SCHEMA = %r{public}
-HTTP11 = 'HTTP/1.1'.freeze
-PLUGIN_SOURCE_URL = 'https://www.example.com/fine-jira-plugin.tgz'.freeze
+REGEXP_DISABLE_NOTIFICATIONS = %r{#DISABLE_NOTIFICATIONS=}.freeze
+REGEXP_POSTGRESQL_URL = %r{jdbc:postgresql://localhost:5432/jira}.freeze
+REGEXP_PUBLIC_SCHEMA = %r{public}.freeze
+HTTP11 = 'HTTP/1.1'
+PLUGIN_SOURCE_URL = 'https://www.example.com/fine-jira-plugin.tgz'
describe 'jira' do
describe 'jira::config' do
let(:params) do
@@ -24,13 +26,17 @@
context 'default params' do
it { is_expected.to compile.with_all_deps }
+
it do
is_expected.to contain_file(FILENAME_SETENV_SH).
with_content(REGEXP_DISABLE_NOTIFICATIONS)
end
+
it { is_expected.to contain_file(FILENAME_USER_SH) }
it { is_expected.to contain_file(FILENAME_SERVER_XML) }
+
# Also ensure that we actually omit elements by default
+
it do
is_expected.to contain_file(FILENAME_DBCONFIG_XML).
with_content(REGEXP_POSTGRESQL_URL).
@@ -48,6 +54,7 @@
with_content(%r{select version\(\);}).
with_content(%r{tcpKeepAlive=true;socketTimeout=240})
end
+
it { is_expected.not_to contain_file(FILENAME_CLUSTER_PROPS) }
it { is_expected.not_to contain_file(FILENAME_CHECK_JAVA_SH) }
end
@@ -75,6 +82,7 @@
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_package('java-11-openjdk-headless') }
+
it do
is_expected.to contain_file(FILENAME_DBCONFIG_XML).
with_content(%r{select 1}).
@@ -96,6 +104,7 @@
it { is_expected.to contain_file(FILENAME_SETENV_SH) }
it { is_expected.to contain_file(FILENAME_USER_SH) }
it { is_expected.to contain_file(FILENAME_SERVER_XML) }
+
it do
is_expected.to contain_file(FILENAME_DBCONFIG_XML).
with_content(%r{TEST-SETTING;}).
@@ -115,6 +124,7 @@
it { is_expected.to contain_file(FILENAME_SETENV_SH) }
it { is_expected.to contain_file(FILENAME_USER_SH) }
it { is_expected.to contain_file(FILENAME_SERVER_XML) }
+
it do
is_expected.to contain_file(FILENAME_DBCONFIG_XML).
with_content(%r{jdbc:mysql://localhost:3306/jira})
@@ -273,6 +283,7 @@
it { is_expected.to contain_file(FILENAME_SETENV_SH) }
it { is_expected.to contain_file(FILENAME_USER_SH) }
it { is_expected.to contain_file(FILENAME_SERVER_XML) }
+
it do
is_expected.to contain_file(FILENAME_DBCONFIG_XML).
with_content(REGEXP_PUBLIC_SCHEMA)
@@ -301,7 +312,7 @@
it do
is_expected.to contain_file(FILENAME_SERVER_XML).
- with_content(%r{ 'https',
+ 'scheme' => 'https',
'proxyName' => 'www.example.com',
'proxyPort' => '9999'
}
@@ -539,7 +537,7 @@
let(:params) do
super().merge(
proxy: {
- 'scheme' => 'https',
+ 'scheme' => 'https',
'proxyName' => 'www.example.com',
'proxyPort' => '9999'
},
@@ -561,7 +559,7 @@
let(:params) do
super().merge(
ajp: {
- 'port' => '8009',
+ 'port' => '8009',
'protocol' => 'AJP/1.3'
}
)
@@ -572,11 +570,12 @@
with_content(%r{})
end
end
+
context 'with valid config including protocol org.apache.coyote.ajp.AjpNioProtocol' do
let(:params) do
super().merge(
ajp: {
- 'port' => '8009',
+ 'port' => '8009',
'protocol' => 'org.apache.coyote.ajp.AjpNioProtocol'
}
)
@@ -837,21 +836,25 @@
end
it { is_expected.to compile.with_all_deps }
+
it do
is_expected.to contain_file(FILENAME_SETENV_SH).
with_content(REGEXP_DISABLE_NOTIFICATIONS).
with_content(%r{JVM_SUPPORT_RECOMMENDED_ARGS=''}).
- with_content(%r{JVM_GC_ARGS='.+ \-XX:\+ExplicitGCInvokesConcurrent}).
+ with_content(%r{JVM_GC_ARGS='.+ -XX:\+ExplicitGCInvokesConcurrent}).
with_content(%r{JVM_CODE_CACHE_ARGS='\S+InitialCodeCacheSize=32m \S+ReservedCodeCacheSize=512m}).
with_content(%r{JVM_REQUIRED_ARGS='.+InterningDocumentFactory})
end
+
it { is_expected.to contain_file(FILENAME_USER_SH) }
it { is_expected.to contain_file(FILENAME_SERVER_XML) }
+
it do
is_expected.to contain_file(FILENAME_DBCONFIG_XML).
with_content(REGEXP_POSTGRESQL_URL).
with_content(REGEXP_PUBLIC_SCHEMA)
end
+
it { is_expected.not_to contain_file(FILENAME_CLUSTER_PROPS) }
it { is_expected.not_to contain_file(FILENAME_CHECK_JAVA_SH) }
end
@@ -867,6 +870,7 @@
end
it { is_expected.to compile.with_all_deps }
+
it do
is_expected.to contain_file(FILENAME_SETENV_SH).
with_content(REGEXP_DISABLE_NOTIFICATIONS).
@@ -875,13 +879,16 @@
with_content(%r{JVM_CODE_CACHE_ARGS=\S+TEST_CODECACHE}).
with_content(%r{JVM_EXTRA_ARGS=\S+TEST_EXTRA})
end
+
it { is_expected.to contain_file(FILENAME_USER_SH) }
it { is_expected.to contain_file(FILENAME_SERVER_XML) }
+
it do
is_expected.to contain_file(FILENAME_DBCONFIG_XML).
with_content(REGEXP_POSTGRESQL_URL).
with_content(REGEXP_PUBLIC_SCHEMA)
end
+
it { is_expected.not_to contain_file(FILENAME_CLUSTER_PROPS) }
it { is_expected.not_to contain_file(FILENAME_CHECK_JAVA_SH) }
end
diff --git a/spec/classes/jira_init_spec.rb b/spec/classes/jira_init_spec.rb
index 7abae5b2..6a7599de 100644
--- a/spec/classes/jira_init_spec.rb
+++ b/spec/classes/jira_init_spec.rb
@@ -1,4 +1,6 @@
-require 'spec_helper.rb'
+# frozen_string_literal: true
+
+require 'spec_helper'
describe 'jira' do
describe 'jira::init' do
diff --git a/spec/classes/jira_install_spec.rb b/spec/classes/jira_install_spec.rb
index 2438bddd..aa6cb488 100644
--- a/spec/classes/jira_install_spec.rb
+++ b/spec/classes/jira_install_spec.rb
@@ -1,7 +1,9 @@
-require 'spec_helper.rb'
+# frozen_string_literal: true
+
+require 'spec_helper'
# set some constants to keep it DRY
-DOWNLOAD_URL = 'https://product-downloads.atlassian.com/software/jira/downloads'.freeze
+DOWNLOAD_URL = 'https://product-downloads.atlassian.com/software/jira/downloads'
describe 'jira' do
describe 'jira::install' do
@@ -24,9 +26,9 @@
context 'default params' do
let(:params) do
super().merge(
- user: 'jira',
- group: 'jira',
- homedir: '/home/jira',
+ user: 'jira',
+ group: 'jira',
+ homedir: '/home/jira',
download_url: DOWNLOAD_URL
)
end
@@ -34,13 +36,14 @@
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_group('jira') }
it { is_expected.to contain_user('jira').with_shell('/bin/true') }
+
it "deploys jira #{DEFAULT_VERSION} from tar.gz" do
is_expected.to contain_archive("/tmp/#{PRODUCT_VERSION_STRING}.tar.gz").
- with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone",
- 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz",
- 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf",
- 'user' => 'jira',
- 'group' => 'jira',
+ with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone",
+ 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz",
+ 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf",
+ 'user' => 'jira',
+ 'group' => 'jira',
'checksum_type' => 'md5')
end
@@ -61,11 +64,11 @@
it "deploys jira #{DEFAULT_VERSION} from tar.gz" do
is_expected.to contain_archive("/tmp/#{PRODUCT_VERSION_STRING}.tar.gz").
- with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone",
- 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz",
- 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf",
- 'user' => 'jira',
- 'group' => 'jira',
+ with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone",
+ 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz",
+ 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf",
+ 'user' => 'jira',
+ 'group' => 'jira',
'checksum_type' => 'md5')
end
end
@@ -73,18 +76,18 @@
context 'core product' do
let(:params) do
super().merge(
- product: 'jira-core',
+ product: 'jira-core',
download_url: DOWNLOAD_URL
)
end
it "deploys jira #{DEFAULT_VERSION} from tar.gz" do
is_expected.to contain_archive("/tmp/#{PRODUCT_VERSION_STRING_CORE}.tar.gz").
- with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING_CORE}-standalone",
- 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING_CORE}.tar.gz",
- 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING_CORE}-standalone/conf",
- 'user' => 'jira',
- 'group' => 'jira',
+ with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING_CORE}-standalone",
+ 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING_CORE}.tar.gz",
+ 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING_CORE}-standalone/conf",
+ 'user' => 'jira',
+ 'group' => 'jira',
'checksum_type' => 'md5')
end
end
@@ -97,11 +100,11 @@
)
end
let(:pre_condition) do
- <<-PRE
-user {'jira':
- comment => 'My Personal Managed Account',
-}
-group {'jira':}
+ <<~PRE
+ user {'jira':
+ comment => 'My Personal Managed Account',
+ }
+ group {'jira':}
PRE
end
@@ -112,38 +115,39 @@
context 'overwriting params' do
let(:params) do
super().merge(
- homedir: '/random/homedir',
- user: 'foo',
- group: 'bar',
- uid: 333,
- gid: 444,
- shell: '/bin/bash',
+ homedir: '/random/homedir',
+ user: 'foo',
+ group: 'bar',
+ uid: 333,
+ gid: 444,
+ shell: '/bin/bash',
download_url: DOWNLOAD_URL
)
end
it do
- is_expected.to contain_user('foo').with('home' => '/random/homedir',
+ is_expected.to contain_user('foo').with('home' => '/random/homedir',
'shell' => '/bin/bash',
- 'uid' => 333,
- 'gid' => 444)
+ 'uid' => 333,
+ 'gid' => 444)
end
+
it { is_expected.to contain_group('bar') }
it "deploys jira #{DEFAULT_VERSION} from tar.gz" do
is_expected.to contain_archive("/tmp/#{PRODUCT_VERSION_STRING}.tar.gz").
- with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone",
- 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz",
- 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf",
- 'user' => 'foo',
- 'group' => 'bar',
+ with('extract_path' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone",
+ 'source' => "#{DOWNLOAD_URL}/#{PRODUCT_VERSION_STRING}.tar.gz",
+ 'creates' => "/opt/jira/#{PRODUCT_VERSION_STRING}-standalone/conf",
+ 'user' => 'foo',
+ 'group' => 'bar',
'checksum_type' => 'md5')
end
it 'manages the jira home directory' do
is_expected.to contain_file('/random/homedir').with('ensure' => 'directory',
- 'owner' => 'foo',
- 'group' => 'bar')
+ 'owner' => 'foo',
+ 'group' => 'bar')
end
end
end
diff --git a/spec/classes/jira_mysql_connector_spec.rb b/spec/classes/jira_mysql_connector_spec.rb
index 048439cb..3a1b3abf 100644
--- a/spec/classes/jira_mysql_connector_spec.rb
+++ b/spec/classes/jira_mysql_connector_spec.rb
@@ -1,8 +1,10 @@
-require 'spec_helper.rb'
+# frozen_string_literal: true
+
+require 'spec_helper'
# set some constants to keep it DRY
-PATH_MYSQL_CONNECTOR = '/opt/MySQL-connector'.freeze
-PATH_MYSQL_CONNECTOR_LIB = "#{PATH_INSTALLATION_BASE}/lib/mysql-connector-java.jar".freeze
+PATH_MYSQL_CONNECTOR = '/opt/MySQL-connector'
+PATH_MYSQL_CONNECTOR_LIB = "#{PATH_INSTALLATION_BASE}/lib/mysql-connector-java.jar"
describe 'jira' do
describe 'jira::mysql_connector' do
@@ -30,6 +32,7 @@
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_file(PATH_MYSQL_CONNECTOR).with_ensure('directory') }
+
it do
is_expected.to contain_file(PATH_MYSQL_CONNECTOR_LIB).
with(
@@ -37,13 +40,15 @@
'target' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-5.1.34/mysql-connector-java-5.1.34-bin.jar"
)
end
+
it 'deploys mysql connector 5.1.34 from tar.gz' do
is_expected.to contain_archive("#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-5.1.34.tar.gz").
- with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.34.tar.gz',
+ with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.34.tar.gz',
'extract_path' => PATH_MYSQL_CONNECTOR,
- 'creates' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-5.1.34")
+ 'creates' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-5.1.34")
end
end
+
context 'mysql connector defaults Connector Version >8' do
let(:params) do
super().merge(
@@ -53,6 +58,7 @@
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_file(PATH_MYSQL_CONNECTOR).with_ensure('directory') }
+
it do
is_expected.to contain_file(PATH_MYSQL_CONNECTOR_LIB).
with(
@@ -60,13 +66,15 @@
'target' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-8.0.23/mysql-connector-java-8.0.23.jar"
)
end
+
it 'deploys mysql connector 8.0.23 from tar.gz' do
is_expected.to contain_archive('/opt/MySQL-connector/mysql-connector-java-8.0.23.tar.gz').
- with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.23.tar.gz',
+ with('source' => 'https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.23.tar.gz',
'extract_path' => PATH_MYSQL_CONNECTOR,
- 'creates' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-8.0.23")
+ 'creates' => "#{PATH_MYSQL_CONNECTOR}/mysql-connector-java-8.0.23")
end
end
+
context 'mysql connector overwrite params' do
let(:params) do
super().merge(
@@ -78,6 +86,7 @@
end
it { is_expected.to contain_file('/opt/foo').with_ensure('directory') }
+
it do
is_expected.to contain_file(PATH_MYSQL_CONNECTOR_LIB).
with(
@@ -85,13 +94,15 @@
'target' => '/opt/foo/mysql-connector-java-5.1.15/mysql-connector-java-5.1.15-bin.jar'
)
end
+
it 'deploys mysql connector 5.1.15 from zip' do
is_expected.to contain_archive('/opt/foo/mysql-connector-java-5.1.15.zip').
- with('source' => 'http://example.co.za/foo/mysql-connector-java-5.1.15.zip',
+ with('source' => 'http://example.co.za/foo/mysql-connector-java-5.1.15.zip',
'extract_path' => '/opt/foo',
- 'creates' => '/opt/foo/mysql-connector-java-5.1.15')
+ 'creates' => '/opt/foo/mysql-connector-java-5.1.15')
end
end
+
context 'mysql_connector_mangage equals false' do
let(:params) do
super().merge(
diff --git a/spec/classes/jira_service_spec.rb b/spec/classes/jira_service_spec.rb
index 2507e02e..542a2e5c 100644
--- a/spec/classes/jira_service_spec.rb
+++ b/spec/classes/jira_service_spec.rb
@@ -1,4 +1,6 @@
-require 'spec_helper.rb'
+# frozen_string_literal: true
+
+require 'spec_helper'
describe 'jira' do
describe 'jira::service' do
@@ -22,6 +24,7 @@
is_expected.to contain_file('/etc/systemd/system/jira.service').
with_content(%r{Atlassian Systemd Jira Service})
end
+
it { is_expected.to contain_service('jira') }
end
@@ -32,6 +35,7 @@
it { is_expected.not_to contain_service('jira') }
end
+
context 'with service_ensure set to stopped' do
let(:params) do
super().merge(
diff --git a/spec/classes/jira_sso_spec.rb b/spec/classes/jira_sso_spec.rb
index 8c6c1b8e..9f1eaaff 100644
--- a/spec/classes/jira_sso_spec.rb
+++ b/spec/classes/jira_sso_spec.rb
@@ -1,7 +1,9 @@
-require 'spec_helper.rb'
+# frozen_string_literal: true
+
+require 'spec_helper'
# set some constants to keep it DRY
-PATH_CROWD_PROPS = "#{PATH_INSTALLATION_BASE}/atlassian-jira/WEB-INF/classes/crowd.properties".freeze
+PATH_CROWD_PROPS = "#{PATH_INSTALLATION_BASE}/atlassian-jira/WEB-INF/classes/crowd.properties"
describe 'jira' do
describe 'jira::sso' do
@@ -38,6 +40,7 @@
with_content(%r{application.name appname})
end
end
+
context 'with non default params' do
let(:params) do
super().merge(
@@ -50,6 +53,7 @@
end
it { is_expected.to contain_file(PATH_CROWD_PROPS) }
+
it do
is_expected.to contain_file(PATH_CROWD_PROPS).
with_content(%r{application.name app}).
diff --git a/spec/classes/jira_upgrade_spec.rb b/spec/classes/jira_upgrade_spec.rb
index b08d7b01..d5685267 100644
--- a/spec/classes/jira_upgrade_spec.rb
+++ b/spec/classes/jira_upgrade_spec.rb
@@ -1,4 +1,6 @@
-require 'spec_helper.rb'
+# frozen_string_literal: true
+
+require 'spec_helper'
describe 'jira' do
describe 'jira::install' do
@@ -18,11 +20,13 @@
end
it { is_expected.to compile.with_all_deps }
+
it do
is_expected.to contain_exec('stop-jira-for-version-change').
with_command('systemctl stop jira.service && sleep 15')
end
end
+
context 'custom params' do
let(:params) do
{
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 57a70076..1cc84c92 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,19 +1,21 @@
+# frozen_string_literal: true
+
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
# puppetlabs_spec_helper will set up coverage if the env variable is set.
# We want to do this if lib exists and it hasn't been explicitly set.
-ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../../lib', __FILE__))
+ENV['COVERAGE'] ||= 'yes' if Dir.exist?(File.expand_path('../lib', __dir__))
require 'voxpupuli/test/spec_helper'
+add_mocked_facts!
+
if File.exist?(File.join(__dir__, 'default_module_facts.yml'))
facts = YAML.safe_load(File.read(File.join(__dir__, 'default_module_facts.yml')))
- if facts
- facts.each do |name, value|
- add_custom_fact name.to_sym, value
- end
+ facts&.each do |name, value|
+ add_custom_fact name.to_sym, value
end
end
-require 'support/acceptance/constants.rb'
+Dir['./spec/support/spec/**/*.rb'].sort.each { |f| require f }
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb
index 92d91305..6113d619 100644
--- a/spec/spec_helper_acceptance.rb
+++ b/spec/spec_helper_acceptance.rb
@@ -1,12 +1,14 @@
+# frozen_string_literal: true
+
# This file is completely managed via modulesync
require 'voxpupuli/acceptance/spec_helper_acceptance'
configure_beaker do |host|
- install_module_from_forge_on(host, 'puppetlabs-apt', '>= 4.1.0 < 9.0.0') if fact_on(host, 'os.family') == 'Debian'
- install_module_from_forge_on(host, 'puppetlabs-java', '>= 2.1.0 < 8.0.0')
- install_module_from_forge_on(host, 'puppetlabs-java_ks', '>= 1.6.0 < 4.0.0')
- install_module_from_forge_on(host, 'puppetlabs-mysql', '>= 4.0.1 < 13.0.0')
- install_module_from_forge_on(host, 'puppetlabs-postgresql', '>= 5.1.0 < 8.0.0')
+ install_puppet_module_via_pmt_on(host, 'puppetlabs-apt') if fact_on(host, 'os.family') == 'Debian'
+ install_puppet_module_via_pmt_on(host, 'puppetlabs-java')
+ install_puppet_module_via_pmt_on(host, 'puppetlabs-java_ks')
+ install_puppet_module_via_pmt_on(host, 'puppetlabs-mysql')
+ install_puppet_module_via_pmt_on(host, 'puppetlabs-postgresql')
end
Dir['./spec/support/acceptance/**/*.rb'].sort.each { |f| require f }
diff --git a/spec/support/acceptance/constants.rb b/spec/support/acceptance/constants.rb
index aeb8f814..c10eb90b 100644
--- a/spec/support/acceptance/constants.rb
+++ b/spec/support/acceptance/constants.rb
@@ -1,16 +1,4 @@
-# set some constants to keep it DRY
-DEFAULT_VERSION = '8.13.5'.freeze
-PRODUCT_VERSION_STRING = "atlassian-jira-software-#{DEFAULT_VERSION}".freeze
-PRODUCT_VERSION_STRING_CORE = "atlassian-jira-core-#{DEFAULT_VERSION}".freeze
-
-PATH_JAVA_HOME = '/opt/java'.freeze
-PATH_JIRA_DIR = '/opt/jira'.freeze
-PATH_INSTALLATION_BASE = "#{PATH_JIRA_DIR}/#{PRODUCT_VERSION_STRING}-standalone".freeze
+# frozen_string_literal: true
-FILENAME_SETENV_SH = "#{PATH_INSTALLATION_BASE}/bin/setenv.sh".freeze
-FILENAME_USER_SH = "#{PATH_INSTALLATION_BASE}/bin/user.sh".freeze
-FILENAME_CHECK_JAVA_SH = "#{PATH_INSTALLATION_BASE}/bin/check-java.sh".freeze
-FILENAME_SERVER_XML = "#{PATH_INSTALLATION_BASE}/conf/server.xml".freeze
-FILENAME_DBCONFIG_XML = '/home/jira/dbconfig.xml'.freeze
-FILENAME_CLUSTER_PROPS = '/home/jira/cluster.properties'.freeze
-FILENAME_JIRA_CONFIG_PROPS = '/home/jira/jira-config.properties'.freeze
+# set some constants to keep it DRY
+SLEEP_SECONDS = 120
diff --git a/spec/support/spec/constants.rb b/spec/support/spec/constants.rb
new file mode 100644
index 00000000..880f217a
--- /dev/null
+++ b/spec/support/spec/constants.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+# set some constants to keep it DRY
+DEFAULT_VERSION = '8.13.5'
+PRODUCT_VERSION_STRING = "atlassian-jira-software-#{DEFAULT_VERSION}"
+PRODUCT_VERSION_STRING_CORE = "atlassian-jira-core-#{DEFAULT_VERSION}"
+
+PATH_JAVA_HOME = '/opt/java'
+PATH_JIRA_DIR = '/opt/jira'
+PATH_INSTALLATION_BASE = "#{PATH_JIRA_DIR}/#{PRODUCT_VERSION_STRING}-standalone"
+
+FILENAME_SETENV_SH = "#{PATH_INSTALLATION_BASE}/bin/setenv.sh"
+FILENAME_USER_SH = "#{PATH_INSTALLATION_BASE}/bin/user.sh"
+FILENAME_CHECK_JAVA_SH = "#{PATH_INSTALLATION_BASE}/bin/check-java.sh"
+FILENAME_SERVER_XML = "#{PATH_INSTALLATION_BASE}/conf/server.xml"
+FILENAME_DBCONFIG_XML = '/home/jira/dbconfig.xml'
+FILENAME_CLUSTER_PROPS = '/home/jira/cluster.properties'
+FILENAME_JIRA_CONFIG_PROPS = '/home/jira/jira-config.properties'
diff --git a/spec/type_aliases/jvm_types_spec.rb b/spec/type_aliases/jvm_types_spec.rb
index b10fbf79..d821ef2d 100644
--- a/spec/type_aliases/jvm_types_spec.rb
+++ b/spec/type_aliases/jvm_types_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe 'Jira::Jvm_types' do
diff --git a/spec/type_aliases/tomcat_attributes_spec.rb b/spec/type_aliases/tomcat_attributes_spec.rb
index f0968dd4..3e9c8e69 100644
--- a/spec/type_aliases/tomcat_attributes_spec.rb
+++ b/spec/type_aliases/tomcat_attributes_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe 'Jira::Tomcat_attributes' do
diff --git a/spec/type_aliases/tomcat_connectors_spec.rb b/spec/type_aliases/tomcat_connectors_spec.rb
index 18c135ca..e15c9a4c 100644
--- a/spec/type_aliases/tomcat_connectors_spec.rb
+++ b/spec/type_aliases/tomcat_connectors_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe 'Jira::Tomcat_connectors' do
diff --git a/templates/check-java.sh.erb b/templates/check-java.sh.erb
index 9af7e3e3..9153fc8d 100644
--- a/templates/check-java.sh.erb
+++ b/templates/check-java.sh.erb
@@ -4,7 +4,7 @@
# This file is nearly identical to 'check-java.sh' in the Jira 8.15.0 standalone tarball. Shebang was changed to bash
# (does not need to stay /bin/sh, since it is called by catalina.sh, which itself has /bin/bash as shebang) to allow
# bashisms. Also errors detected by shellcheck were fixed .
-
+# The file also fixes https://jira.atlassian.com/browse/JRASERVER-77097
#
# check for correct java version by parsing out put of java -version
# we expect first line to be in format 'java version "1.8.0_161"' or 'java version "10.0.1" 2018-04-17'
@@ -17,20 +17,18 @@ java_version=0
if [[ $java_raw_version = *-ea* ]]
then
- # early access format e.g 11-ea
- IFS='-' read -ra values <<< "$java_raw_version"
- java_version=${values[0]}
+ # early access format e.g 11-ea or 11.0.18-ea
+ IFS='-' read -ra java_raw_version <<< "$java_raw_version"
+fi
+if [[ $java_raw_version = 1.* ]]
+then
+ # old format e.g. 1.8.0_161
+ IFS='.' read -ra values <<< "$java_raw_version"
+ java_version=${values[1]}
else
- if [[ $java_raw_version = 1.* ]]
- then
- # old format e.g. 1.8.0_161
- IFS='.' read -ra values <<< "$java_raw_version"
- java_version=${values[1]}
- else
- # new format e.g. 10.0.1
- IFS='.' read -ra values <<< "$java_raw_version"
- java_version=${values[0]}
- fi
+ # new format e.g. 10.0.1
+ IFS='.' read -ra values <<< "$java_raw_version"
+ java_version=${values[0]}
fi
if [ "$java_version" -ne 8 ] && [ "$java_version" -ne 11 ]