Puppet Class: confluence
- Defined in:
- manifests/init.pp
Overview
Class: confluence
Install confluence, See README.md for more.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'manifests/init.pp', line 5
class confluence (
# JVM Settings
$javahome,
$jvm_xms = '256m',
$jvm_xmx = '1024m',
$jvm_permgen = '256m',
$java_opts = '',
# Confluence Settings
$version = '5.5.6',
$product = 'confluence',
$format = 'tar.gz',
$installdir = '/opt/confluence',
$homedir = '/home/confluence',
$user = 'confluence',
$group = 'confluence',
$uid = undef,
$gid = undef,
$shell = '/bin/true',
# Misc Settings
$downloadURL = 'http://www.atlassian.com/software/confluence/downloads/binary',
# Choose whether to use nanliu-staging, or mkrakowitzer-deploy
# Defaults to nanliu-staging as it is puppetlabs approved.
$staging_or_deploy = 'staging',
# Manage confluence server
$manage_service = true,
# Tomcat Tunables
# Should we use augeas to manage server.xml or a template file
$manage_server_xml = 'augeas',
$tomcat_port = 8090,
$tomcat_max_threads = 150,
$tomcat_accept_count = 100,
# Reverse https proxy setting for tomcat
$tomcat_proxy = {},
# Any additional tomcat params for server.xml
$tomcat_extras = {},
# Command to stop confluence in preparation to updgrade. This is configurable
# incase the confluence service is managed outside of puppet. eg: using the
# puppetlabs-corosync module: 'crm resource stop confluence && sleep 15'
$stop_confluence = 'service confluence stop && sleep 15',
# Enable confluence version fact for running instance
# This required for upgrades
$facts_ensure = 'present',
) {
validate_re($version, '^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)(|[a-z])$')
validate_absolute_path($installdir)
validate_absolute_path($homedir)
validate_re($manage_server_xml, ['^augeas$', '^template$' ],
'manage_server_xml must be "augeas" or "template"')
validate_hash($tomcat_proxy)
validate_hash($tomcat_extras)
Exec { path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ] }
$webappdir = "${installdir}/atlassian-${product}-${version}"
if $::confluence_version {
# If the running version of CONFLUENCE is less than the expected version of CONFLUENCE
# Shut it down in preparation for upgrade.
if versioncmp($version, $::confluence_version) > 0 {
notify { 'Attempting to upgrade CONFLUENCE': }
exec { $stop_confluence: before => Anchor['confluence::start'] }
}
}
anchor { 'confluence::start':
} ->
class { 'confluence::facts':
} ->
class { 'confluence::install':
} ->
class { 'confluence::config':
} ~>
class { 'confluence::service':
} ->
anchor { 'confluence::end': }
}
|