Puppet Class: jira

Defined in:
manifests/init.pp

Summary

Downloads and installs Atlassian JIRA

Overview


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:

  • version (String) (defaults to: '8.13.5')

    The JIRA version to install or upgrade to. Changing this will trigger a restart

  • product (String) (defaults to: 'jira')

    Atlassian product to install.

  • installdir (Stdlib::Absolutepath) (defaults to: '/opt/jira')

    The directory in which JIRA software packages will be extracted

  • homedir (Stdlib::Absolutepath) (defaults to: '/home/jira')

    The directory for JIRA’s runtime data that persists between versions.

  • manage_user (Boolean) (defaults to: true)

    Whether to manage the service user

  • user (String) (defaults to: 'jira')

    User that the service will run as

  • group (String) (defaults to: 'jira')

    Group that the service will run as

  • uid (Optional[Integer[0]]) (defaults to: undef)

    The desired UID for the service user

  • gid (Optional[Integer[0]]) (defaults to: undef)

    The desired GID for the service group

  • shell (Stdlib::Absolutepath) (defaults to: '/bin/true')

    The shell of the service user

  • enable_secure_admin_sessions (Boolean) (defaults to: true)

    Enables secure administrator sessions

  • jira_config_properties (Hash) (defaults to: {})

    Allows configuring advanced JIRA properties as a key-value hash. See confluence.atlassian.com/adminjiraserver0813/advanced-jira-application-configuration-1027138631.html

  • datacenter (Boolean) (defaults to: false)

    Set to true to enable clustered mode (JIRA Datacenter)

  • shared_homedir (Optional[Stdlib::AbsolutePath]) (defaults to: undef)

    Shared data directory for all JIRA instances in a cluster

  • ehcache_listener_host (Optional[Stdlib::Host]) (defaults to: undef)

    EHCache configuration for clustered mode

  • ehcache_listener_port (Optional[Stdlib::Port]) (defaults to: undef)

    EHCache configuration for clustered mode

  • ehcache_object_port (Optional[Stdlib::Port]) (defaults to: undef)

    EHCache configuration for clustered mode

  • db (Enum['postgresql','mysql','sqlserver','oracle','h2']) (defaults to: 'postgresql')

    The kind of database to use.

  • dbname (String) (defaults to: 'jira')

    The database name to connect to

  • dbuser (String) (defaults to: 'jiraadm')

    Database username

  • dbpassword (String) (defaults to: 'mypassword')

    Database password

  • dbserver (String) (defaults to: 'localhost')

    Database host DNS name or IP address

  • dbport (Optional[Variant[Integer,String]]) (defaults to: undef)

    The database port. Default depends on ‘$db`

  • dbtype (Optional[String]) (defaults to: undef)

    The database type. Default depends on ‘$db`

  • dbdriver (Optional[String]) (defaults to: undef)

    The database driver class. Default depends on ‘$db`

  • dbschema (Any) (defaults to: undef)

    The database schema, if applicable. Defaults to ‘public’ with PostgreSQL

  • dburl (Optional[String]) (defaults to: undef)

    Set this if you wish to use a custom database URL

  • connection_settings (Optional[String]) (defaults to: undef)

    Configures JDBC connection settings

  • oracle_use_sid (Boolean) (defaults to: true)

    Affects the database URL format for Oracle depending on whether you connect via a SID or a service name

  • mysql_connector_manage (Boolean) (defaults to: true)

    If true, the module will download and install the MySQL connector for JDBC

  • mysql_connector_version (String) (defaults to: '8.0.23')

    Version of the connector to install

  • mysql_connector_product (String) (defaults to: 'mysql-connector-java')

    Determines the filename for the download

  • mysql_connector_install (Stdlib::Absolutepath) (defaults to: '/opt/MySQL-connector')

    Directory in which the connector will be installed

  • mysql_connector_format (String) (defaults to: 'tar.gz')

    Format of the downloaded package

  • mysql_connector_url (Stdlib::HTTPUrl) (defaults to: 'https://dev.mysql.com/get/Downloads/Connector-J')

    Source for the connector

  • pool_min_size (Optional[Integer[0]]) (defaults to: undef)

    Configures pool-min-size in dbconfig.xml

  • pool_max_size (Optional[Integer[0]]) (defaults to: undef)

    Configures pool-max-size in dbconfig.xml

  • pool_max_wait (Optional[Integer[-1]]) (defaults to: undef)

    Configures pool-max-wait in dbconfig.xml

  • validation_query (Optional[String]) (defaults to: undef)

    Configures validation_query in dbconfig.xml

  • validation_query_timeout (Optional[Integer[0]]) (defaults to: undef)

    Configures validation_query_timeout in dbconfig.xml

  • min_evictable_idle_time (Optional[Integer[0]]) (defaults to: undef)

    Configures min-evictable-idle-time-millis in dbconfig.xml

  • time_between_eviction_runs (Optional[Integer[0]]) (defaults to: undef)

    Configures time-between-eviction-runs-millis in dbconfig.xml

  • pool_max_idle (Optional[Integer[0]]) (defaults to: undef)

    Configures pool-max-idle in dbconfig.xml

  • pool_remove_abandoned (Optional[Boolean]) (defaults to: undef)

    Configures pool-remove-abandoned in dbconfig.xml

  • pool_remove_abandoned_timeout (Optional[Integer[0]]) (defaults to: undef)

    Configures pool-remove-abandoned-timeout in dbconfig.xml

  • pool_test_while_idle (Optional[Boolean]) (defaults to: undef)

    Configures pool-test-while-idle in dbconfig.xml

  • pool_test_on_borrow (Optional[Boolean]) (defaults to: undef)

    Configures pool-test-on-borrow in dbconfig.xml

  • java_package (Optional[String[1]]) (defaults to: undef)

    If defined, the module will install this package before installing JIRA.

  • javahome (Optional[Stdlib::AbsolutePath]) (defaults to: undef)

    The location of an installed JVM. Must be set even if you specify java_package

  • jvm_type (Jira::Jvm_types) (defaults to: 'openjdk-11')

    The type of JVM to use. Affects some defaults for the arguments below

  • jvm_xms (String) (defaults to: '256m')

    Java -Xms parameter

  • jvm_xmx (String) (defaults to: '1024m')

    Java -Xmx parameter

  • java_opts (Optional[String]) (defaults to: undef)

    Configures JVM_SUPPORT_RECOMMENDED_ARGS in setenv.sh. This is the preferred option to override.

  • jvm_gc_args (Optional[String]) (defaults to: undef)

    Configures JVM_GC_ARGS in setenv.sh

  • jvm_code_cache_args (Optional[String]) (defaults to: undef)

    Configures JVM_CODE_CACHE_ARGS in setenv.sh

  • jvm_extra_args (Optional[String]) (defaults to: undef)

    Configures JVM_EXTRA_ARGS in setenv.sh

  • jvm_nofiles_limit (Integer) (defaults to: 16384)

    Set the limit for open files

  • catalina_opts (String) (defaults to: '')

    Does nothing :-)

  • download_url (Stdlib::HTTPUrl) (defaults to: 'https://product-downloads.atlassian.com/software/jira/downloads')

    Base URL for downloading Atlassian software

  • checksum (Optional[String]) (defaults to: undef)

    Optional checksum to verify the downloaded package

  • disable_notifications (Boolean) (defaults to: false)

    Configures JIRA to disable e-mail handlers

  • proxy_server (Optional[String]) (defaults to: undef)

    Configures the proxy server to use for downloads

  • proxy_type (Optional[Enum['none','http','https','ftp']]) (defaults to: undef)

    Configures the proxy type

  • service_manage (Boolean) (defaults to: true)

    Whether to manage the jira service

  • service_ensure (Stdlib::Ensure::Service) (defaults to: 'running')

    Service state to ensure

  • service_enable (Boolean) (defaults to: true)

    Whether to enable the service on boot

  • service_notify (Any) (defaults to: undef)

    Service notify parameter

  • service_subscribe (Any) (defaults to: undef)

    Service subscribe parameter

  • stop_jira (String) (defaults to: 'systemctl stop jira.service && sleep 15')

    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

  • script_check_java_manage (Boolean) (defaults to: false)

    undocumented

  • script_check_java_template (String) (defaults to: 'jira/check-java.sh.erb')

    undocumented

  • tomcat_address (Optional[String]) (defaults to: undef)

    Tomcat bind address

  • tomcat_port (Stdlib::Port) (defaults to: 8080)

    Tomcat bind port

  • tomcat_shutdown_port (Stdlib::Port) (defaults to: 8005)

    Tomcat shutdown command port

  • tomcat_max_http_header_size (Integer) (defaults to: 8192)

    Tomcat connector setting

  • tomcat_min_spare_threads (Integer[0]) (defaults to: 25)

    Tomcat connector setting

  • tomcat_connection_timeout (Integer[0]) (defaults to: 20000)

    Tomcat connector setting

  • tomcat_enable_lookups (Boolean) (defaults to: false)

    Tomcat connector setting

  • tomcat_native_ssl (Boolean) (defaults to: false)

    Enables a native SSL connector

  • tomcat_https_port (Stdlib::Port) (defaults to: 8443)

    Tomcat port for the native SSL connector

  • tomcat_redirect_https_port (Optional[Stdlib::Port]) (defaults to: undef)

    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.

  • tomcat_protocol (String) (defaults to: 'HTTP/1.1')

    Tomcat connector setting

  • tomcat_protocol_ssl (Optional[String]) (defaults to: undef)

    Tomcat connector setting

  • tomcat_use_body_encoding_for_uri (Boolean) (defaults to: true)

    Tomcat connector setting

  • tomcat_disable_upload_timeout (Boolean) (defaults to: true)

    Tomcat connector setting

  • tomcat_key_alias (String) (defaults to: 'jira')

    Key alias in the keystore for the SSL connector

  • tomcat_keystore_file (Stdlib::Absolutepath) (defaults to: '/home/jira/jira.jks')

    Path to a Java keystore for the SSL connector

  • tomcat_keystore_pass (String) (defaults to: 'changeit')

    Keystore passphrase

  • tomcat_keystore_type (Enum['JKS', 'JCEKS', 'PKCS12']) (defaults to: 'JKS')

    Keystore type

  • tomcat_accesslog_format (String) (defaults to: '%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"')

    Format string for Tomcat access log

  • tomcat_accesslog_enable_xforwarded_for (Boolean) (defaults to: false)

    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.

  • tomcat_max_threads (Integer) (defaults to: 150)

    Tomcat connector setting

  • tomcat_accept_count (Integer) (defaults to: 100)

    Tomcat connector setting

  • proxy (Hash) (defaults to: {})

    Hash of additional settings to configure on the connectors. The confusing naming is retained for backwards compatibility

  • ajp (Hash) (defaults to: {})

    Properties for an AJP connector

  • tomcat_default_connector (Boolean) (defaults to: true)

    If set to false, the default connector will be omitted

  • tomcat_additional_connectors (Jira::Tomcat_connectors) (defaults to: {})

    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 confluence.atlassian.com/kb/how-to-create-an-unproxied-application-link-719095740.html and confluence.atlassian.com/kb/how-to-bypass-a-reverse-proxy-or-ssl-in-application-links-719095724.html

  • contextpath (String) (defaults to: '')

    Tomcat context path for the web service

  • resources (Hash) (defaults to: {})

    undocumented

  • enable_sso (Boolean) (defaults to: false)

    Enable single sign-on via Crowd

  • application_name (String) (defaults to: 'crowd')

    Crowd application name

  • application_password (String) (defaults to: '1234')

    Crowd application password

  • application_login_url (Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]) (defaults to: 'https://crowd.example.com/console/')

    Crowd application login URL

  • crowd_server_url (Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]) (defaults to: 'https://crowd.example.com/services/')

    Crowd server URL

  • crowd_base_url (Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl]) (defaults to: 'https://crowd.example.com/')

    Crowd base URL

  • session_isauthenticated (String) (defaults to: 'session.isauthenticated')

    undocumented SSO parameter

  • session_tokenkey (String) (defaults to: 'session.tokenkey')

    undocumented SSO parameter

  • session_validationinterval (Integer) (defaults to: 5)

    undocumented SSO parameter

  • session_lastvalidation (String) (defaults to: 'session.lastvalidation')

    undocumented SSO parameter

  • jvm_permgen (Optional[String]) (defaults to: undef)

    Deprecated. Exists to notify users that they’re trying to configure a parameter that has no effect

  • poolsize (Optional[Integer[0]]) (defaults to: undef)

    Deprecated alias for ‘$pool_max_size`.

  • enable_connection_pooling (Optional[Boolean]) (defaults to: undef)

    Deprecated. Has no effect.

