Skip to content

Commit 7f0dd69

Browse files
committed
Document most parameters with puppet strings
Also mark classes as private properly
1 parent a4e798a commit 7f0dd69

File tree

10 files changed

+261
-501
lines changed

10 files changed

+261
-501
lines changed

README.md

Lines changed: 4 additions & 481 deletions
Large diffs are not rendered by default.

functions/sort_hash.pp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# @summary Return a sorted hash
1+
# @summary Sort a hash
2+
# @return Returns a sorted hash
23
# @api private
34
function jira::sort_hash(Hash $input) >> Hash {
45
# Puppet hashes are "insertion order", so this works to sort by key

manifests/config.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
# -----------------------------------------------------------------------------
16+
17+
# @api private
1618
class jira::config {
1719
# This class should be used from init.pp with a dependency on jira::install
1820
# and sending a refresh to jira::service

manifests/init.pp

Lines changed: 244 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,253 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
# -----------------------------------------------------------------------------
16-
# == Class: jira
1716
#
18-
# This module is used to install Jira.
17+
# @author Bryce Johnson, Merritt Krakowitzer, Vox Pupuli
18+
# @param version
19+
# The JIRA version to install or upgrade to. Changing this will trigger a restart
20+
# @param product
21+
# Atlassian product to install.
22+
# @param installdir
23+
# The directory in which JIRA software packages will be extracted
24+
# @param homedir
25+
# The directory for JIRA's runtime data that persists between versions.
26+
# @param manage_user
27+
# Whether to manage the service user
28+
# @param user
29+
# User that the service will run as
30+
# @param group
31+
# Group that the service will run as
32+
# @param uid
33+
# The desired UID for the service user
34+
# @param gid
35+
# The desired GID for the service group
36+
# @param shell
37+
# The shell of the service user
38+
# @param enable_secure_admin_sessions
39+
# Enables secure administrator sessions
40+
# @param jira_config_properties
41+
# Allows configuring advanced JIRA properties as a key-value hash.
42+
# See https://confluence.atlassian.com/adminjiraserver0813/advanced-jira-application-configuration-1027138631.html
43+
# @param datacenter
44+
# Set to true to enable clustered mode (JIRA Datacenter)
45+
# @param shared_homedir
46+
# Shared data directory for all JIRA instances in a cluster
47+
# @param ehcache_listener_host
48+
# EHCache configuration for clustered mode
49+
# @param ehcache_listener_port
50+
# EHCache configuration for clustered mode
51+
# @param ehcache_object_port
52+
# EHCache configuration for clustered mode
53+
# @param db
54+
# The kind of database to use.
55+
# @param dbname
56+
# The database name to connect to
57+
# @param dbuser
58+
# Database username
59+
# @param dbpassword
60+
# Database password
61+
# @param dbserver
62+
# Database host DNS name or IP address
63+
# @param dbport
64+
# The database port. Default depends on `$db`
65+
# @param dbtype
66+
# The database type. Default depends on `$db`
67+
# @param dbdriver
68+
# The database driver class. Default depends on `$db`
69+
# @param dbschema
70+
# The database schema, if applicable. Defaults to 'public' with PostgreSQL
71+
# @param dburl
72+
# Set this if you wish to use a custom database URL
73+
# @param connection_settings
74+
# Configures JDBC connection settings
75+
# @param oracle_use_sid
76+
# Affects the database URL format for Oracle depending on whether you connect via a SID or a service name
77+
# @param mysql_connector_manage
78+
# If true, the module will download and install the MySQL connector for JDBC
79+
# @param mysql_connector_version
80+
# Version of the connector to install
81+
# @param mysql_connector_product
82+
# Determines the filename for the download
83+
# @param mysql_connector_install
84+
# Directory in which the connector will be installed
85+
# @param mysql_connector_format
86+
# Format of the downloaded package
87+
# @param mysql_connector_url
88+
# Source for the connector
89+
# @param pool_min_size
90+
# Configures pool-min-size in dbconfig.xml
91+
# @param pool_max_size
92+
# Configures pool-max-size in dbconfig.xml
93+
# @param pool_max_wait
94+
# Configures pool-max-wait in dbconfig.xml
95+
# @param validation_query
96+
# Configures validation_query in dbconfig.xml
97+
# @param validation_query_timeout
98+
# Configures validation_query_timeout in dbconfig.xml
99+
# @param min_evictable_idle_time
100+
# Configures min-evictable-idle-time-millis in dbconfig.xml
101+
# @param time_between_eviction_runs
102+
# Configures time-between-eviction-runs-millis in dbconfig.xml
103+
# @param pool_max_idle
104+
# Configures pool-max-idle in dbconfig.xml
105+
# @param pool_remove_abandoned
106+
# Configures pool-remove-abandoned in dbconfig.xml
107+
# @param pool_remove_abandoned_timeout
108+
# Configures pool-remove-abandoned-timeout in dbconfig.xml
109+
# @param pool_test_while_idle
110+
# Configures pool-test-while-idle in dbconfig.xml
111+
# @param pool_test_on_borrow
112+
# Configures pool-test-on-borrow in dbconfig.xml
113+
# @param java_package
114+
# If defined, the module will install this package before installing JIRA.
115+
# @param javahome
116+
# The location of an installed JVM. Must be set even if you specify java_package
117+
# @param jvm_type
118+
# The type of JVM to use. Affects some defaults for the arguments below
119+
# @param jvm_xms
120+
# Java -Xms parameter
121+
# @param jvm_xmx
122+
# Java -Xmx parameter
123+
# @param java_opts
124+
# Configures JVM_SUPPORT_RECOMMENDED_ARGS in setenv.sh. This is the preferred option to override.
125+
# @param jvm_gc_args
126+
# Configures JVM_GC_ARGS in setenv.sh
127+
# @param jvm_code_cache_args
128+
# Configures JVM_CODE_CACHE_ARGS in setenv.sh
129+
# @param jvm_extra_args
130+
# Configures JVM_EXTRA_ARGS in setenv.sh
131+
# @param jvm_nofiles_limit
132+
# Set the limit for open files
133+
# @param catalina_opts
134+
# Does nothing :-)
135+
# @param download_url
136+
# Base URL for downloading Atlassian software
137+
# @param checksum
138+
# Optional checksum to verify the downloaded package
139+
# @param disable_notifications
140+
# Configures JIRA to disable e-mail handlers
141+
# @param proxy_server
142+
# Configures the proxy server to use for downloads
143+
# @param proxy_type
144+
# Configures the proxy type
145+
# @param service_manage
146+
# Whether to manage the jira service
147+
# @param service_ensure
148+
# Service state to ensure
149+
# @param service_enable
150+
# Whether to enable the service on boot
151+
# @param service_notify
152+
# Service notify parameter
153+
# @param service_subscribe
154+
# Service subscribe parameter
155+
# @param stop_jira
156+
# 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
157+
# @param script_check_java_manage
158+
# undocumented
159+
# @param script_check_java_template
160+
# undocumented
161+
# @param tomcat_address
162+
# Tomcat bind address
163+
# @param tomcat_port
164+
# Tomcat bind port
165+
# @param tomcat_shutdown_port
166+
# Tomcat shutdown command port
167+
# @param tomcat_max_http_header_size
168+
# Tomcat connector setting
169+
# @param tomcat_min_spare_threads
170+
# Tomcat connector setting
171+
# @param tomcat_connection_timeout
172+
# Tomcat connector setting
173+
# @param tomcat_enable_lookups
174+
# Tomcat connector setting
175+
# @param tomcat_native_ssl
176+
# Enables a native SSL connector
177+
# @param tomcat_https_port
178+
# Tomcat port for the native SSL connector
179+
# @param tomcat_redirect_https_port
180+
# Specify which port to redirect internally when using port redirection from 80 to 8080 and
181+
# from 443 to 8443 or with proxy server in front, defaults to $tomcat_https_port. To be used
182+
# with tomcat_native_ssl.
183+
# @param tomcat_protocol
184+
# Tomcat connector setting
185+
# @param tomcat_protocol_ssl
186+
# Tomcat connector setting
187+
# @param tomcat_use_body_encoding_for_uri
188+
# Tomcat connector setting
189+
# @param tomcat_disable_upload_timeout
190+
# Tomcat connector setting
191+
# @param tomcat_key_alias
192+
# Key alias in the keystore for the SSL connector
193+
# @param tomcat_keystore_file
194+
# Path to a Java keystore for the SSL connector
195+
# @param tomcat_keystore_pass
196+
# Keystore passphrase
197+
# @param tomcat_keystore_type
198+
# Keystore type
199+
# @param tomcat_accesslog_format
200+
# Format string for Tomcat access log
201+
# @param tomcat_accesslog_enable_xforwarded_for
202+
# Configures tomcat to respect X-Forwarded-For and X-Forwarded-By headers
203+
# If a proxy operates before JIRA, the access logs will only contain the IP addresses of the proxy
204+
# instead of the address of the user. With `X-Forwarded-For` the proxy can forward the users IP
205+
# address to the JIRA application server so that it can be logged correctly.
206+
# @param tomcat_max_threads
207+
# Tomcat connector setting
208+
# @param tomcat_accept_count
209+
# Tomcat connector setting
210+
# @param proxy
211+
# Hash of additional settings to configure on the connectors.
212+
# The confusing naming is retained for backwards compatibility
213+
# @param ajp
214+
# Properties for an AJP connector
215+
# @param tomcat_default_connector
216+
# If set to false, the default connector will be omitted
217+
# @param tomcat_additional_connectors
218+
# Well-formed, complex Hash where each key represents a port number and the key's
219+
# value is a hash whose key/value pairs represent the attributes and their values
220+
# that define the connector's behaviour. Default is `{}`.
19221
#
20-
# See README.md for more details
21-
#
22-
# === Authors
23-
#
24-
# Bryce Johnson
25-
# Merritt Krakowitzer
26-
#
27-
# === Copyright
28-
#
29-
# Copyright (c) 2012 Bryce Johnson
30-
#
31-
# Published under the Apache License, Version 2.0
222+
# Use this parameter to specify arbitrary, additional connectors with arbitrary
223+
# attributes. There are no defaults here, so you must take care to specify all
224+
# attributes a connector requires to work in Jira. See below for examples.
32225
#
226+
# This is useful if you need to access your Jira instance directly through an
227+
# additional HTTP port, e.g. one that is not configured for reverse proxy use.
228+
# Atlassian describes use cases for this in
229+
# https://confluence.atlassian.com/kb/how-to-create-an-unproxied-application-link-719095740.html
230+
# and
231+
# https://confluence.atlassian.com/kb/how-to-bypass-a-reverse-proxy-or-ssl-in-application-links-719095724.html
232+
# @param contextpath
233+
# Tomcat context path for the web service
234+
# @param resources
235+
# undocumented
236+
# @param enable_sso
237+
# Enable single sign-on via Crowd
238+
# @param application_name
239+
# Crowd application name
240+
# @param application_password
241+
# Crowd application password
242+
# @param application_login_url
243+
# Crowd application login URL
244+
# @param crowd_server_url
245+
# Crowd server URL
246+
# @param crowd_base_url
247+
# Crowd base URL
248+
# @param session_isauthenticated
249+
# undocumented SSO parameter
250+
# @param session_tokenkey
251+
# undocumented SSO parameter
252+
# @param session_validationinterval
253+
# undocumented SSO parameter
254+
# @param session_lastvalidation
255+
# undocumented SSO parameter
256+
# @param jvm_permgen
257+
# Deprecated. Exists to notify users that they're trying to configure a parameter that has no effect
258+
# @param poolsize
259+
# Deprecated alias for `$pool_max_size`.
260+
# @param enable_connection_pooling
261+
# Deprecated. Has no effect.
262+
# @summary Downloads and installs Atlassian JIRA
33263
class jira (
34264

35265
# Jira Settings

manifests/install.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
# -----------------------------------------------------------------------------
16+
17+
# @api private
1618
class jira::install {
1719
include 'archive'
1820

manifests/mysql_connector.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Class to install the MySQL Java connector
1+
# @api private
22
class jira::mysql_connector (
33
$version = $jira::mysql_connector_version,
44
$product = $jira::mysql_connector_product,

manifests/service.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#-----------------------------------------------------------------------------
16+
17+
# @api private
1618
class jira::service {
1719
assert_private()
1820

manifests/sso.pp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# == Class: confluence::sso
2-
#
3-
# Install confluence SSO via crowd, See README.md for more.
4-
#
1+
# @api private
52
class jira::sso (
63
$application_name = $jira::application_name,
74
$application_password = $jira::application_password,
@@ -13,6 +10,7 @@
1310
$session_validationinterval = $jira::session_validationinterval,
1411
$session_lastvalidation = $jira::session_lastvalidation,
1512
) {
13+
assert_private()
1614
file { "${jira::webappdir}/atlassian-jira/WEB-INF/classes/crowd.properties":
1715
ensure => file,
1816
content => epp('jira/crowd.properties.epp'),

types/tomcat_attributes.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# @summary A hash of string keys to arbitrary values that will be rendered as XML attributes
12
type Jira::Tomcat_attributes = Hash[String[1], Scalar]

types/tomcat_connectors.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# @summary A set of attribute hashes keyed by connector port number
12
type Jira::Tomcat_connectors = Hash[Stdlib::Port::Unprivileged, Jira::Tomcat_attributes]

0 commit comments

Comments
 (0)