Version information
This version is compatible with:
- Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 3.8.7 < 5.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-confluence', '2.3.0'Learn more about managing modules with a PuppetfileDocumentation
puppet-confluence
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with Confluence
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
This is a puppet module to install and handle upgrades of Atlassian Confluence. Confluence is team collaboration software.
Module Description
This module installs/upgrades Atlassian Confluence. The Confluence module also manages the Confluence configuration files with Puppet.
Setup
Confluence Prerequisites
- Confluence require 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 1.7 and 1.8 are currently supported by Atlassian.
:warning: There's a known issue with Java 1.8.0_25 and 1.8.0_31, and another known issue with 1.7.0_25 and 1.7.0_45. Atlassian don't recommend running Confluence on these versions.
- Confluence requires a relational database to store its configuration data. Unfortunatly it is not possible to do the initial configuration (Database setup) of confluence with puppet (See issue #3 - No database support ). The configuration needs to be done via the web GUI.
What Confluence affects
If installing to an existing Confluence instance, it is your responsibility to backup your database. We also recommend that you backup your Confluence home directory and that you align your current Confluence version with the version you intend to use with puppet Confluence module.
You must have your database setup with the account user that Confluence will use. This can be done using the puppetlabs-postgresql and puppetlabs-mysql modules.
When using this module to upgrade Confluence, please make sure you have a database/Confluence home backup.
The following resources are potentially effected by this module:
- confluence user
- confluence init script
- setenv.sh
- confluence-init.properties
- server.xml
Beginning with Confluence
This puppet module will automatically download the Confluence tar.gz from Atlassian and extracts it into /opt/confluence/atlassian-confluence-$version. The default Confluence home is /home/confluence.
class { 'confluence':
javahome => '/opt/java',
}
Usage
This module also allows for direct customization of the JVM, following atlassians recommendations
This is especially useful for setting properties such as http/https proxy settings. Support has also been added for reverse proxying confluence via apache or nginx.
A more complex example
class { 'confluence':
version => '5.7.1',
installdir => '/opt/atlassian/atlassian-confluence',
homedir => '/opt/atlassian/application-data/confluence-home',
javahome => '/opt/java',
java_opts => '-Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=3128 -Dhttps.proxyHost=secure-proxy.example.com -Dhttps.proxyPort=3128'
tomcat_proxy => {
scheme => 'https',
proxyName => 'confluence.example.co.za',
proxyPort => '443',
},
}
Hiera example
This example is used in production for 2000+ users in an traditional enterprise environment. Your mileage may vary.
confluence::user: 'confluence'
confluence::group: 'confluence'
confluence::shell: '/bin/bash'
confluence::dbserver: 'dbvip.example.co.za'
confluence::version: '5.7.1'
confluence::installdir: '/opt/atlassian/atlassian-confluence'
confluence::homedir: '/opt/atlassian/application-data/confluence-home'
confluence::javahome: '/opt/java'
confluence::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.*.*.*\|*.example.co.za -XX:+UseLargePages'
confluence::manage_service: false
confluence::tomcat_port: '8090'
confluence::jvm_xms: '4G'
confluence::jvm_xmx: '8G'
confluence::jvm_permgen: '512m'
confluence::download_url: 'http://webserver.example.co.za/pub/software/development-tools/atlassian'
confluence::tomcat_proxy:
scheme: 'https'
proxyName: 'webvip.example.co.za'
proxyPort: '443'
Reference
Classes
Public Classes
confluence: Main class, manages the installation and configuration of Confluence.
Private Classes
confluence::install: Installs Confluence binariesconfluence::config: Modifies Confluence/tomcat configuration filesconfluence::service: Manage the Confluence serviceconfluence::facts: Class to get the running version of confluenceconfluence::params: Default params
Parameters
Confluence parameters
javahome
Specify the java home directory. No assumptions are made re the location of java and therefor this option is required. Default: undef
version
The version of confluence to install. Default: '5.5.6'
format
The format of the file confluence will be installed from. Default: 'tar.gz'
installdir
The installation directory of the confluence binaries. Default: '/opt/confluence'
homedir
The home directory of confluence. Configuration files are stored here. Default: '/home/confluence'
user
The user that confluence should run as, as well as the ownership of confluence related files. Default: 'confluence'
group
The group that confluence files should be owned by. Default: 'confluence'
uid
Specify a uid of the confluence user. Default: undef
gid
Specify a gid of the confluence user. Default: undef
shell
Specify the shell of the confluence user. Default: undef
manage_user
Whether or not to manage the confluence user. Default: true
context_path
Specify context path, defaults to ''. If modified, Once Confluence has started, go to the administration area and click General Configuration. Append the new context path to your base URL.
JVM Java parameters
jvm_xms
The initial memory allocation pool for a Java Virtual Machine. Default: '256m'
jvm_xmx
Maximum memory allocation pool for a Java Virtual Machine. Default: '1024m'
jvm_permgen
Increase max permgen size for a Java Virtual Machine. Default: '256m'
java_opts
Additional java options can be specified here. Default: ''
Tomcat parameters
tomcat_proxy
Reverse https proxy configuration. See customization section for more detail. Default: {}
tomcat_port
Port to listen on, defaults to '8090'
tomcat_max_threads
Defaults to '150'
tomcat_accept_count
Defaults to '100'
tomcat_extras
Any additional tomcat params for server.xml. Takes same format as
tomcat_proxy. Default: {}
Crowd single sign on parameters
enable_sso
Enable crowd single sign on configuration as described in https://confluence.atlassian.com/display/CROWD/Integrating+Crowd+with+Atlassian+Confluence#IntegratingCrowdwithAtlassianConfluence-2.2EnableSSOintegrationwithCrowd(Optional)
application_name
Set crowd application name
application_password
Set crowd application password
application_login_url
Set crowd application login url, where to login into crowd (e.g. https://crowd.example.com/console/)
crowd_server_url
Set crowd application services url, e.g. https://crowd.example.com/services/
crowd_base_url
Set crowd base url, e.g. https://crowd.example.com/
session_isauthenticated
Some more crowd.properties for SSO, see atlassian documentation for details
session_tokenkey
Some more crowd.properties for SSO, see atlassian documentation for details
session_validationinterval
Some more crowd.properties for SSO, see atlassian documentation for details
session_lastvalidation
Some more crowd.properties for SSO, see atlassian documentation for details
Miscellaneous parameters
manage_server_xml
Should we use augeas to manage server.xml or a template file. Defaults to 'augeas'. Operating systems that do not have a support version of Augeas such as Ubuntu 12.04 can use 'template'.
download_url
The URL used to download the JIRA installation file. Defaults to 'https://www.atlassian.com/software/confluence/downloads/binary'
checksum
iThe md5 checksum of the archive file. Only supported with
deploy_module => archive. Defaults to 'undef'
manage_service
Should puppet manage this service? Default: true
deploy_module
Module to use for downloading and extracting archive file. Supports puppet-archive and puppet-staging. Defaults to 'archive'. Archive supports md5 hash checking and Staging supports S3 buckets.
stop_confluence
If the Confluence service is managed outside of puppet the stop_confluence paramater can be used to shut down confluence for upgrades. Defaults to 'service confluence stop && sleep 15'
facts_ensure
Enable external facts for confluence version. Defaults to present.
Limitations
- Puppet 3.8.7+
- Puppet Enterprise
The puppetlabs repositories can be found at: http://yum.puppetlabs.com/ and http://apt.puppetlabs.com/
- RedHat / CentOS 5/6/7
- Ubuntu 12.04 / 14.04
- Debian 7
Operating Systems without an Augueas version >= 1 such as Ubuntu 12.04 must use the paramater:
manage_server_xml => 'template',
We plan to support other Linux distributions and possibly Windows in the near future.
Development
See CONTRIBUTING.md
Contributors
See CONTRIBUTORS
Changelog
2017-02-11 Release 2.3.0
This is the last release with Puppet3 support!
- Make facts.sh sh compatible
- Add additional parameter data_dir for seperate data from home user directory
- Make confluence_version a First Class Fact
- Allow System Group
- Use https instead of http for downloading confluence
- Bump puppet minimum version_requirement to 3.8.7
- Add support for configuring an AJP connector
2016-08-18 Release 2.2.2
- Fix: Issue with a clean puppet 4 based install failure.
- Modulesync with latest Vox Pupuli defaults
2016-05-08 Release 2.2.1
- delete the .pmtignore (is redundant with our .gitignore)
2016-05-08 Release 2.2.0
- Deprecate the downloadURL parameter
- Add a systemd unit file for the RHEL 7 family
- Use a service_file_template variable to reference init scripts
- Add a context_path parameter to manage situations where Confluence is served from a sub-path to the base URL
- Add manage_user parameter
- Fix minimum required stdlib version
- modulesync with voxpupuli defaults
2014-03-22 Release 2.1.1
(this is the first release made under the voxpupuli namespace. Older version were from mkrakowitzer)
- Rewrite README file
- Bump confluence version to 5.7.1
- Update metadata, CHANGELOG to point to new namespace.
- Add .pmtignore file
2014-03-22 Release 2.1.0
Note: This is the final release of this module before it is deprecated with a 999.999.999 version. This module will be moving the the puppet-community namespace on github and the puppet namespace on puppetforge soon.
- Make confluence users shell configurable.
- update README, metadata, .travis.yml
- Add CONTRIBUTING.md and test coverage spec.
2014-01-23 Release 2.0.1
- Resolve issue #22 - confluence_version fact detects wrong version
- Resolve issue #20 - param manage_server_xml acceptCount option is duplicated
2014-01-21 Release 2.0.0
- Replace mkrakowitzer-deploy with nanlui-staging as default for dropping files.
- Add tests
- Resolve issue #7 Make tomcat port / tomcat parameters configurable.
- Add parameter manage_server_xml, tomcat_max_threads, tomcat_accept_count, tomcat_extras.
- Add tests
- rename parameter proxy to tomcat_proxy, port to tomcat_port.
- Add support for STRICT_VARIABLES=yes FUTURE_PARSER=yes
- Resole issue #6 Handle confluence upgrades smoothly
- This will stop confluence if running version is less than manifest version. Attempt to upgrade and then start confluence.
Dependencies
- puppet/archive (>= 1.0.0 < 2.0.0)
- puppet/staging (>= 2.0.1 < 3.0.0)
- puppetlabs/stdlib (>= 4.6.0 < 5.0.0)
