Skip to content

Latest commit

 

History

History
1168 lines (662 loc) · 28.7 KB

REFERENCE.md

File metadata and controls

1168 lines (662 loc) · 28.7 KB

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

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

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]