GithubHelp home page GithubHelp logo

voxpupuli / puppet-confluence Goto Github PK

View Code? Open in Web Editor NEW
20.0 44.0 76.0 452 KB

A puppet module to install confluence

Home Page: https://forge.puppet.com/puppet/confluence

License: MIT License

Ruby 55.07% Puppet 26.70% HTML 15.51% Shell 2.62% Pascal 0.09%
linux-puppet-module puppet hacktoberfest centos-puppet-module debian-puppet-module redhat-puppet-module ubuntu-puppet-module

puppet-confluence's Introduction

puppet-confluence

Build Status Code Coverage Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores

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 Confluence
  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

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.

⚠️ 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::catalina_opts:
  - -Dconfluence.cluster.node.name=%{hostname}
  - -Dconfluence.upgrade.recovery.file.enabled=false
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 binaries
  • confluence::config: Modifies Confluence/tomcat configuration files
  • confluence::service: Manage the Confluence service
  • confluence::facts: Class to get the running version of confluence
  • confluence::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: ''

catalina_opts

Additional catalina options can be specified either as a simple string or array of strings. 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

The md5 checksum of the archive file. Only supported with deploy_module => archive. Defaults to 'undef'.

proxy_server

Specify a proxy server, with port number if needed. ie: https://example.com:8080. Only supported with deploy_module => archive (the default). Defaults to 'undef'.

proxy_type

Proxy server type (none|http|https|ftp) Only supported with deploy_module => archive (the default). 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.

mysql_connector_version

Specify the version of mysql_connector_version you want to use. Defaults to 5.1.47.

mysql_connector_install

Specify where you want to install mysql connector . Defaults to /opt/MySQL-connector

mysql_connector

Should the module deploy mysql_connector for mysql databases ? . Default to false

Limitations

  • Puppet 5.5.8 or newer

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

  • RedHat / CentOS 6/7
  • Ubuntu 16.04 / 18.04
  • Debian 9

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

puppet-confluence's People

Contributors

alexjfisher avatar bastelfreak avatar bbriggs avatar danifr avatar dhollinger avatar dhoppe avatar dploeger avatar ekohl avatar gerhardsam avatar h-haaks avatar hdep avatar igalic avatar jasonhancock avatar joshbeard avatar juniorsysadmin avatar jyaworski avatar kenyon avatar koendierckx avatar llowder avatar marcofl avatar mkrakowitzer avatar nibalizer avatar oranenj avatar rrotter avatar sacres avatar senax avatar simonhoenscheid avatar smortex avatar tjm avatar zilchms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-confluence's Issues

Where is the template confluence.service.erb