Author:

  • Bryce Johnson, Merritt Krakowitzer, Vox Pupuli



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'manifests/init.pp', line 263

class jira (

  # Jira Settings
  String $version                                                   = '8.13.5',
  String $product                                                   = 'jira',
  Stdlib::Absolutepath $installdir                                  = '/opt/jira',
  Stdlib::Absolutepath $homedir                                     = '/home/jira',
  Boolean $manage_user                                              = true,
  String $user                                                      = 'jira',
  String $group                                                     = 'jira',
  Optional[Integer[0]] $uid                                         = undef,
  Optional[Integer[0]] $gid                                         = undef,
  Stdlib::Absolutepath $shell                                       = '/bin/true',
  # Advanced configuration options
  Boolean $enable_secure_admin_sessions                             = true,
  Hash $jira_config_properties                                      = {},
  Boolean $datacenter                                               = false,
  Optional[Stdlib::AbsolutePath] $shared_homedir                    = undef,
  Optional[Stdlib::Host] $ehcache_listener_host                     = undef,
  Optional[Stdlib::Port] $ehcache_listener_port                     = undef,
  Optional[Stdlib::Port] $ehcache_object_port                       = undef,
  # Database Settings
  Enum['postgresql','mysql','sqlserver','oracle','h2'] $db          = 'postgresql',
  String $dbuser                                                    = 'jiraadm',
  String $dbpassword                                                = 'mypassword',
  String $dbserver                                                  = 'localhost',
  String $dbname                                                    = 'jira',
  Optional[Variant[Integer,String]] $dbport                         = undef,
  Optional[String] $dbdriver                                        = undef,
  Optional[String] $dbtype                                          = undef,
  Optional[String] $dburl                                           = undef,
  Optional[String] $connection_settings                             = undef,
  Boolean $oracle_use_sid                                           = true,
  $dbschema                                                         = undef,
  # MySQL Connector Settings
  Boolean $mysql_connector_manage                                   = true,
  String $mysql_connector_version                                   = '8.0.23',
  String $mysql_connector_product                                   = 'mysql-connector-java',
  String $mysql_connector_format                                    = 'tar.gz',
  Stdlib::Absolutepath $mysql_connector_install                     = '/opt/MySQL-connector',
  Stdlib::HTTPUrl $mysql_connector_url                              = 'https://dev.mysql.com/get/Downloads/Connector-J',
  Optional[Integer[0]] $pool_min_size                               = undef,
  Optional[Integer[0]] $pool_max_size                               = undef,
  Optional[Integer[-1]] $pool_max_wait                              = undef,
  Optional[String] $validation_query                                = undef,
  Optional[Integer[0]] $validation_query_timeout                    = undef,
  Optional[Integer[0]] $min_evictable_idle_time                     = undef,
  Optional[Integer[0]] $time_between_eviction_runs                  = undef,
  Optional[Integer[0]] $pool_max_idle                               = undef,
  Optional[Boolean] $pool_remove_abandoned                          = undef,
  Optional[Integer[0]]  $pool_remove_abandoned_timeout              = undef,
  Optional[Boolean] $pool_test_while_idle                           = undef,
  Optional[Boolean] $pool_test_on_borrow                            = undef,
  # JVM Settings
  Optional[String[1]] $java_package                                 = undef,
  Optional[Stdlib::AbsolutePath] $javahome                          = undef,
  Jira::Jvm_types $jvm_type                                         = 'openjdk-11',
  String $jvm_xms                                                   = '256m',
  String $jvm_xmx                                                   = '1024m',
  Optional[String] $java_opts                                       = undef,
  Optional[String] $jvm_gc_args                                     = undef,
  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,
  Boolean $disable_notifications                                    = false,
  Optional[String] $proxy_server                                    = undef,
  Optional[Enum['none','http','https','ftp']] $proxy_type           = undef,
  # Manage service
  Boolean $service_manage                                           = true,
  Stdlib::Ensure::Service $service_ensure                           = 'running',
  Boolean $service_enable                                           = true,
  $service_notify                                                   = undef,
  $service_subscribe                                                = undef,
  # Command to stop jira in preparation to upgrade. This is configurable
  # incase the jira service is managed outside of puppet. eg: using the
  # puppetlabs-corosync module: 'crm resource stop jira && sleep 15'
  # Note: the command should return either 0 or  5 
  # when the service doesn't exist
  String $stop_jira                                                 = 'systemctl stop jira.service && sleep 15',
  # Whether to manage the 'check-java.sh' script, and where to retrieve
  # the script from.
  Boolean $script_check_java_manage                                 = false,
  String $script_check_java_template                                = 'jira/check-java.sh.erb',
  # Tomcat
  Optional[String] $tomcat_address                                  = undef,
  Stdlib::Port $tomcat_port                                         = 8080,
  Stdlib::Port $tomcat_shutdown_port                                = 8005,
  Integer $tomcat_max_http_header_size                              = 8192,
  Integer[0] $tomcat_min_spare_threads                              = 25,
  Integer[0] $tomcat_connection_timeout                             = 20000,
  Boolean $tomcat_enable_lookups                                    = false,
  Boolean $tomcat_native_ssl                                        = false,
  Stdlib::Port $tomcat_https_port                                   = 8443,
  Optional[Stdlib::Port] $tomcat_redirect_https_port                = undef,
  String $tomcat_protocol                                           = 'HTTP/1.1',
  Optional[String] $tomcat_protocol_ssl                             = undef,
  Boolean $tomcat_use_body_encoding_for_uri                         = true,
  Boolean $tomcat_disable_upload_timeout                            = true,
  String $tomcat_key_alias                                          = 'jira',
  Stdlib::Absolutepath $tomcat_keystore_file                        = '/home/jira/jira.jks',
  String $tomcat_keystore_pass                                      = 'changeit',
  Enum['JKS', 'JCEKS', 'PKCS12'] $tomcat_keystore_type              = 'JKS',
  String $tomcat_accesslog_format                                   = '%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"',
  Boolean $tomcat_accesslog_enable_xforwarded_for                   = false,
  # Tomcat Tunables
  Integer $tomcat_max_threads                                       = 150,
  Integer $tomcat_accept_count                                      = 100,
  # Reverse https proxy
  Hash $proxy                                                       = {},
  # Options for the AJP connector
  Hash $ajp                                                         = {},
  Boolean $tomcat_default_connector                                 = true,
  # Additional connectors in server.xml
  Jira::Tomcat_connectors $tomcat_additional_connectors             = {},
  # Context path (usualy used in combination with a reverse proxy)
  String $contextpath                                               = '',
  # Resources for context.xml
  Hash $resources                                                   = {},
  # Enable SingleSignOn via Crowd
  Boolean $enable_sso                                               = false,
  String $application_name                                          = 'crowd',
  String $application_password                                      = '1234',
  Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl] $application_login_url = 'https://crowd.example.com/console/',
  Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl] $crowd_server_url      = 'https://crowd.example.com/services/',
  Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl] $crowd_base_url        = 'https://crowd.example.com/',
  String $session_isauthenticated                                   = 'session.isauthenticated',
  String $session_tokenkey                                          = 'session.tokenkey',
  Integer $session_validationinterval                               = 5,
  String $session_lastvalidation                                    = 'session.lastvalidation',
  # Deprecated parameters
  Optional[String] $jvm_permgen                                     = undef,
  Optional[Integer[0]] $poolsize                                    = undef,
  Optional[Boolean] $enable_connection_pooling                      = undef,
) {
  if versioncmp($jira::version, '8.0.0') < 0 {
    fail('JIRA versions older than 8.0.0 are no longer supported. Please use an older version of this module to upgrade first.')
  }

  if $datacenter and !$shared_homedir {
    fail("\$shared_homedir must be set when \$datacenter is true")
  }

  if $jvm_permgen {
    fail('jira::jvm_permgen', 'jira::jvm_permgen has been removed and no longer does anything. Configuring it hasn\'t been supported since JDK 8')
  }

  if $enable_connection_pooling != undef {
    deprecation('jira::enable_connection_pooling', 'jira::enable_connection_pooling has been removed and does nothing. Please simply configure the connection pooling parameters')
  }

  if $tomcat_redirect_https_port {
    unless ($tomcat_native_ssl) {
      fail('You need to set native_ssl to true when using tomcat_redirect_https_port')
    }
  }

  # The default Jira product starting with version 7 is 'jira-software',
  # but some old configuration may explicitly specify 'jira'
  if $product == 'jira' {
    $product_name = 'jira-software'
  } else {
    $product_name = $product
  }

  $webappdir = "${installdir}/atlassian-${product_name}-${version}-standalone"

  if ! empty($ajp) {
    if ! ('port' in $ajp) {
      fail('You need to specify a valid port for the AJP connector.')
    } else {
      assert_type(Variant[Pattern[/^\d+$/], Stdlib::Port], $ajp['port'])
    }
    if ! ('protocol' in $ajp) {
      fail('You need to specify a valid protocol for the AJP connector.')
    } else {
      assert_type(Enum['AJP/1.3', 'org.apache.coyote.ajp', 'org.apache.coyote.ajp.AjpNioProtocol'], $ajp['protocol'])
    }
  }

  if $javahome == undef {
    fail('You need to specify a value for javahome')
  }

  contain jira::install
  contain jira::config
  contain jira::service

  Class['jira::install']
  -> Class['jira::config']
  ~> Class['jira::service']

  if ($enable_sso) {
    class { 'jira::sso': }
  }
}