/puppet-crowd

Puppet module for managing Atlassian Crowd

Primary LanguageRuby

puppet-crowd

Puppet Forge Build Status

  1. Overview
  2. Prerequisites
  3. Usage
  4. Reference
  5. Development
  6. Authors and Contributors

Overview

This Puppet module is used to install and configure the crowd application. Atlassian Crowd is a Single Sign-On (SSO) and Identity Management service. https://www.atlassian.com/software/crowd/overview

This module was forked from https://github.com/actionjack/puppet-crowd, which appears to be dormant.

  • Manages the installation of Atlassian Crowd via compressed archive
  • Manages Crowd init script and service
  • Manages user
  • Manages Crowd's Java settings and initial database settings

After installation, you should access Crowd in your browser. The default port is '8095'. Unfortunately, you'll need to step through the installation wizard, providing a license key and some basic configuration.

Prerequisites

Current dependencies are:

  • puppetlabs/stdlib
  • nanliu/staging or puppetcommunity/staging

A Java installation is also required. puppetlabs/java is recommended.

Usage

Examples

Defaults:

class { 'crowd': }

Using PostgreSQL database:

class { 'crowd':
  db           => 'postgres',
  dbuser       => 'crowd',
  dbpassword   => 'secret',
  dbserver     => 'localhost',
  iddb         => 'postgres',
  iddbuser     => 'crowdid',
  iddbpassword => 'secret',
  iddbserver   => 'localhost',
}

Custom Installation:

class { 'crowd':
  installdir   => '/srv/crowd',
  homedir      => '/srv/local/crowd',
  java_home    => '/usr/java/latest',
  download_url => 'http://mirrors.example.com/atlassian/crowd',
  mysql_driver => 'http://mirrors.example.com/mysql/mysql-connector/mysql-connector-java-5.1.36.jar',
}

Reference

Class: crowd

Parameters

version

Default: '2.8.3'

The version of Crowd to download and install. MAJOR.MINOR.PATCH

Refer to https://www.atlassian.com/software/crowd/download

extension

Default: 'tar.gz'

The file extension of the archive to download. This should be .tar.gz or .zip

product

Default: 'crowd'

The product name. This is should be 'crowd'

installdir

Default: '/opt/crowd'

The absolute base path to install Crowd to. Within this path, Crowd will be installed to a sub-directory that matches the version. Something like atlassian-crowd-2.8.3-standalone

homedir

Default: '/var/local/crowd'

The home directory for the crowd user.

tomcat_port

Default: '8095'

The port that Crowd's Tomcat should listen on.

max_threads

Default: '150'

For Crowd's Tomcat setings.

connection_timeout

Default: '20000'

For Crowd's Tomcat setings.

accept_count

Default: '100'

For Crowd's Tomcat setings.

min_spare_threads

Default: '25'

For Crowd's Tomcat setings.

proxy

Default: {}

Optional proxy configuration for Crowd's Tomcat. This is a hash of attributes to pass to the Tomcat connector. Something like the following:

proxy => {
  scheme    => 'https',
  proxyName => 'foo.example.com',
  proxyPort => '443',
}

manage_user

Default: true

Whether this module should manage the user or not.

manage_group

Default: true

Whether this module should manage the group or not.

user

Default: 'crowd'

The user to manage Crowd as.

group

Default: 'crowd'

The group to manage Crowd as.

uid

Default: undef

Optional specified UID to use if managing the user.

gid

Default: undef

Optional specified GID to use if managing the group.

shell

Default: '/sbin/nologin'

The shell that the user should have set, if this module is to manage the user.

password

Default: '*'

A password for the user, if this module is managing the user.

download_driver

Default: true

Whether this module should be responsible for downloading the JDBC driver for MySQL if db is set to mysql.

Refer to https://confluence.atlassian.com/display/CROWD/MySQL for more information.

mysql_driver

Default: 'http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.36/mysql-connector-java-5.1.36.jar'

If this module should download the JDBC driver for MySQL, this parameter should be set to the URL to download the .jar file from.

download_url

Default: 'http://www.atlassian.com/software/crowd/downloads/binary/'

The base URL to download Crowd from.

java_home

Default: '/usr/lib/jvm/java'

The absolute path to the Java installation to use.

jvm_xms

Default: '256m'

Custom JVM settings for initial memory size.

jvm_xmx

Default: '512m'

Custom JVM settings for maximum memory size.

jvm_permgen

Default: '256m'

Custom JVM settings for permgen size. You probably don't need to tune this.

jvm_opts

Default: ''

Any custom JVM options to start Crowd with.

db

Default: 'mysql'

The database type to use. The module supports either mysql or postgres

dbuser

Default: 'crowd'

The username for connecting to the database.

dbpassword

Default: 'crowd'

The database password.

dbserver

Default: 'localhost'

The server address for accessing the Crowd database.

dbname

Default: 'crowd'

The name of the Crowd database.

dbport

Default: undef

The port for accessing the database server. Defaults to '5432' for Postgres and '3306' for MySQL.

dbdriver

Default: undef

Defaults to com.mysql.jdbc.Driver when db is set to mysql and org.postgresql.Driver when db is set to postgres

iddb

Default: 'mysql'

The type of database for the CrowdID database.

See https://confluence.atlassian.com/display/CROWD/Installing+Crowd+and+CrowdID

iddbuser

Default: 'crowd'

The database username for the CrowdID database.

iddbpassword

Default: 'crowd'

The database password for the CrowdID database.

iddbserver

Default: 'localhost'

The address for the database server for the CrowdID database.

iddbname

Default: 'crowdid'

The name of the database for the CrowdID database.

iddbport

Default: undef

The port for accessing the CrowdID database server. Defaults to '5432' for Postgres and '3306' for MySQL.

iddbdriver

Default: undef

Defaults to com.mysql.jdbc.Driver when db is set to mysql and org.postgresql.Driver when db is set to postgres

manage_service

Default: true

Whether this module should manage the service.

service_file

Default: $crowd::params::service_file

The absolute path to the service file. For traditional sysV init systems, this defaults to /etc/init.d/crowd.

For upstart init systems (Ubuntu < 15.04), this defaults to /etc/init/crowd.conf

For systemd (RedHat > 7), this defaults to /usr/lib/systemd/system/crowd.service

Refer to manifests/params.pp for default values.

service_template

Default: $crowd::params::service_template

The template to use for the init system. A template for systemd, upstart, and sysV init is provided by this module.

service_mode

Default: $crowd::params::service_mode

The file mode of the init file. SysV init defaults to executable while Upstart and Systemd do not.

service_ensure

Default: 'running'

The service state.

service_enable

Default: true

Whether the service should start on boot.

service_provider

Default: undef

The provider to use for managing the service. You probably don't need to set this.

Development

Please feel free to raise any issues here for bug fixes. We also welcome feature requests. Feel free to make a pull request for anything and we make the effort to review and merge. We prefer with tests if possible.

Travis CI is used for testing.

How to test the Crowd module

Install the dependencies:

bundle install

Unit tests:

bundle exec rake spec

Syntax validation:

bundle exec rake validate

Puppet Lint:

bundle exec rake lint

Authors and Contributors