if $::operatingsystemmajrelease == '7' {
  $service_file_location = '/usr/lib/systemd/system/confluence.service'
  $service_file_template = 'confluence/confluence.service.erb'
  $service_lockfile      = '/var/lock/subsys/confluence'

This file seems to be missing, is it a mistake or the file isn't done yet? I'm unable to install confluence on centos7 at the moment.

Need ability to customize `hibernate.connection.url`

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.0.1
  • Ruby: 2.4.1p111
  • Distribution: CentOS
  • Module version: 3.1.0

What are you seeing

There is no way to customize hibernate.connection.url.

What behaviour did you expect instead

I'd like to be able to set <property name="hibernate.connection.url"> to use SSL (i.e., adding ?ssl=true to the URL) inside $homedir/confluence.cfg.xml. This can be currently be done (in a somewhat blunt fashion) with the dburl setting in your jira module, for example.

Any additional information you'd like to impart

In README.md, the Hiera example shows

confluence::dbserver:       'dbvip.example.co.za'

However, i can't find dbserver in the codebase, so it doesn't look like this would work.

Support for AJP

Adding support for mod_jk / ajp proxies would be very useful and already exists in the puppet-jira module.

Support for Puppet 4

Hello,

Can Confirm this module is not working with Puppet 4.2.1. Any idea when it will be? Happy to help in any way.

Thanks.

User 'confluence' isn't being created in /etc/passwd

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.3.5
  • Ruby: 2.0.0p648
  • Distribution: Puppet Enterprise
  • Module version: 3.1.1

How to reproduce (e.g Puppet code you use)

I installed Confluence with this configuration (after a successful MySQL and JIRA installations):

  class { 'confluence':
    manage_user         => true,
    installdir          => '/opt/atlassian-confluence',
    javahome            => '/usr/java/default',
  }

What are you seeing

For some reason, the module doesn't create user confluence in the /etc/passwd directory, which results in these failures:

Notice: /Stage[main]/Confluence::Install/Group[confluence]/ensure: created
Error: Could not set comment on user[confluence]: Execution of '/sbin/usermod -c Confluence daemon account confluence' returned 6: usermod: user 'confluence' does not exist in /etc/passwd
Error: /Stage[main]/Confluence::Install/User[confluence]/comment: change from 'confluence' to 'Confluence daemon account' failed: Could not set comment on user[confluence]: Execution of '/sbin/usermod -c Confluence daemon account confluence' returned 6: usermod: user 'confluence' does not exist in /etc/passwd
Error: Could not set shell on user[confluence]: Execution of '/sbin/usermod -s /bin/true confluence' returned 6: usermod: user 'confluence' does not exist in /etc/passwd
Error: /Stage[main]/Confluence::Install/User[confluence]/shell: change from '/bin/sh' to '/bin/true' failed: Could not set shell on user[confluence]: Execution of '/sbin/usermod -s /bin/true confluence' returned 6: usermod: user 'confluence' does not exist in /etc/passwd
Error: Could not set password on user[confluence]: Execution of '/sbin/usermod -p * confluence' returned 6: usermod: user 'confluence' does not exist in /etc/passwd
Error: /Stage[main]/Confluence::Install/User[confluence]/password: change from [old password hash redacted] to [new password hash redacted] failed: Could not set password on user[confluence]: Execution of '/sbin/usermod -p * confluence' returned 6: usermod: user 'confluence' does not exist in /etc/passwd
Error: Could not set password_min_age on user[confluence]: Execution of '/bin/chage -m 0 confluence' returned 1: chage: user 'confluence' does not exist in /etc/passwd
Error: /Stage[main]/Confluence::Install/User[confluence]/password_min_age: change from 'absent' to 0 failed: Could not set password_min_age on user[confluence]: Execution of '/bin/chage -m 0 confluence' returned 1: chage: user 'confluence' does not exist in /etc/passwd
Error: Could not set password_max_age on user[confluence]: Execution of '/bin/chage -M 99999 confluence' returned 1: chage: user 'confluence' does not exist in /etc/passwd
Error: /Stage[main]/Confluence::Install/User[confluence]/password_max_age: change from 'absent' to 99999 failed: Could not set password_max_age on user[confluence]: Execution of '/bin/chage -M 99999 confluence' returned 1: chage: user 'confluence' does not exist in /etc/passwd

What behaviour did you expect instead

I expected no errors, and /etc/passwd to contain user confluence, and Confluence to install without a problem.

I'm using the similar module for JIRA, and user jira is being created without a problem.

confluence.home isn't set if data_dir isn't parameter isn't set

When data_dir isn't set, the confluence.home value in confluence-init.properties is set to an empty string

<% if scope.lookupvar('confluence::data_dir') -%>
confluence.home=<%= scope.lookupvar('confluence::data_dir') %>
<% else %>
confluence.home=<%= scope.lookupvar('confluence::homedir') %>
<% end %>

tests with current master branch:
https://travis-ci.org/kpankonen/puppet-confluence/builds/199455533

tests using scope.lookupvar('confluence::data_dir').empty?
https://travis-ci.org/voxpupuli/puppet-confluence/builds/201574776

Confluence being restarted every puppet run

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 1.9.1
  • Ruby: n/a
  • Distribution: CentOS 7
  • Module version: commit dc96ab3

How to reproduce (e.g Puppet code you use)

  java::oracle { 'jdk8' :
    ensure  => 'present',
    version => '8',
    java_se => 'jdk',
  }

  class { "confluence":
    version        => '6.0.4',
    javahome       => "/usr/java/jdk1.8.0_51",
    jvm_xms        => '3G',
    jvm_xmx        => '7G',
    jvm_permgen    => '512m',
    tomcat_proxy   => {
      scheme       => 'https',
      proxyName    => 'wiki.domain.org',
      proxyPort    => '443',
    },
  }

Then apply:

  java::oracle { 'jdk8' :
    ensure  => 'present',
    version => '8',
    java_se => 'jdk',
  }

  class { "confluence":
    version        => '6.0.6',
    javahome       => "/usr/java/jdk1.8.0_51",
    jvm_xms        => '3G',
    jvm_xmx        => '7G',
    jvm_permgen    => '512m',
    tomcat_proxy   => {
      scheme       => 'https',
      proxyName    => 'wiki.domain.org',
      proxyPort    => '443',
    },
  }

What are you seeing

Confluence is being restarted every puppet run after an upgrade

What behaviour did you expect instead

Restart only for the upgrade

Output log

notice 	Puppet 	Attempting to upgrade CONFLUENCE
notice 	/Stage[main]/Confluence/Notify[Attempting to upgrade CONFLUENCE]/message 	defined 'message' as 'Attempting to upgrade CONFLUENCE'
notice 	/Stage[main]/Confluence/Exec[service confluence stop && sleep 15]/returns 	executed successfully
notice 	/Stage[main]/Confluence::Service/Service[confluence]/ensure 	ensure changed 'stopped' to 'running'

Any additional information you'd like to impart

I removed the offending lines locally to bypass the constant restart.

Clean install fails

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet Enterprise 2016.1
  • RHEL 7 x64
  • Latest 2.2.1 confluence module release
  • Confluence version 5.10.0

What are you seeing

With Puppet 4 the confluence_version fact will exist, and always evaluate such that it tries to do an upgrade. This triggers a deployment failure because it can't stop the service.

setenv.sh is being broken by the puppet-confluence module

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.3.5
  • Ruby: ruby 2.0.0p648
  • Distribution: Redhat Linux
  • Module version: 3.1.1

How to reproduce (e.g Puppet code you use)

  class { 'confluence':
    version             => '6.8.1',
    user                => 'confluenceuser',
    uid                 => '3200',
    installdir          => '/opt/atlassian-confluence',
    homedir             => '/atlassian_tools_data/confluence',
    javahome            => '/usr/java/default',
    manage_service      => false,
    tomcat_proxy        => {
      scheme     => 'https',
      proxyName  => $hostname,
      proxyPort  => '443',
    }
  }

What are you seeing

It all installed fine, and confluence came up as expected and appeared to behave well. But, the websocket mechanism for simultaneous editing didn't work. After researching with Atlassian, they said my setenv.sh file had been changed from their version. And, they're right, it looks like the puppet-confluence module has changing the file a lot, and leading to the websocket configuration to break. Here's the diff for the file:

# diff puppet_changed_setenv.sh atlassian_shipped_setenv.sh
1,13c1
< #
< # The following 2 settings control the minimum and maximum given to the Confluence Java virtual machine.  In larger Confluence instances, the maximum amount will need to be increased.
< #
< JVM_MINIMUM_MEMORY="256m"
< JVM_MAXIMUM_MEMORY="1024m"
< JVM_PERMGEN_MEMORY="256m"
<
< #
< # Additional JAVA_OPTS
< #
< JAVA_OPTS=" $JAVA_OPTS"
< JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} -XX:MaxPermSize=${JVM_PERMGEN_MEMORY} $JAVA_OPTS -Djava.awt.headless=true "
< export JAVA_OPTS
---
> # See the CATALINA_OPTS below for tuning the JVM arguments used to start Confluence.
15c3
< echo "If you encounter issues starting up Confluence Standalone, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide"
---
> echo "If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide"
48a37,77
> # IMPORTANT NOTE: Only set JAVA_HOME or JRE_HOME above this line
> # Get standard Java environment variables
> if $os400; then
>   # -r will Only work on the os400 if the files are:
>   # 1. owned by the user
>   # 2. owned by the PRIMARY group of the user
>   # this will not work if the user belongs in secondary groups
>   . "$CATALINA_HOME"/bin/setjre.sh
> else
>   if [ -r "$CATALINA_HOME"/bin/setjre.sh ]; then
>     . "$CATALINA_HOME"/bin/setjre.sh
>   else
>     echo "Cannot find $CATALINA_HOME/bin/setjre.sh"
>     echo "This file is needed to run this program"
>     exit 1
>   fi
> fi
>
> echo "---------------------------------------------------------------------------"
> echo "Using Java: $JRE_HOME/bin/java"
> CONFLUENCE_CONTEXT_PATH=`$JRE_HOME/bin/java -jar $CATALINA_HOME/bin/confluence-context-path-extractor.jar $CATALINA_HOME`
> export CONFLUENCE_CONTEXT_PATH
> $JRE_HOME/bin/java -jar $CATALINA_HOME/bin/synchrony-proxy-watchdog.jar $CATALINA_HOME
> echo "---------------------------------------------------------------------------"
>
> # Set the JVM arguments used to start Confluence. For a description of the options, see
> # http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
> CATALINA_OPTS="-XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution ${CATALINA_OPTS}"
> CATALINA_OPTS="-Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M ${CATALINA_OPTS}"
> CATALINA_OPTS="-XX:G1ReservePercent=20 ${CATALINA_OPTS}"
> CATALINA_OPTS="-Djava.awt.headless=true ${CATALINA_OPTS}"
> CATALINA_OPTS="-Datlassian.plugins.enable.wait=300 ${CATALINA_OPTS}"
> CATALINA_OPTS="-Xms1024m -Xmx1024m -XX:+UseG1GC ${CATALINA_OPTS}"
> CATALINA_OPTS="-Dsynchrony.enable.xhr.fallback=true ${CATALINA_OPTS}"
> CATALINA_OPTS="-Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 ${CATALINA_OPTS}"
> CATALINA_OPTS="${START_CONFLUENCE_JAVA_OPTS} ${CATALINA_OPTS}"
> CATALINA_OPTS="-Dconfluence.context.path=${CONFLUENCE_CONTEXT_PATH} ${CATALINA_OPTS}"
>
>
> export CATALINA_OPTS
>

