Skip to content

Commit

Permalink
Fixing some dependency issues in the install
Browse files Browse the repository at this point in the history
  • Loading branch information
brycejohnson committed Sep 27, 2012
1 parent 4a4887e commit 4e3fe08
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Puppet module authored by Bryce Johnson
puppet-jira is a module for Atlassian's Enterprise Issue Tracking and
project management tool.

## Known Issue
This module needs a service provider created. Subsequent puppet runs will fail because puppet is not able to get the JIRA service's status.

## Requirements

### Operating System
Expand All @@ -18,19 +21,14 @@ project management tool.

### Package Requirements

* Puppet 2.7.x
* Puppet 3.0.0

* hiera and hiera-puppet
This puppet module heavily uses hiera-puppet to decouple configuration
information from the module itself. An example is given in jira.yaml
that you can use to construct your own jira hieradata information. Params.pp
is still used since some resource types can't call hiera directly, like file.

* git 1.7.6+ (this module doesn't check, at least yet, just make sure git
is installed)

* open JDK 1.6 (Don't use 1.7 yet), prefer update 33+

### Before you begin
It is your responsibility to backup your database. Especially do so
if you are installing to an existing installation of jira as this module
Expand All @@ -40,6 +38,9 @@ You must have your database setup with the account user that the application
will use. This information needs to be put in the hiera yaml, for example
jira.yaml, in your hieradata directory.

I have my own postgres puppet module that installs pg, creates the JIRA
database, and the JIRA database user before the JIRA puppet module runs.

Make sure you have a JAVA_HOME and appropriate java installed on your machine.
Recommended is JDK 1.6u33

Expand All @@ -51,9 +52,6 @@ makes no warranty on your data, per its license.
This puppet module will be downloading the jira zip, extract it into
/opt/jira/atlassian-jira-$version

A service will also be created for you with chkconfig configured to be on
so that jira will start up automatically on system start.

You will also need to enter in the directory to your jira-home, which should
also be kept in the hiera yaml, for example jira.yaml.

Expand Down
2 changes: 1 addition & 1 deletion jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
# Atlassian jira Git Enterprise Source Control Server
jira_name: jira
jira_version: 5.1.1
jira_version: 5.1.4
jira_package_format: zip

# Directory where the webapp will run from
Expand Down
6 changes: 3 additions & 3 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

require jira::params

exec { 'mkdirp-homedir':
exec { 'mkdirp-homedir-jira':
cwd => "${jira::params::tmpdir}",
command => "/bin/mkdir -p ${jira::params::homedir}",
creates => "${jira::params::homedir}"
Expand All @@ -33,14 +33,14 @@
file { "${jira::params::homedir}/dbconfig.xml":
content => template('jira/dbconfig.postgres.xml.erb'),
mode => '0600',
require => [Class['jira::install'],Exec['mkdirp-homedir']],
require => [Class['jira::install'],Exec['mkdirp-homedir-jira']],
}
}
if "${jira::params::db}" == 'mysql' {
file { "${jira::params::homedir}/dbconfig.xml":
content => template('jira/dbconfig.mysql.xml.erb'),
mode => '0600',
require => [Class['jira::install'],Exec['mkdirp-homedir']],
require => [Class['jira::install'],Exec['mkdirp-homedir-jira']],
}
}
}
4 changes: 2 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
}

exec { 'mkdirp-installdir':
exec { 'mkdirp-installdir-jira':
cwd => "${jira::params::tmpdir}",
command => "/bin/mkdir -p ${jira::params::installdir}",
creates => "${jira::params::installdir}",
Expand All @@ -43,7 +43,7 @@
cwd => "${jira::params::installdir}",
command => "/usr/bin/unzip -o -d ${jira::params::installdir} ${jira::params::tmpdir}/atlassian-${jira::params::product}-${jira::params::version}.${jira::params::format}",
creates => "${jira::params::webappdir}",
require => [Exec['wget-jira-package'],Exec['mkdirp-installdir']],
require => [Exec['wget-jira-package'],Exec['mkdirp-installdir-jira']],
}

file { '/etc/rc.d/init.d/jira':
Expand Down
8 changes: 4 additions & 4 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
class jira::service {

service { 'jira':
ensure => 'running',
name => 'jira',
enable => true,
require => Class['jira::config'],
ensure => 'running',
name => 'jira',
enable => true,
require => Class['jira::config'],
}
}

0 comments on commit 4e3fe08

Please sign in to comment.