Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-jira', '6.0.0'
Learn more about managing modules with a PuppetfileDocumentation
JIRA module for Puppet
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with JIRA
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
- Testing - How to test the JIRA module
- Contributors
Overview
This module allows you to install, upgrade and manage Atlassian JIRA.
Module Description
This module installs/upgrades Atlassian's Enterprise Issue Tracking and project management tool. The JIRA module also manages the JIRA configuration files with Puppet.
Setup
JIRA Prerequisites
-
JIRA requires a Java Developers Kit (JDK) or Java Run-time Environment (JRE) platform to be installed on your server's operating system. Oracle JDK / JRE (formerly Sun JDK / JRE) versions 8 (and 11 since JIRA 8.2) are currently supported by Atlassian. OpenJDK version 8 (and 11 since JIRA 8.2) are supported as well - Atlassian recommends to use AdoptOpenJDK to get better support
-
JIRA requires a relational database to store its issue data. This module currently supports PostgreSQL and MySQL and Oracle and Microsoft SQL Server. We suggest using puppetlabs-postgresql/puppetlabs-mysql modules to configure/manage the database. The module uses PostgreSQL as a default.
-
Whilst not required, for production use we recommend using nginx/apache as a reverse proxy to JIRA. We suggest using the puppet/nginx puppet module.
-
On RHEL 8 and variants, you may experience SELinux denials if you use a custom installation directory that is not under
/opt
. To fix this, add an fcontext equivalence between/opt
and your desired directory:semanage fcontext -a /apps/jira -e /opt
and runrestorecon
.
What JIRA affects
If installing to an existing JIRA instance, it is your responsibility to backup your database. We also recommend that you backup your JIRA home directory and that you align your current JIRA version with the version you intend to use with puppet JIRA module.
You must have your database setup with the account user that JIRA will use. This can be done using the puppetlabs-postgresql and puppetlabs-mysql modules.
When using this module to upgrade JIRA, please make sure you have a database/JIRA home backup.
When using MySQL, We call the jira::mysql_connector
class to install the MySQL java
connector directory from mysql.com as per Atlassian's documented recommendations.
Beginning with JIRA
This puppet module will automatically download the JIRA archive from Atlassian and
extracts it into /opt/jira/atlassian-jira-$version. The default JIRA home is
/home/jira
, though you are encouraged to change this.
If you would prefer to use Hiera then see jira.yaml file for an example.
Basic example
# Java 11 is managed externally and installed in /opt/java
class { 'jira':
javahome => '/opt/java',
}
The module can install a package for you using your OS's package manager. Note that there's no smarts here. You need to set javahome correctly.
# this example works on RHEL
class { 'jira':
java_package => 'java-11-openjdk-headless'
javahome => '/usr/lib/jvm/jre-11-opendjk/',
}
Upgrades
Upgrades to JIRA
Jira can be upgraded by incrementing this version number. This will STOP the running instance of Jira and attempt to upgrade. You should take caution when doing large version upgrades. Always backup your database and your home directory.
class { 'jira':
java_package => 'java-11-openjdk-headless'
javahome => '/usr/lib/jvm/jre-11-opendjk/',
version => '8.16.0',
}
Usage
A more complex example
class { 'jira':
version => '8.13.5',
installdir => '/opt/atlassian-jira',
homedir => '/opt/atlassian-jira/jira-home',
user => 'jira',
group => 'jira',
dbpassword => 'secret',
dbserver => 'localhost',
java_package => 'java-11-openjdk-headless',
javahome => '/usr/lib/jvm/jre-11-openjdk/',
download_url => 'http://myserver/pub/development-tools/atlassian/',
tomcat_additional_connectors => {
# Define two additional connectors, listening on port 8081 and 8082
8081 => {
'relaxedPathChars' => '[]|',
'relaxedQueryChars' => '[]|{}^\`"<>',
'maxThreads' => '150',
'minSpareThreads' => '25',
'connectionTimeout' => '20000',
'enableLookups' => 'false',
'maxHttpHeaderSize' => '8192',
'protocol' => 'HTTP/1.1',
'useBodyEncodingForURI' => 'true',
'redirectPort' => '8443',
'acceptCount' => '100',
'disableUploadTimeout' => 'true',
'bindOnInit' => 'false',
},
# This additional connector is configured for access from a reverse proxy
8082 => {
'relaxedPathChars' => '[]|',
'relaxedQueryChars' => '[]|{}^\`"<>',
'maxThreads' => '150',
'minSpareThreads' => '25',
'connectionTimeout' => '20000',
'enableLookups' => 'false',
'maxHttpHeaderSize' => '8192',
'protocol' => 'HTTP/1.1',
'useBodyEncodingForURI' => 'true',
'redirectPort' => '8443',
'acceptCount' => '100',
'disableUploadTimeout' => 'true',
'bindOnInit' => 'false',
'proxyName' => 'jira2.example.com',
'proxyPort' => '443',
'scheme' => 'https',
'secure' => true,
},
}
}
Hiera examples
jira::version: '8.13.5'
# parent directories must exist
jira::installdir: '/opt/atlassian/atlassian-jira'
jira::homedir: '/opt/atlassian/application-data/jira-home'
jira::user: 'jira'
jira::group: 'jira'
jira::shell: '/bin/bash'
jira::dbserver: 'dbvip.example.co.za'
jira::javahome: '/opt/java'
jira::java_opts: >-
-Dhttp.proxyHost=proxy.example.co.za
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=proxy.example.co.za
-Dhttps.proxyPort=8080
-Dhttp.nonProxyHosts=localhost\|127.0.0.1\|172.*.*.*\|10.*.*.*
-XX:+UseLargePages
jira::dbport: '5439'
jira::dbuser: 'jira'
jira::jvm_xms: '1G'
jira::jvm_xmx: '3G'
jira::service_manage: false
jira::env:
- 'http_proxy=proxy.example.co.za:8080'
- 'https_proxy=proxy.example.co.za:8080'
jira::proxy:
scheme: 'https'
proxyName: 'jira.example.co.za'
proxyPort: '443'
jira::contextpath: '/jira'
jira::tomcat_additional_connectors:
8181:
relaxedPathChars: '[]|'
relaxedQueryChars: '[]|{}^\`"<>'
maxThreads: '150'
minSpareThreads: '25'
connectionTimeout: '20000'
enableLookups: 'false'
maxHttpHeaderSize: '8192'
protocol: 'HTTP/1.1'
useBodyEncodingForURI: 'true'
redirectPort: '8443'
acceptCount: '100'
disableUploadTimeout: 'true'
bindOnInit: 'false'
These additional and substituted parameters are used in production in an traditional enterprise environment with an Oracle 11g remote database and Oracle 8 JDK. Your mileage may vary.
jira::db: 'oracle'
jira::dbname: '<dbname>'
jira::dbport: '1526'
jira::dbdriver: 'oracle.jdbc.OracleDriver'
jira::dbtype: 'oracle10g'
jira::dburl: 'jdbc:oracle:thin:@//dbvip.example.co.za:1526/<dbname>'
jira::javahome: '/usr/lib/jvm/jdk-8-oracle-x64'
Reverse proxy can be configured as a hash as part of the JIRA resource
proxy => {
scheme => 'https',
proxyName => 'www.example.com',
proxyPort => '443',
},
Limitations
- Puppet 6.1.0
- Puppet Enterprise
The puppetlabs repositories can be found at: http://yum.puppetlabs.com/ and http://apt.puppetlabs.com/
-
RedHat 7, 8 or compatible (CentOS, Oracle Linux, etc)
-
Ubuntu 18.04, 20.04
-
Jira 8.x
-
PostgreSQL
-
MySQL
The databases below should work, but are not tested. YMMV.
- Oracle
- Microsoft SQL Server with JTDS driver (included in non-WAR version)
Development
Please feel free to raise any issues here for bug fixes. We also welcome feature requests. Feel free to make a pull request for anything and we make the effort to review and merge. We prefer with tests if possible.
Testing - How to test the JIRA module
Using puppetlabs_spec_helper. Simply run:
bundle install && bundle exec rake spec
to get results.
ruby -S rspec spec/classes/jira_install_spec.rb --color
.
Finished in 0.38159 seconds
1 example, 0 failures
Using Beaker - Puppet Labs cloud enabled acceptance testing tool..
The beaker tests will install oracle Java to /opt/java. When running the beaker tests you agree that you accept the oracle java license.
bundle install
BEAKER_set=ubuntu-server-12042-x64 bundle exec rake beaker
BEAKER_set=ubuntu-server-1404-x64 bundle exec rake beaker
BEAKER_set=debian-73-x64 bundle exec rake beaker
BEAKER_set=centos-64-x64 bundle exec rake beaker
BEAKER_set=centos-70-x64 bundle exec rake beaker
BEAKER_set=centos-64-x64-pe bundle exec rake beaker
To save build time it is useful to host the installation files locally on a web server. You can use the download_url environment variable to overwrite the default.
export download_url="'http://my.local.server/'"
Contributors
The list of contributors can be found here
Reference
Table of Contents
Classes
Public Classes
jira
: Downloads and installs Atlassian JIRA
Private Classes
jira::config
jira::install
jira::mysql_connector
jira::service
jira::sso
Functions
Private Functions
jira::sort_hash
: Sort a hash
Data types
Jira::Jvm_types
: Java Virtual Machine (JVM) typesJira::Tomcat_attributes
: A hash of string keys to arbitrary values that will be rendered as XML attributesJira::Tomcat_connectors
: A set of attribute hashes keyed by connector port number
Classes
jira
Copyright (c) 2012 Bryce Johnson
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
limitations under the License.
Parameters
The following parameters are available in the jira
class:
version
product
installdir
homedir
manage_user
user
group
installdir_owner
installdir_group
installdir_mode
homedir_mode
uid
gid
shell
enable_secure_admin_sessions
jira_config_properties
datacenter
shared_homedir
ehcache_listener_host
ehcache_listener_port
ehcache_object_port
use_jndi_ds
jndi_ds_name
db
dbname
dbuser
dbpassword
dbserver
dbport
dbtype
dbdriver
dbschema
dburl
connection_settings
oracle_use_sid
mysql_connector_manage
mysql_connector_version
mysql_connector_product
mysql_connector_install
mysql_connector_format
mysql_connector_url
pool_min_size
pool_max_size
pool_max_wait
validation_query
validation_query_timeout
min_evictable_idle_time
time_between_eviction_runs
pool_max_idle
pool_remove_abandoned
pool_remove_abandoned_timeout
pool_test_while_idle
pool_test_on_borrow
java_package
javahome
jvm_type
jvm_xms
jvm_xmx
java_opts
jvm_gc_args
jvm_code_cache_args
jvm_extra_args
jvm_nofiles_limit
download_url
checksum
disable_notifications
proxy_server
proxy_type
service_manage
service_ensure
service_enable
service_notify
service_subscribe
stop_jira
script_check_java_manage
script_check_java_template
tomcat_address
tomcat_port
tomcat_shutdown_port
tomcat_max_http_header_size
tomcat_min_spare_threads
tomcat_connection_timeout
tomcat_enable_lookups
tomcat_native_ssl
tomcat_https_port
tomcat_redirect_https_port
tomcat_protocol
tomcat_protocol_ssl
tomcat_use_body_encoding_for_uri
tomcat_disable_upload_timeout
tomcat_key_alias
tomcat_keystore_file
tomcat_keystore_pass
tomcat_keystore_type
tomcat_accesslog_format
tomcat_accesslog_enable_xforwarded_for
tomcat_max_threads
tomcat_accept_count
proxy
ajp
tomcat_default_connector
tomcat_additional_connectors
contextpath
resources
enable_sso
application_name
application_password
application_login_url
crowd_server_url
crowd_base_url
session_isauthenticated
session_tokenkey
session_validationinterval
session_lastvalidation
plugins
jvm_permgen
poolsize
enable_connection_pooling
version
Data type: String
The JIRA version to install or upgrade to. Changing this will trigger a restart
Default value: '8.13.5'
product
Data type: String[1]
Atlassian product to install.
Default value: 'jira'
installdir
Data type: Stdlib::Absolutepath
The directory in which JIRA software packages will be extracted
Default value: '/opt/jira'
homedir
Data type: Stdlib::Absolutepath
The directory for JIRA's runtime data that persists between versions.
Default value: '/home/jira'
manage_user
Data type: Boolean
Whether to manage the service user
Default value: true
user
Data type: String
User that the service will run as
Default value: 'jira'
group
Data type: String
Group that the service will run as
Default value: 'jira'
installdir_owner
Data type: String[1]
The owner of the installation directory.
Default value: 'root'
installdir_group
Data type: String[1]
The group of the installation directory.
Default value: 'root'
installdir_mode
Data type: Stdlib::Filemode
The permissions of the installation directory. Note that the JIRA service user must have at least execute permission on the directory.
Default value: '0755'
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
uid
Data type: Optional[Integer[0]]
The desired UID for the service user
Default value: undef
gid
Data type: Optional[Integer[0]]
The desired GID for the service group
Default value: undef
shell
Data type: Stdlib::Absolutepath
The shell of the service user
Default value: '/bin/true'
enable_secure_admin_sessions
Data type: Boolean
Enables secure administrator sessions
Default value: true
jira_config_properties
Data type: Hash
Allows configuring advanced JIRA properties as a key-value hash. See https://confluence.atlassian.com/adminjiraserver0813/advanced-jira-application-configuration-1027138631.html
Default value: {}
datacenter
Data type: Boolean
Set to true to enable clustered mode (JIRA Datacenter)
Default value: false
shared_homedir
Data type: Optional[Stdlib::AbsolutePath]
Shared data directory for all JIRA instances in a cluster
Default value: undef
ehcache_listener_host
Data type: Optional[Stdlib::Host]
EHCache configuration for clustered mode
Default value: undef
ehcache_listener_port
Data type: Optional[Stdlib::Port]
EHCache configuration for clustered mode
Default value: undef
ehcache_object_port
Data type: Optional[Stdlib::Port]
EHCache configuration for clustered mode
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
jndi_ds_name
Data type: String[1]
Configures the JNDI datasource name
Default value: 'JiraDS'
db
Data type: Enum['postgresql','mysql','sqlserver','oracle','h2']
The kind of database to use.
Default value: 'postgresql'
dbname
Data type: String
The database name to connect to
Default value: 'jira'
dbuser
Data type: String
Database username
Default value: 'jiraadm'
dbpassword
Data type: String
Database password
Default value: 'mypassword'
dbserver
Data type: String
Database host DNS name or IP address
Default value: 'localhost'
dbport
Data type: Optional[Variant[Integer,String]]
The database port. Default depends on $db
Default value: undef
dbtype
Data type: Optional[String]
The database type. Default depends on $db
Default value: undef
dbdriver
Data type: Optional[String]
The database driver class. Default depends on $db
Default value: undef
dbschema
Data type: Optional[String[1]]
The database schema, if applicable. Defaults to 'public' with PostgreSQL
Default value: undef
dburl
Data type: Optional[String]
Set this if you wish to use a custom database URL
Default value: undef
connection_settings
Data type: Optional[String]
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
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
mysql_connector_manage
Data type: Boolean
If true, the module will download and install the MySQL connector for JDBC
Default value: true
mysql_connector_version
Data type: String
Version of the connector to install
Default value: '8.0.23'
mysql_connector_product
Data type: String
Determines the filename for the download
Default value: 'mysql-connector-java'
mysql_connector_install
Data type: Stdlib::Absolutepath
Directory in which the connector will be installed
Default value: '/opt/MySQL-connector'
mysql_connector_format
Data type: String
Format of the downloaded package
Default value: 'tar.gz'
mysql_connector_url
Data type: Stdlib::HTTPUrl
Source for the connector
Default value: 'https://dev.mysql.com/get/Downloads/Connector-J'
pool_min_size
Data type: Optional[Integer[0]]
Configures pool-min-size in dbconfig.xml
Default value: undef
pool_max_size
Data type: Optional[Integer[0]]
Configures pool-max-size in dbconfig.xml
Default value: undef
pool_max_wait
Data type: Optional[Integer[-1]]
Configures pool-max-wait in dbconfig.xml
Default value: undef
validation_query
Data type: Optional[String]
Configures validation_query in dbconfig.xml
Default value: undef
validation_query_timeout
Data type: Optional[Integer[0]]
Configures validation_query_timeout in dbconfig.xml
Default value: undef
min_evictable_idle_time
Data type: Optional[Integer[0]]
Configures min-evictable-idle-time-millis in dbconfig.xml
Default value: undef
time_between_eviction_runs
Data type: Optional[Integer[0]]
Configures time-between-eviction-runs-millis in dbconfig.xml
Default value: undef
pool_max_idle
Data type: Optional[Integer[0]]
Configures pool-max-idle in dbconfig.xml
Default value: undef
pool_remove_abandoned
Data type: Optional[Boolean]
Configures pool-remove-abandoned in dbconfig.xml
Default value: undef
pool_remove_abandoned_timeout
Data type: Optional[Integer[0]]
Configures pool-remove-abandoned-timeout in dbconfig.xml
Default value: undef
pool_test_while_idle
Data type: Optional[Boolean]
Configures pool-test-while-idle in dbconfig.xml
Default value: undef
pool_test_on_borrow
Data type: Optional[Boolean]
Configures pool-test-on-borrow in dbconfig.xml
Default value: undef
java_package
Data type: Optional[String[1]]
If defined, the module will install this package before installing JIRA.
Default value: undef
javahome
Data type: Optional[Stdlib::AbsolutePath]
The location of an installed JVM. Must be set even if you specify java_package
Default value: undef
jvm_type
Data type: Jira::Jvm_types
The type of JVM to use. Affects some defaults for the arguments below
Default value: 'openjdk-11'
jvm_xms
Data type: String
Java -Xms parameter
Default value: '256m'
jvm_xmx
Data type: String
Java -Xmx parameter
Default value: '1024m'
java_opts
Data type: Optional[String]
Configures JVM_SUPPORT_RECOMMENDED_ARGS in setenv.sh. This is the preferred option to override.
Default value: undef
jvm_gc_args
Data type: Optional[String]
Configures JVM_GC_ARGS in setenv.sh
Default value: undef
jvm_code_cache_args
Data type: Optional[String]
Configures JVM_CODE_CACHE_ARGS in setenv.sh
Default value: undef
jvm_extra_args
Data type: Optional[String]
Configures JVM_EXTRA_ARGS in setenv.sh
Default value: undef
jvm_nofiles_limit
Data type: Integer
Set the limit for open files
Default value: 16384
download_url
Data type: Stdlib::HTTPUrl
Base URL for downloading Atlassian software
Default value: 'https://product-downloads.atlassian.com/software/jira/downloads'
checksum
Data type: Optional[String]
Optional checksum to verify the downloaded package
Default value: undef
disable_notifications
Data type: Boolean
Configures JIRA to disable e-mail handlers
Default value: false
proxy_server
Data type: Optional[String]
Configures the proxy server to use for downloads
Default value: undef
proxy_type
Data type: Optional[Enum['none','http','https','ftp']]
Configures the proxy type
Default value: undef
service_manage
Data type: Boolean
Whether to manage the jira service
Default value: true
service_ensure
Data type: Stdlib::Ensure::Service
Service state to ensure
Default value: 'running'
service_enable
Data type: Boolean
Whether to enable the service on boot
Default value: true
service_notify
Data type: Any
Service notify parameter
Default value: undef
service_subscribe
Data type: Any
Service subscribe parameter
Default value: undef
stop_jira
Data type: String
The command used to stop jira prior to upgrades. You can override this if you use an external too l to manage the jira service. Must return either 0 or 5 for success
Default value: 'systemctl stop jira.service && sleep 15'
script_check_java_manage
Data type: Boolean
undocumented
Default value: false
script_check_java_template
Data type: String
undocumented
Default value: 'jira/check-java.sh.erb'
tomcat_address
Data type: Optional[String]
Tomcat bind address
Default value: undef
tomcat_port
Data type: Stdlib::Port
Tomcat bind port
Default value: 8080
tomcat_shutdown_port
Data type: Stdlib::Port
Tomcat shutdown command port
Default value: 8005
tomcat_max_http_header_size
Data type: Integer
Tomcat connector setting
Default value: 8192
tomcat_min_spare_threads
Data type: Integer[0]
Tomcat connector setting
Default value: 25
tomcat_connection_timeout
Data type: Integer[0]
Tomcat connector setting
Default value: 20000
tomcat_enable_lookups
Data type: Boolean
Tomcat connector setting
Default value: false
tomcat_native_ssl
Data type: Boolean
Enables a native SSL connector
Default value: false
tomcat_https_port
Data type: Stdlib::Port
Tomcat port for the native SSL connector
Default value: 8443
tomcat_redirect_https_port
Data type: Optional[Stdlib::Port]
Specify which port to redirect internally when using port redirection from 80 to 8080 and 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
tomcat_protocol
Data type: String
Tomcat connector setting
Default value: 'HTTP/1.1'
tomcat_protocol_ssl
Data type: Optional[String]
Tomcat connector setting
Default value: undef
tomcat_use_body_encoding_for_uri
Data type: Boolean
Tomcat connector setting
Default value: true
tomcat_disable_upload_timeout
Data type: Boolean
Tomcat connector setting
Default value: true
tomcat_key_alias
Data type: String
Key alias in the keystore for the SSL connector
Default value: 'jira'
tomcat_keystore_file
Data type: Stdlib::Absolutepath
Path to a Java keystore for the SSL connector
Default value: '/home/jira/jira.jks'
tomcat_keystore_pass
Data type: String
Keystore passphrase
Default value: 'changeit'
tomcat_keystore_type
Data type: Enum['JKS', 'JCEKS', 'PKCS12']
Keystore type
Default value: 'JKS'
tomcat_accesslog_format
Data type: String
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
Data type: Boolean
Configures tomcat to respect X-Forwarded-For and X-Forwarded-By headers
If a proxy operates before JIRA, the access logs will only contain the IP addresses of the proxy
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
tomcat_max_threads
Data type: Integer
Tomcat connector setting
Default value: 150
tomcat_accept_count
Data type: Integer
Tomcat connector setting
Default value: 100
proxy
Data type: Hash
Hash of additional settings to configure on the connectors. The confusing naming is retained for backwards compatibility
Default value: {}
ajp
Data type: Hash
Properties for an AJP connector
Default value: {}
tomcat_default_connector
Data type: Boolean
If set to false, the default connector will be omitted
Default value: true
tomcat_additional_connectors
Data type: Jira::Tomcat_connectors
Well-formed, complex Hash where each key represents a port number and the key's
value is a hash whose key/value pairs represent the attributes and their values
that define the connector's behaviour. Default is {}
.
Use this parameter to specify arbitrary, additional connectors with arbitrary attributes. There are no defaults here, so you must take care to specify all attributes a connector requires to work in Jira. See below for examples.
This is useful if you need to access your Jira instance directly through an additional HTTP port, e.g. one that is not configured for reverse proxy use. Atlassian describes use cases for this in https://confluence.atlassian.com/kb/how-to-create-an-unproxied-application-link-719095740.html and https://confluence.atlassian.com/kb/how-to-bypass-a-reverse-proxy-or-ssl-in-application-links-719095724.html
Default value: {}
contextpath
Data type: Optional[String[1]]
Tomcat context path for the web service
Default value: undef
resources
Data type: Hash
undocumented
Default value: {}
enable_sso
Data type: Boolean
Enable single sign-on via Crowd
Default value: false
application_name
Data type: String
Crowd application name
Default value: 'crowd'
application_password
Data type: String
Crowd application password
Default value: '1234'
application_login_url
Data type: Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]
Crowd application login URL
Default value: 'https://crowd.example.com/console/'
crowd_server_url
Data type: Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]
Crowd server URL
Default value: 'https://crowd.example.com/services/'
crowd_base_url
Data type: Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]
Crowd base URL
Default value: 'https://crowd.example.com/'
session_isauthenticated
Data type: String
undocumented SSO parameter
Default value: 'session.isauthenticated'
session_tokenkey
Data type: String
undocumented SSO parameter
Default value: 'session.tokenkey'
session_validationinterval
Data type: Integer
undocumented SSO parameter
Default value: 5
session_lastvalidation
Data type: String
undocumented SSO parameter
Default value: 'session.lastvalidation'
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
poolsize
Data type: Optional[Integer[0]]
Deprecated alias for $pool_max_size
.
Default value: undef
enable_connection_pooling
Data type: Optional[Boolean]
Deprecated. Has no effect.
Default value: undef
Data types
Jira::Jvm_types
Java Virtual Machine (JVM) types
Alias of Enum['openjdk-11', 'oracle-jdk-1.8']
Jira::Tomcat_attributes
A hash of string keys to arbitrary values that will be rendered as XML attributes
Alias of Hash[String[1], Scalar]
Jira::Tomcat_connectors
A set of attribute hashes keyed by connector port number
Alias of Hash[Stdlib::Port::Unprivileged, Jira::Tomcat_attributes]
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v6.0.0 (2024-02-13)
Breaking changes:
- Drop Puppet 6 support #404 (bastelfreak)
Implemented enhancements:
- Fix tests with modulesync 7.3.0; allow latest dependency versions #414 (h-haaks)
- Add Puppet 8 support #408 (bastelfreak)
- Allow custom plugin installation and usage of JNDI database connections #389 (ThomasMinor)
Fixed bugs:
- Update setenv.sh.epp if statement to work with service desk #400 (techtino)
- Avoid duplicate scheme declaration when using proxy with SSL #396 (jmcnatt)
Closed issues:
- JVM_OPENS not set for JIRA Java 17 support #412
- cluster.properties.epp - soon to be deprecated code by Puppet 8 #411
Merged pull requests:
- Bugfix java 17 support per atlassian upstream #413 (valentino-aguiar-gsa)
- Remove legacy top-scope syntax #410 (smortex)
- Allow up-to-date dependencies #393 (smortex)
v5.1.0 (2021-08-20)
Implemented enhancements:
- Configure recommended JDBC connection-properties by default for PostgreSQL databases #381 (oranenj)
- Allow managing installation and home directory modes and enforce installdir permissions by default #378 (oranenj)
Fixed bugs:
Closed issues:
- connection-settings parameter in dbconfig.xml template should be connection-properties instead #380
- JIRA will not start if the installation directory mode is missing o+x #377
Merged pull requests:
- switch from camptocamp/systemd to voxpupuli/systemd #386 (bastelfreak)
- Extend the version check to the tailored jira servicedesk version #383 (diLLec)
- Add note about RHEL 8 and SELinux and clean up a bit #379 (oranenj)
v5.0.1 (2021-04-23)
Fixed bugs:
- Explicitly configure dbconfig.xml parameters again to stop JIRA's healthcheck from complaining. This restores the behaviour prior to 5.0.0 #375 (oranenj)
v5.0.0 (2021-04-21)
Version 5.0.0 is a major release of the puppet/jira
module. The API stays mostly the same, but there are a few changes that users should take into account:
Only JIRA version 8.0.0 and newer are supported.
- The module's templates have been synchronized with the latest LTS release of JIRA (8.13.5)
- Upgrade your JIRA installation to a supported version using a previous version of this module first.
The jira::facts
class has been removed
- The
jira_version
fact is no longer required for upgrades and the facts weren't particularly useful, so they have been removed. The module will not remove existing files, however, so existing installations will continue reporting jira facts. - Note: upgrading to this version will cause jira to restart once due to the way updates are detected. If you would like to avoid this, create a
${jira::installdir}/atlassian-${jira::product_name}-running
symlink pointing to your current active installation.
Default versions have changed
- The module will now install 8.13.5 by default. If you for some reason don't explicitly specify a JIRA version in your installation, you will get an automatic upgrade.
- The MySQL connector, if installed, is now 8.0.23 by default, as the previous default is EOL.
The API is now typed
The type enforcement is mostly backwards compatible, but some variables which previously accepted integer-looking strings will now require actual integers.
Database configuration is overhauled
- Most settings in
dbconfig.xml
are now omitted of not explicitly configured by the user. JIRA will fall back to its built-in default values, which mostly matched what the module configured previously. If this causes adverse effects with your installation, please report a bug. jira::poolsize
is now a deprecated parameter and merely an alias for$jira::pool_max_size
. If both are configured, the latter takes precedence. Jira's default value for this parameter is 20, which matches the module's previous defaultjira::enable_connection_pooling
is now deprecated and has no effect. It previously only affected users using PostgreSQL databases, and served no useful purpose.
Changes to default behaviour
- We now use the
camptocamp/systemd
module, and the unit file is installed in/etc/systemd/system/jira.service
. The old file at/lib/systemd/system/jira.service
can be removed, though its existence should not matter. jira::java_opts
no longer defaults to-XX:-HeapDumpOnOutOfMemoryError
as it is not on by default in Atlassian's configuration. If you want this, please add it to your configuration explicitly. The old name for the parameter is maintained- The module selects some defaults for
setenv.sh
based on the value ofjira::jvm_type
. This parameter defaults toopenjdk-11
. You may override the module's choices by using the newjira::jvm_gc_args
,jira::jvm_code_cache_args
andjira::jvm_extra_args
parameters. For backwards compatibility,JVM_SUPPORT_RECOMMENDED_ARGS
is configured byjira::java_opts
Broken / deprecated functionality has been removed
- The
jira::service
class is now private, and overriding the service template is no longer possible. Use systemd drop-ins instead. - Only
puppet/archive
is supported for downloading the installation packages, and this is not configurable jira::format
no longer exists; it's alwaystar.gz
. This parameter never worked properly.
Breaking changes:
- Remove jira::facts and rewrite upgrade logic #372 (oranenj)
- Bump default MySQL connector version to 8.0.23 and allow disabling the default HTTP connector #369 (oranenj)
- Add newer OSes and Puppet 7 to test matrix, drop Puppet 5 #364 (oranenj)
- Drop support for JIRA \<8.0.0 #359 (oranenj)
- Sync setenv.sh with upstream 8.13.5 (LTS) #357 (oranenj)
- Remove support for the deprecated staging module #355 (oranenj)
- Refactor database configuration and make the main API typed #352 (oranenj)
- Drop support for sysvinit #344 (ekohl)
Implemented enhancements:
- Add provider to set server ID and install License #36
- Test with Ubuntu 20.04 #371 (oranenj)
- Depend on camptocamp/systemd and clean up service handling #368 (oranenj)
- puppetlabs/stdlib: Allow 7.x #367 (bastelfreak)
- Add support for Oracle service names #365 (oranenj)
- Provide jira::java_package option to allow installing a java package directly via this module #363 (oranenj)
- Allow specifying JDBC connection parameters with jira::connection_settings #353 (oranenj)
- Add handling for X-Forwarded-For in access logs #350 (diLLec)
- Allow defining additional Tomcat connectors #316 (antaflos)
Fixed bugs:
- systemd provider has incorrect file-mode #289
- Restore $jira::java_opts for compatibility and remove $jira::jvm_*_additional from the API, as setting JDK type to custom allows full control anyway. #351 (oranenj)
- Fixing that the suffix can be empty as well (needed for mysql-connector > 8) #337 (diLLec)
Closed issues:
- Test with Puppet 7 and fresher OSes #361
- Drop Ubuntu 16.04, Add 18.04 instead #346
- server.xml - StuckThreadDetectionValve introduced in 7.6.12 #339
- jira::java_opts defined as YAML multiline block string generates incorrect JAVA_OPTS string in setenv.sh #333
- Jira_facts deprecation warnings #330
- Add optional MySQL connection string options #323
- jira service not restarted when changing systemd file #315
- remove dependency to puppet/staging #313
- JVM_REQUIRED_ARGS is missing -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory #309
- JVM_CODE_CACHE_ARGS not set #308
- Please allow adding properties to server.xml that would add the clients' real ip address to jira access logs when running behind a proxy server #305
- Java 11 Compatibility #300
- Mysql connector is not respecting the deploy_module choice #293
- Oracle real url has : instead of / #283
- jira user depends on install dir (unable to set home dir inside install dir as per example) #255
- MySQL Connector is not installing with correct directory permissions #241
- Connector class incompatibility since JIRA 7.3.0. #213
- Can't create parent directories if they dont exist #150
- Oracle connection string incorrect #146
- HTTP to HTTPS redirect #138
- Seems to be obsolete - JIRA 7.1.4 #137
- Use service_provider for init management #124
- JIRA 7.1.x compatibility #120
- Jira don't want to use my created database #117
- Add workaround for staging strip with zip archive #103
- puppet-jira -- Upgrade howto & addons management questions #102
- Add support to configure AJP as the only enabled connector #85
- Add support for handling archive permisions on hardened servers #77
- jira::facts cannot access $jira::tomcatPort #63
- Add tests for oracle database #53
- Validate all parameters #49
- JIRA can't parse the JVM arguments when delimited with spaces instead of semicolons. #44
Merged pull requests:
- Convert documentation to puppet strings #373 (oranenj)
- $installdir was previously unnecessarily owned by the jira user. It will now be owned by root. #366 (oranenj)
- Minor documentation updates #360 (oranenj)
- Make MySQL connector library world-readable #356 (oranenj)
- Refactor most configuration to use EPP templates #354 (oranenj)
- Fix Ruby path expectation #349 (ekohl)
- Updating check-java.sh and server.xml templates to upstream version #348 (timdeluxe)
- Remove special code path for Puppet Enterprise #347 (ekohl)
- Fix unit tests after sysvinit patch broke them #345 (ekohl)
- facts.pp: use less restrictive mode for the external fact script #343 (kenyon)
- templates/facts.rb.erb: update URI.open syntax to fix deprecation warnings #342 (kenyon)
- acceptance tests: use the default version of postgresql #340 (kenyon)
- facts.pp: use localhost instead of 127.0.0.1 #338 (kenyon)
- remove incorrect apostrophe in example #332 (wolfaba)
- Make JVM_EXTRA_ARGS manageable for java 11 compatibility #326 (diLLec)
v4.0.1 (2020-06-17)
Fixed bugs:
- Added >= to capture version 7.0.0 as using the "software" url #291 (rfreiberger)
Closed issues:
- Bump puppetlabs-stdlib dependency #318
- Raise puppet-archive version #304
- Server.xml for servicedesk #295
- Jira 7.12 needs relaxedPathChars & relaxedQueryChars #269
- Puppet 4 support? #168
- jira::facts don't work with All-in-One Puppet 4.x agent #151
Merged pull requests:
v4.0.0 (2019-06-19)
Breaking changes:
- modulesync 2.7.0 and drop puppet 4 #292 (bastelfreak)
Implemented enhancements:
- Cannot add wished tag to server.xml #234
- Better Amazon support #287 (cpepe)
- Added relaxedPath xml attributes as per jira apache tomcat upgrade file #280 (domgoodwin)
Fixed bugs:
- Jira Service Desk doesn't start with JasperListener / need relaxedPath with correct version comp #288 (thonixx)
- Update default
download_url
#286 (alexjfisher) - Remove messy warnings. Fixes #234 #272 (br0ch0n)
Closed issues:
- Jira downloads url default #294
- download url has changed #285
- Support for additional cluster.properties config #245
Merged pull requests:
- Update
download_url
default value in documentation #297 (towo) - Add Ehcache options; require stdlib 4.25.0 #282 (nrhtr)
- replace deprecated has_key() with
in
#276 (bastelfreak) - replace validate_* with assert_type in init.pp #275 (bastelfreak)
v3.5.2 (2018-10-14)
Merged pull requests:
- modulesync 2.1.0 and allow puppet 6.x #268 (bastelfreak)
- modulesync 1.9.6; update all dependencies #264 (bastelfreak)
v3.5.1 (2018-07-16)
Fixed bugs:
- Update server.xml.erb to allow for jsd #260 (cpepe)
- Check
ps
for a process with the jira pid, not a the jira user #258 (rigareau)
Closed issues:
v3.5.0 (2018-07-09)
Implemented enhancements:
Fixed bugs:
- certain
dbconfig.xml
settings requireenable_connection_pooling => true
#242
Closed issues:
- Add H2 database support #254
- Not compatible with JIRA 7.5+ and MS SQL Server #244
- consolidate db, dbtype, and dbdriver #73
Merged pull requests:
- Update README.md for clarity #253 (ronech)
- Update server.xml.erb to account for weird Service Desk versioning #252 (ronech)
- switch to using ensure_packages to avoid conflicts #250 (bmagistro)
- drop EOL OSs; fix puppet version range #249 (bastelfreak)
- Rely on beaker-hostgenerator for docker nodesets #246 (ekohl)
v3.4.1 (2018-03-30)
Fixed bugs:
- MySQL storage_engine problem #239
- Correct jdbc storage engine parameter. #216 (chrisperelstein)
v3.4.0 (2018-03-28)
Implemented enhancements:
- Flags to disable management of jira user and group #215
Merged pull requests:
- bump puppet to latest supported version 4.10.0 #237 (bastelfreak)
- Add proxy support for 'archive' #233 (abrust-ucsd)
- bump mysql dependency version to allow 5.x #230 (bastelfreak)
v3.3.0 (2017-12-09)
Implemented enhancements:
- Add official Ubuntu 16.04 support #229 (KoenDierckx)
Fixed bugs:
- Update download URL logic #218
Merged pull requests:
- bump archive dep to allow latest version #221 (bastelfreak)
v3.2.1 (2017-10-13)
Fixed bugs:
v3.2.0 (2017-10-10)
Implemented enhancements:
- Issue #215 - Disable user, need to update spec tests #223 (cyberious)
- add acceptance tests on ubuntu 14.04 #222 (bastelfreak)
- Add $tomcat_protocol_ssl paramater for compatibility with Jira >= 7.3. #219 (markleary)
- replace validate_* with datatypes #212 (bastelfreak)
Closed issues:
- Error: /Stage[main]/Jira::Install/Archive[/tmp/atlassian-jira-software-7.2.3.tar.gz]/ensure: change from absent to present failed: Download file checksum mismatch #173
Merged pull requests:
v3.1.0 (2017-01-13)
This is the last release with Puppet 3 support!
- modulesync with latest Vox Pupuli defaults
- Exposes checksum_verify in init.pp w/ conditional
- Allow JIRA to run in OpenJDK
- Make 'check-java.sh' Management Optional
- Bump puppet minimum version_requirement to 3.8.7
- Move 'check-java.sh' to Templates
- Fix rubocop issue in config_spec test.
- Bump minimum version dependencies (for Puppet 4)
- Remove OpenJDK Comments, use vanilla check-java.sh
- Remove extraneous comma in config.pp.
- Add Docker acceptance tests for travis
v3.0.1 (2016-11-23)
Summary
- Atlassian doesn't provide checksums, add checksum_verify false.
- Update README
Fixes
- Fix checksum verification as Atlassian doesn't provide checksums
- Fix Atlassian End of Support for versions < 6.1 , amend jira_install_spec.rb to reflect that
Improvements
- Amend README to clarify default deploy module
- modulesync with latest Vox Pupuli defaults
v3.0.0 (2016-10-04)
Summary
- Change pool_test_on_borrow default to false in init class :: As this alters init class, requires MAJOR release
- Add access log format variable to init :: as this also hits init class, MAJOR release
- Update README
Fixes
- Fix Download - version 7.1.9 and up
- Incompatible listeners server.xml > version 7
- Fix missing pool_test_on_borrow in dbconfig.mysql.xml.erb
Improvements
- modulesync with latest Vox Pupuli defaults
v2.1.0 (2016-09-08)
Summary
- modulesync with latest Vox Pupuli defaults
Improvements
- Add hiera support for catalina_opts
Fixes
- Service status is not working when using init scripts
- Fix JIRA 7.1.x download URL
v2.0.0 (2016-05-26)
Summary
- We dropped ruby1.8 support!
- mkrakowitzer-deploy got replaced by puppet-archive.
- The jira::facts class is included by default. You may get a Error: Duplicate declaration: Class[jira::facts] is already declared
- We added JIRA 7 Support
Improvements
- Use defined function to test for the existence of the fact jira_ver
- Added hieradata examples for Oracle DB backend
- Added containment for mysql_connector class
- Support STRICT_VARIABLES=yes
- Paramaterizing more tomcat settings
- Added schema parameter for dbconfig
- Added configuration option to enable or disable websudo.
- Added tests and updated README.md
- Support configuration of all properties in jira-config.properties
- Added crowd single sign-on functions as described by atlassian wiki
- Added ability to change tomcatShutdownPort
Fixes
- Fix to address Amazon Ami configuration
- Avoid duplicate scheme declaration when using proxy with SSL
- Fix jira::mysql_connector_url
v1.3.0 (2015-08-05)
Summary
- Add SSL Support #76
- Resolve issue where rake lint tasks always exited with 0 status
- added new parameter disable_notifications in relation to setenv.sh
- Add examples
v1.2.1 (2015-04-25)
Summary
- Update metadata, README, CHANGELOG to point to new namespace.
- Update .travis.yml to auto deploy tagged versions
v1.2.0 (2015-04-16)
- Issue #51 Make the jira users shell configurable
- Add a notify and subscribe options to the jira service
- Added oracle to db input validator
- Turn on the AJP connector based on a hiera or puppet-variable lookup
- Added Microsoft SQL Server support
- Include jira::facts class by default.
- Adding new feature generating a content.xml configuration
- Add a notify and subscribe options to the jira service
- Provide ability to set the bind address of Tomcat via the jira::tomcatAddress parameter
- Bump jira version to 6.4.1
Thanks to Scott Searcy, Oliver Bertuch, Paul Geringer, Eric Shamow, William Lieurance, Doug Neal for their contributions.
v1.1.5 (2014-01-21)
- Add beaker tests for MySQL
- Added support for Oracle and Scientific Linux
- Bump jira version to 6.3.13
- Add support for parameter 'contextpath'
- Add class to install MySQL Java connector from mysql.com
- Add support for oracle database
Thanks to Oliver Bertuch for his contributions.
v1.1.4 (2014-01-17)
- Parameterize the lockfile variable in the init script
- Autoinstall MySql Connector/J Driver
- Add parameter stop_jira
- Fix bug on RHEL7 where updating the systemd script does not take effect without refreshing systemd
Thanks to MasonM for his contributions
v1.1.3 (2014-11-17)
- Refactor beaker tests to that they are portable and other people can run them
- Remove unnecessary comments from init.pp
- Dont cleanup jira tar.gz file when using staging module.
- Add/Remove beaker nodesets
- Add CentOS 7 nodeset
- Remove ubuntu 1004 and Debian 6 nodeset
- Add support for systemd style init script on RedHat/CentOS 7
v1.1.2 (2014-10-19)
- Add new parameter: jvm_permgen, defaults to 256m.
- Updates to readme
v1.1.1 (2014-10-11)
- Fix typo of in module nanliu-staging, preving module from being installed
v1.1.0 (2014-10-09)
- Add beaker tests for Ubuntu/Centos/Debian
- Issue #3 Handle updating of Jira
Summary
Resolve Issue #29
- Add external fact for running version of JIRA.
- Replace mkrakowitzer-deploy with nanliu-staging as the default module to deploy jira files
v1.0.1 (2014-10-01)
Summary
Update the README file to comply with puppetlabs standards
- https://docs.puppetlabs.com/puppet/latest/reference/modules_documentation.html
- https://docs.puppetlabs.com/puppet/latest/reference/READMEtemplate.markdown
Bugfixes
- None
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppet/systemd (>= 3.0.0 < 7.0.0)
- puppetlabs/stdlib (>= 4.25.0 < 10.0.0)
- puppet/archive (>= 1.0.0 < 8.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.