What behaviour did you expect instead

I expected minimal changes to setenv.sh, if any, and the websockets to work as expected, so users can do simultaneous editing.

Output log

Any additional information you'd like to impart

check debian support

this module once listed debian 7 in the metadata.json. We removed it because it's EOL. We need to check if recent debian versions work and add them back.

example request

Apologies in-advance, I was not sure where to post a question about configuration example...

I would like to configure SSL on the embedded tomcat instance that comes with Confluence, Is that possible with this module and if so, can I get an example?

I have a keystore file with Certs which are signed by our internal CA, I'm currently just placing the keystore file in:
/data/apps/confluence-install/atlassian-confluence-${::confluence_version}/conf/atlassian_keystore.jks

The part that i'm confused about, is the syntax for the confluence module to manage the server.xml file to point it to this keystore file and pass it its password.

If this is the wrong place for this question (likely), please let me know where I should post it.

Cheers and Happy Easter!

Something wrong in puppet-confluence/manifests/init.pp

Looking at the puppet-confluence/manifests/init.pp file, on line 14, something seems wrong, maybe a copy and paste operation in creating file changes went wrong.

Received the following error using this module with puppet 3.8.7:
Error: Syntax error at 'Pattern'; expected ')' at /vagrant/puppet/modules/confluence/manifests/init.pp:14

