Ask Your Question
0

new pp for JIRA<>mySQL (duplicate, please ignore)

asked 2015-05-15 13:02:12 -0500

pup-master gravatar image

updated 2015-05-18 17:35:38 -0500

Getting

"Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find template 'jira/etc/rc.d/init.d/jira.erb' at /etc/puppet/environments/production/manifests/install.pp:62 on node jira.oracle"

error but how do I define the template?

[nodes.pp]

node 'jira.oracle' { class {'jira':} }

[init.pp]

class jira (

  # Jira Settings
  $version      = '6.4.4',
  $product      = 'jira',
  $format       = 'tar.gz',
  $installdir   = '/opt/jira',
  $homedir      = '/opt/jira_home',
  $user         = 'jira',
  $group        = 'jira',

  # Database Settings
  $db           = 'mysql',
  $dbuser       = 'jira',
  $dbpassword   = 'secret',
  $dbserver     = 'localhost',
  $dbname       = 'jiraDB',
  $dbport       = '3306',
  $dbdriver     = 'com.mysql.jdbc.Driver',
  $dbtype       = 'mysql',
  $poolsize     = '20',

  # Configure database settings if you are pooling connections
  $enable_connection_pooling = false,
  $poolMinSize               = 20,
  $poolMaxSize               = 20,
  $poolMaxWait               = 30000,
  $validationQuery           = 'select 1',
  $minEvictableIdleTime      = 60000,
  $timeBetweenEvictionRuns   = 300000,
  $poolMaxIdle               = 20,
  $poolRemoveAbandoned       = true,
  $poolRemoveAbandonedTimout = 300,
  $poolTestWhileIdle         = true,
  $poolTestOnBorrow          = true,

  # JVM Settings
  $javahome     = '/usr/java/jdk1.8.0_45',
  $jvm_xms      = '4096m',
  $jvm_xmx      = '8192m',
  $jvm_optional = '-XX:-HeapDumpOnOutOfMemoryError',
  $java_opts    = '',


  # Manage service
  $service_manage = true,
  $service_ensure = running,


) {

  if $jira::db != 'postgresql' and $jira::db != 'mysql' {
    fail('jira db parameter must be postgresql or mysql')
  }

  $webappdir    = "${installdir}/atlassian-${product}-${version}-standalone"
  $dburl        = "jdbc:${db}://${dbserver}:${dbport}/${dbname}"

  include jira::install
  include jira::config
  include jira::service

}

[install.pp]

class jira::install {

  require jira
  require deploy

  user { $jira::user:
    comment          => 'Jira daemon account',
    shell            => '/bin/true',
    home             => $jira::homedir,
    password         => '*',
    password_min_age => '0',
    password_max_age => '99999',
    managehome       => true,
  } ->

  file { $jira::installdir:
    ensure  => 'directory',
    owner   => $jira::user,
    group   => $jira::group,
  }

  deploy::file { "atlassian-${jira::product}-${jira::version}.${jira::format}":
    target          => "${jira::installdir}/atlassian-${jira::product}-${jira::version}-standalone",
    url             => $jira::downloadURL,
    strip           => true,
    download_timout => 1800,
    owner           => $jira::user,
    group           => $jira::group,
    notify          => Exec["chown_${jira::webappdir}"],
  } ->

  file { $jira::homedir:
    ensure  => 'directory',
    owner   => $jira::user,
    group   => $jira::group,
  } ->

  file { "${jira::homedir}/import":
    ensure  => 'directory',
    mode    => 777
  } ->

  file { "${jira::homedir}/import/mail":
    ensure  => 'directory',
    mode    => 777
  } ->

  exec { "chown_${jira::webappdir}":
    command     => "/bin/chown -R ${jira::user}:${jira::group} ${jira::webappdir}",
    refreshonly => true,
    subscribe   => User[$jira::user]
  } ->


  file { "${jira::webappdir}/logs/old":
    ensure  => 'directory',
    owner   => $jira::user,
    group   => $jira::group,
  }

  file { '/etc/init.d/jira':
    content => template('jira/etc/rc.d/init.d/jira.erb'),
    mode    => '0755',
  }


  logrotate::rule { 'jira_catalina':
    ensure         => 'present',
    path           => "${jira::webappdir}/logs/catalina.*",
    olddir         => "${jira::webappdir}/logs/old",
    rotate         => 30,
    rotate_every   => 'day',
    size           => '500M',
    compress       => true,
    copytruncate   => true,
    missingok      => true,
  }

}
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-18 17:05:13 -0500

GregLarkin gravatar image

Please check the answer to: http://ask.puppetlabs.com/question/17274/jira-module-two-pp-files/

I think all of your questions are related and have to do with understanding the module directory layout. The documentation mentioned in my previous answer will describe how to organize your modules, including .pp files, static files and template files.

edit flag offensive delete link more

Comments

you are right. I'm just starting learn how to use and write modules.

pup-master gravatar imagepup-master ( 2015-05-18 17:23:34 -0500 )edit

please ignore this one as it is a duplicate, but I should focus on ""http://ask.puppetlabs.com/question/17274/jira-module-two-pp-files/"

pup-master gravatar imagepup-master ( 2015-05-18 17:33:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-15 13:02:12 -0500

Seen: 239 times

Last updated: May 18 '15