Forge Home

jira

Module to install Jira

62,471 downloads

57,435 latest version

2.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 999.999.999 (latest)
  • 1.2.0
  • 1.1.5
  • 1.1.4
  • 1.1.3
  • 1.1.2
  • 1.1.1
  • 1.1.0
  • 1.0.0
  • 0.0.4
  • 0.0.3
released Oct 10th 2014
This version is compatible with:
  • Puppet Enterprise 3.x
  • Puppet >=3.4.0 <4.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'mkrakowitzer-jira', '1.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mkrakowitzer-jira
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mkrakowitzer-jira --version 1.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: jira

Documentation

mkrakowitzer/jira — version 1.1.1 Oct 10th 2014

#JIRA Module

Build Status

####Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with JIRA
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module
  8. Testing - How to test the JIRA module
  9. 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 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 7 and 8 are currently supported by Atlassian.

  • JIRA requires a relational database to store its issue data. This module currently supports PostgreSQL 8.4 to 9.x and MySQL 5.x. 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 jfryman/nginx puppet module.

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.

This puppet module will automatically download the JIRA zip from Atlassian and extracts it into /opt/jira/atlassian-jira-$version. The default JIRA home is /home/jira.

If you would prefer to use Hiera then see jira.yaml file for available options.

#####Basic example

  class { 'jira':
    javahome    => '/opt/java',
  }

A complete example with postgres/nginx/JIRA is available here.

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':
    javahome    => '/opt/java',
    version     => '6.3.7',
  }

######Upgrades to JIRA

######Upgrades to the JIRA puppet Module mkrakowitzer-deploy has been replaced with nanliu-staging as the default module for deploying the JIRA binaries. You can still use mkrakowitzer-deploy with the staging_or_deploy => 'deploy'

  class { 'jira':
    javahome    => '/opt/java',
    staging_or_deploy => 'deploy',
  }

##Reference

###Classes

####Public Classes

  • jira: Main class, manages the installation and configuration of JIRA
  • jira::facts: Enable external facts for running instance of JIRA. This class is required to handle upgrades of jira. As it is an external fact, we chose not to enable it by default.

####Private Classes

  • jira::install: Installs JIRA binaries
  • jira::config: Modifies jira/tomcat configuration files
  • jira::service: Manage the JIRA service.

###Parameters

####JIRA parameters####

#####$version

Specifies the version of JIRA to install, defaults to latest available at time of module upload to the forge. It is recommended to pin the version number to avoid unnecessary upgrades of JIRA.

#####$product

Product name, defaults to JIRA

#####$format

The default file format of the JIRA install file, defaults to tar.gz

#####$installdir

The directory to install to, defaults to '/opt/jira'

#####$homedir

The default home directory of JIRA, defaults to '/home/jira'

#####$user

The user to run/install JIRA as, defaults to 'jira'

#####$group

The group to run/install JIRA as, defaults to 'jira'

#####$uid

The uid of the JIRA user, defaults to next available (undef)

#####$gid

The gid of the JIRA user, defaults to next available (undef)

####database parameters####

#####$db

Which database to use for JIRA, defaults to 'postgresql'

#####$dbuser

The default database user for JIRA, defaults to 'jiraadm'

#####$dbpassword

The password for the database user, defaults to 'mypassword'

#####$dbserver

The hostname of the database server, defaults to 'localhost'

#####$dbname

The name of the database, defaults to 'jira'

#####$dbport

The port of the database, defaults to '5432'

#####$dbdriver

The database driver to use, defaults to 'org.postgresql.Driver'

#####$dbtype

Database type, defaults to 'postgres72'

#####$poolsize

The connection pool size to the database, defaults to 20

#####$enable_connection_pooling

Configure database settings if you are pooling connections, defaults to 'false'

#####$poolMinSize

defaults to 20

#####$poolMaxSize

defaults to 20

#####$poolMaxWait

defaults to 30000

#####$validationQuery

defaults to undef

#####$minEvictableIdleTime

defaults to 60000

#####$timeBetweenEvictionRuns

defaults to undef

#####$poolMaxIdle

defaults to 20

#####$poolRemoveAbandoned

defaults to true

#####$poolRemoveAbandonedTimout

defaults to 300

#####$poolTestWhileIdle

defaults to true

#####$poolTestOnBorrow

defaults to true

####JVM Java parameters####

#####$javahome

The JAVA_HOME directory, defaults to undef. This is a required parameter

#####$jvm_xms

defaults to '256m'

#####$jvm_xmx

defaults to '1024m'

#####$jvm_optional

defaults to '-XX:-HeapDumpOnOutOfMemoryError'

#####$java_opts

defaults to ''

####Miscellaneous parameters####

#####$downloadURL

The URL used to download the JIRA installation file. Defaults to 'http://www.atlassian.com/software/jira/downloads/binary/'

#####$staging_or_deploy

Choose whether to use nanliu-staging, or mkrakowitzer-deploy. Defaults to 'staging' to use nanliu-staging as it is puppetlabs approved. Alternative option is 'deploy' to use mkrakowitzer-deploy.

#####$service_manage

Manage the JIRA service, defaults to 'true'

#####$service_ensure

Manage the JIRA service, defaults to 'running'

#####$service_enable

Defaults to 'true'

#####$proxy = {}

Defaults to {}, See examples on how to use.

####Tomcat parameters####

#####$tomcatPort

Port to listen on, defaults to 8080,

#####$tomcatMaxThreads

Defaults to '150'

#####$tomcatAcceptCount

Defaults to '100'

##Usage

####A more complex example

    class { 'jira':
      version     => '6.0.1',
      installdir  => '/opt/atlassian-jira',
      homedir     => '/opt/atlassian-jira/jira-home',
      user        => 'jira',
      group       => 'jira',
      dbpassword  => 'secret',
      dbserver    => 'localhost',
      javahome    => '/opt/java/jdk1.7.0_21/',
      downloadURL  => 'http://myserver/pub/development-tools/atlassian/',
    }

A Hiera example

This example is used in production for 2000 users in an traditional enterprise environment. Your milage may vary. The dbpassword can be stored using eyaml hiera extension.

jira::version:       '6.2.7'
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::jvm_permgen:   '384m'
jira::service_manage: false
jira::enable_connection_pooling: 'true'
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'

Reverse proxy can be configured as a hash as part of the JIRA resource

   proxy          => {
     scheme       => 'https',
     proxyName    => 'www.example.com',
     proxyPort    => '443',
   },

Enable external facts for puppet version. These facts are required to be enabled in order to upgrade to new JIRA versions smoothly.

  class { 'stash::facts': }

##Limitations

  • Puppet 3.4+
  • Puppet Enterprise

The puppetlabs repositories can be found at: http://yum.puppetlabs.com/ and http://apt.puppetlabs.com/

  • RedHat / CentOS 5/6
  • Ubuntu 12.04

We plan to support other Linux distributions and possibly Windows in the near future.

##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-1.9.3-p484/bin/ruby -S rspec spec/classes/stash_install_spec.rb --color
.

Finished in 0.38159 seconds
1 example, 0 failures

Using Beaker - Puppet Labs cloud enabled acceptance testing tool..

run (Additional yak shaving may be required):

BEAKER_set=ubuntu-server-12042-x64 bundle exec rake beaker BEAKER_set==debian-73-x64 bundle exec rake beaker BEAKER_set==centos-64-x64 bundle exec rake beaker

##Contributors

The list of contributors can be found here