Thanks,
Jay

openjdk 11 - UseGCLogFileRotation not accepted in the JVM

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.10
  • Ruby:
  • Distribution: CentOS 7.7
  • Module version: 3.2.0

How to reproduce (e.g Puppet code you use)

Use openjdk 11. Namely

class { 'java':
    package => 'java-11-openjdk',
}

...

class { 'confluence':
    version           => $confversion,
    installdir        => '/opt/atlassian',
    homedir           => '/data/confluence-home',
    javahome          => $facts['java_default_home'],
    jvm_xmx           => '10G',
    jvm_xms           => '2G',
    java_opts         => '-XX:MaxMetaspaceSize=512m -XX:+UseG1GC -Dconfluence.upgrade.recovery.file.enabled=false -Dsynchrony.proxy.healthcheck.disabled -Dsynchrony.memory.max=3G -Dsynchrony.enable.xhr.fallback=true -Datlassian.plugins.enable.wait=300',
    manage_server_xml => 'template',
    tomcat_proxy      => {
            scheme    => 'https',
            proxyName => 'localhost',
            proxyPort => '8009',
    },
}

What are you seeing

Puppet can run but confluence can't.

The problem that confluence notify is the following:

NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
[0.001s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/opt/atlassian/atlassian-confluence-7.1.1/logs/gc-2020-01-29_16-51-35.log instead.
Unrecognized VM option 'UseGCLogFileRotation'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

In: /opt/atlassian/atlassian-confluence-7.1.1/logs/catalina.out

What behaviour did you expect instead

That confluence could work.

Output log

Any additional information you'd like to impart

We used the module version 3.0.0 , there the log option is not reported.
In the version 3.2.0 there is, here: https://github.com/voxpupuli/puppet-confluence/blob/v3.2.0/templates/setenv.sh.erb#L85

My request is whether the module could have

  • either setenv.sh compatible with openjdk 11
  • or a setenv.sh that can be controlled with more granularity, so that one can override default decisions.

If curl download times out, curl isn't terminated, partial download isn't removed & next run fails.

If the curl download of confluence tgz isn't successful, it appears that any partially downloaded file isn't removed and the curl background process isn't killed. (This is probably a Staging module bug, rather than Confluence module bug).

When reattempting puppet apply, instead of reattempting the download, it sees the partially downloaded (corrupt/incomplete) file and starts extracting it before failing.

If the files are removed (e.g. rm -r /opt/confluence /opt/staging/confluence) and puppet re-run; multiple curl processes then appear to be running.

Add support for handling archive permisions on hardened servers

The module downloads the file as the puppet user (in this case root) and then attempts to untar the module as the confluence user. This fails if the server is hardened and restricts permissions on downloaded files. We have to work around this by adding the following heira:

system::execs:
    chown_jira_tarball:
        command: /bin/chown -R confluence:confluence /opt/staging/
        unless: /usr/bin/stat -c "%U:%G" /opt/staging/jira/atlassian-confluence-5.7.4.tar.gz | /bin/grep confluence:confluence
        require: Staging::File[atlassian-confluence-5.7.4.tar.gz]
        before: Exec[extract atlassian-confluence-5.7.4.tar.gz]

It would be good if the module handled this itself by explicitly ensuring the archive permission are correct before attempting the extract.

This is also the case for confluence and I'll raise it there as well.

Error in /etc/facter/facts.d/confluence_facts.sh - [[: not found

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: all
  • Ruby: all
  • Distribution: Ubuntu 14.04
  • Module version: 2.2.2

How to reproduce (e.g Puppet code you use)

Do a puppet run

What are you seeing

>puppet agent --test --noop
/etc/facter/facts.d/confluence_facts.sh: 13: /etc/facter/facts.d/confluence_facts.sh: [[: not found
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
/etc/facter/facts.d/confluence_facts.sh: 13: /etc/facter/facts.d/confluence_facts.sh: [[: not found
Info: Caching catalog for confluence.example.com
Info: Applying configuration version '1473250250'
Notice: Finished catalog run in 5.67 seconds

What behaviour did you expect instead

No bash errors ;)

Output log

Any additional information you'd like to impart

[[ is a bash buildin. Either change the shebang to #!/bin/bash or use [ instead of [[.

Confluence version 7.4.0 and new Tomcat version does not work out-of-the-box

Affected Puppet, Ruby, OS and module versions/distributions

  • Module version: 3.2.0

How to reproduce (e.g Puppet code you use)

Install Confluence version 7.4.0 with this module

What are you seeing

catalina.out: Caused by: java.lang.IllegalArgumentException: The AJP Connector is configured with secretRequired="true" but the secret attribute is either null or "". This combination is not valid.

What behaviour did you expect instead

no error about secretRequired="true"

Any additional information you'd like to impart

After consulting my favoured search engine it seems that Tomcat introduced a new default behaviour around March 2020 which requires to pass a secret to the AJP connector or to disable the security feature with secretRequired="false".

As I am no expert in Tomcat configurations I do not know which changes need to be done in the module to get the Tomcat working within this module. Just disabling the feature by setting it to false in server.xml seems a bad idea as some sources in the internet refer to a CVE called Ghostcat (see dev.lucee.org/t/tomcat-cve-2020-1938-ghostcat-ajp/6650/4).

archive module requirement

As we are still in the process of abandoning the module camptocamp/archive, we cannot use puppet/archive ATM.
So using puppet/staging would be a good alternative for now.
But unfortunately, puppet/archive is always included: https://github.com/voxpupuli/puppet-confluence/blob/master/manifests/install.pp#L7

A "require archive" in the archive case (https://github.com/voxpupuli/puppet-confluence/blob/master/manifests/install.pp#L70) might help in this case.
Could this be implemented?

Support the mysql connector natively

In your jira module you have a "jira::mysql_connector" class that downloads the needed mysql java bindings. Can you do the same thing with this module so that the mysql java tools don't need to be manually installed?

Erb Templates are left behind at tag 2.1.1

I just realize that some templates on the current master, are left behind at tag 2.1.1

Example . Here is my Puppetfile

forge "https://forgeapi.puppetlabs.com"
mod "puppet/confluence" ,"2.1.1"

I do librarian-puppet install --verbose then I cd to ...modules/confluence/templates look for erb templates:

crowd.properties
confluence.service.erb

And the are missing. Anyway the module works perfectly just want to point that out.

Solution is to add to the Puppetfile, to retrive module from github.

forge "https://forgeapi.puppetlabs.com"

mod 'confluence',
:git => "https://github.com/voxpupuli/puppet-confluence.git"

Thanks in advance.

Support for debian jessie

/etc/init.d/confluence start

[....] Starting confluence (via systemctl): confluence.serviceFailed to start confluence.service: Unit confluence.service failed to load: No such file or directory.
 failed!

Please add support for debian jessie.

Spec tests must populate the $facts hash now

The puppet-archive module now uses the $facts hash, which we don't set in our own spec tests. That means that all tests have spurious failures now.

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet:
  • Ruby:
  • Distribution:
  • Module version:

How to reproduce (e.g Puppet code you use)

What are you seeing

What behaviour did you expect instead

Output log

Any additional information you'd like to impart

Should default to https for Confluence download URL

As it's pulling down executable code, the use of http (unauthenticated server) for downloading Confluence tgz is insecure and open to MITM abuse. This is a bigger issue too because puppet's extracts etc are often running as a privileged user and there's no checksum/integrity verification available on the downloads (i.e. sha256sum's aren't published).

Recommend changing default:
downloadURL => 'http://www.atlassian.com/software/confluence/downloads/binary/'
to
downloadURL => 'https://www.atlassian.com/software/confluence/downloads/binary/'

I understand http might occasionally be preferable to achieve web proxy cache hits for download performance. I've commented on https://jira.atlassian.com/browse/CONF-25687 and voted for getting sha256sum's published (over https), so http downloads might become an option again in future.

Add tomcat SSL Support

This issue is basically the same as #38

Can you add SSL support as you have with the puppet-community/jira puppet module? Specifically adding the keystore related parameters? Meaning, updating server.xml with the required ssl connector?

This would really be useful to have, any chance for an update?

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.17
  • Ruby:
  • Distribution: RHEL 7.7
  • Module version: 3.2.0

Support for the binary installer?

I had a look through this module to install Confluence and I notice it has dependencies for managing the tar download and unpacking.

Have you considered supporting an installation using the binary installer?

I wrote a simple expect script which runs through the initial installation questions. It saves a fair amount of code and extra dependencies.

I could contribute it if you think it would be suitable.

Parameter name in README is wrong

Affected Puppet, Ruby, OS and module versions/distributions

None. This is a documentation issue

What are you seeing

Complex example shows:

  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'
    proxy          => {
      scheme       => 'https',
      proxyName    => 'confluence.example.co.za',
      proxyPort    => '443',
    },
  }

What behaviour did you expect instead

Complex example should show:

  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',
    },
  }

How did this behaviour get triggered

Output log

Any additional information you'd like to impart

I have fixed this in a fork but wasn't sure if it was worth making a PR for. If it is, let me know and I'll make it.

Support Ubuntu 18.04

case $facts['os']['release']['major'] {
/^16.04$/: {
$service_file_location = '/etc/systemd/system/confluence.service'
$service_file_template = 'confluence/confluence.service.erb'
$service_lockfile = '/var/lock/subsys/confluence'
$refresh_systemd = true
}
default: {
$service_file_location = '/etc/init.d/confluence'
$service_file_template = 'confluence/confluence.initscript.erb'
$service_lockfile = '/var/lock/confluence'
$refresh_systemd = false
}
}

This breaks a little bit on Ubuntu 18.04 ;)

Add SSL Support

Can you add SSL support as you have with the puppet-community/jira puppet module? Specifically adding the keystore related parameters? Meaning, updating server.xml with the required ssl connector?

mysql connector not found where module is looking for it

What are you seeing

Error: /Stage[main]/Confluence::Mysql_connector/File[/opt/atlassian/atlassian-confluence/atlassian-confluence-7.7.2/confluence/WEB-INF/lib/mysql-connector-java-5.1.49-bin.jar]: Could not evaluate: Could not retrieve information from environment production source(s) file:///opt/MySQL-connector/mysql-connector-java-5.1.49-bin.jar

Path is wrong: /opt/MySQL-connector/mysql-connector-java-5.1.49/mysql-connector-java-5.1.49-bin.jar is correct

What behaviour did you expect instead

/Stage[main]/Confluence::Mysql_connector/File[/opt/atlassian/atlassian-confluence/atlassian-confluence-7.7.2/confluence/WEB-INF/lib/mysql-connector-java-5.1.49-bin.jar]/ensure: defined content as '{md5}99a4ac21fdb1513176b5a273160f99f2'

No database support

Is there any reason why you have left out support for configuring Confluence to use a postgres/mysql database as you have done with your Jira module? (which works great btw).

Need ability to set context path.

As it stands right now there is no way to set the Context path with this module, as the template file does not support it.
Thanks,
Stephen

Make MaxPermSize parameter configurable

java option MaxPermSize value should be configurable.

Workaround: Add -XX:MaxPermSize=XXXm to java_opts. The downside to this is that it appears twice in the java command, the second value, which is the one that comes from the java_opts parameter is observed.

$data_dir should be documented in ReadMe

When trying to install Confluence 6.1.1, I kept getting "spring application context has not been set" errors when starting confluence.

It turns out that the $data_dir variable is set to undef unless you set it with a variable. As the module stands now, it seems like this MUST be set in order for it to work.

But there is no mention of it in the documentation.

spec tests fail when run on non-Debian OSes

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: any
  • Ruby: any
  • Distribution: any
  • Module version: any

How to reproduce

On a non-Debain OS (I used Fedora), run

SPEC_OPTS=--fail-fast PUPPET_VERSION="~> 4.0" bundle exec rake spec_standalone

What are you seeing

Test failures not seen on Travis:

     RuntimeError:
       Could not find the daemon directory (tested [/etc/sv,/var/lib/service])

What behaviour did you expect instead

The spec tests should run consistently regardless of the OS

Output log

SPEC_OPTS=--fail-fast PUPPET_VERSION="~> 4.0" bundle exec rake spec_standalone

Could not find semantic_puppet gem, falling back to internal functionality. Version checks may be less robust.
/home/op-ct/.rvm/rubies/ruby-2.1.9/bin/ruby -I/home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-core-3.6.0/lib:/home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-support-3.6.0/lib /home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-core-3.6.0/exe/rspec --pattern spec/\{aliases,classes,defines,unit,functions,hosts,integration,type_aliases,types\}/\*\*/\*_spec.rb --color
�[32m[Coveralls] Set up the SimpleCov formatter.�[0m
�[32m[Coveralls] Using SimpleCov's default settings.�[0m

confluence
  confluence::config
    default params
      should compile into a catalogue without dependency cycles (FAILED - 1)

Failures:

  1) confluence confluence::config default params should compile into a catalogue without dependency cycles
     Failure/Error: it { is_expected.to compile.with_all_deps }

     RuntimeError:
       Could not find the daemon directory (tested [/etc/sv,/var/lib/service])
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/provider/service/runit.rb:50:in `defpath'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/type/service.rb:180:in `block (3 levels) in <module:Puppet>'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/type.rb:834:in `set_default'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-puppet-2.6.8/lib/rspec-puppet/monkey_patches.rb:67:in `call'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-puppet-2.6.8/lib/rspec-puppet/monkey_patches.rb:67:in `block in <class:Type>'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/type.rb:2505:in `block in set_parameters'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/type.rb:2504:in `each'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/type.rb:2504:in `set_parameters'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/type.rb:2401:in `initialize'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/resource.rb:524:in `new'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/resource.rb:524:in `to_ral'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/resource/catalog.rb:633:in `block in to_catalog'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/resource/catalog.rb:625:in `each'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/resource/catalog.rb:625:in `to_catalog'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/puppet-4.10.7/lib/puppet/resource/catalog.rb:506:in `to_ral'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-puppet-2.6.8/lib/rspec-puppet/matchers/compile.rb:142:in `cycles_found?'
     # /home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-puppet-2.6.8/lib/rspec-puppet/matchers/compile.rb:25:in `matches?'
     # ./spec/classes/confluence_config_spec.rb:20:in `block (4 levels) in <top (required)>'

Finished in 1.64 seconds (files took 1.43 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/classes/confluence_config_spec.rb:20 # confluence confluence::config default params should compile into a catalogue without dependency cycles


Total resources:   20
Touched resources: 0
Resource coverage:  0.00%
Untouched resources:

  Anchor[confluence::end]
  Anchor[confluence::start]
  Archive[/tmp/atlassian-confluence-5.5.6.tar.gz]
  Augeas[/opt/confluence/atlassian-confluence-5.5.6/conf/server.xml]
  Class[Confluence::Config]
  Class[Confluence::Facts]
  Class[Confluence::Install]
  Class[Confluence::Params]
  Class[Confluence::Service]
  Exec[chown_/opt/confluence/atlassian-confluence-5.5.6]
  File[/etc/facter/facts.d/confluence_facts.sh]
  File[/etc/init.d/confluence]
  File[/home/confluence]
  File[/opt/confluence/atlassian-confluence-5.5.6/bin/setenv.sh]
  File[/opt/confluence/atlassian-confluence-5.5.6/confluence/WEB-INF/classes/confluence-init.properties]
  File[/opt/confluence/atlassian-confluence-5.5.6]
  File[/opt/confluence]
  Group[confluence]
  Service[confluence]
  User[confluence]
�[33m[Coveralls] Outside the CI environment, not sending data.�[0m
/home/op-ct/.rvm/rubies/ruby-2.1.9/bin/ruby -I/home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-core-3.6.0/lib:/home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-support-3.6.0/lib /home/op-ct/.rvm/gems/ruby-2.1.9/gems/rspec-core-3.6.0/exe/rspec --pattern spec/\{aliases,classes,defines,unit,functions,hosts,integration,type_aliases,types\}/\*\*/\*_spec.rb --color failed

Any additional information you'd like to impart

  • The default facts in spec/spec_helper.rb refer to Debian, but the facts in each spec test sparsely model Redhat.
  • It would be great if the spec tests covered factsets sampled from each OS supported in metadata.json

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.