NOTICE: This project is dormant and looking for a new owner. As of 2020, this is the most actively used Crowd module on the Forge. If you want to assume maintenance of this module, please get in touch.
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.
Current dependencies are:
- puppetlabs/stdlib
- puppet/archive
A Java installation is also required. puppetlabs/java is recommended.
Defaults:
class { 'crowd': }
Using PostgreSQL database:
class { 'crowd':
db => 'postgres',
dbuser => 'crowd',
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',
}
version
Default: '3.4.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
. You can override this sub-directory by
setting the 'appdir' parameter
appdir
Default: atlassian-${product}-${version}-standalone
The sub-directory under installdir to install Crowd to.
internet_proxy
Default: undef
Proxy setting to use if downloading Crowd behind a proxy.
homedir
Default: '/var/local/crowd'
The home directory for the crowd user.
manage_logging
Default: false
If true, the module will manage the access log valve in the Crowd server's Tomcat server.xml, properties in conf/logging.properties
,
properties in crowd-webapp/WEB-INF/classes/log4j.properties
, and properties in crowd-openidserver-webapp/WEB-INF/classes/log4j.properties
.
log_dir
Default: undef
If manage_logging
is true, this should specify the absolute path to the log directory (e.g. /var/log/crowd
).
manage_log_dir
Default: false
If manage_logging
is true, this will manage the log directory via a file
resource.
log_dir_owner
Default: $user
If manage_log_dir
is true, this specifies the owner for the file resource.
log_dir_group
Default: $group
If manage_log_dir
is true, this specifies the group for the file resource.
log_dir_mode
Default: 0750
If manage_log_dir
is true, this specifies the mode for the file resource.
log_max_days
Default: 5
If manage_logging
is true, this specifies the number of days to retain logs.
tomcat_port
Default: '8095'
The port that Crowd's Tomcat should listen on.
tomcat_address
Default: undef
The value for the 'address' attribute on the Tomcat connector.
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' and '/usr/sbin/nologin' on Debian.
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: 'https://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. Set in setenv.sh
in CATALINA_OPTS
.
jvm_xmx
Default: '512m'
Custom JVM settings for maximum memory size. Set in setenv.sh
in CATALINA_OPTS
.
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. Set in setenv.sh
in CATALINA_OPTS
.
logdir
Default: '/var/log/crowdir
'
Set the folder to store log files in.
db
Default: 'mysql'
The database type to use. The module supports either mysql
, postgres
, or oracle
.
dbuser
Default: 'crowd'
The username for connecting to the database.
dbpassword
Default: 'crowd'
The database password.
NOTE: This doesn't do anything.
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
and
oracle.jdbc.driver.OracleDriver
when db is set to
oracle`.
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.
facts_ensure
Default: 'present'
Valid values are 'present' or 'absent'
Will provide an external fact called crowd_version
with the installed
Crowd version.
Note: This installs to Facter's system-wide external facts directory (facts.d -
see the facter_dir
parameter). A better solution to tracking the installed
version is needed that can work with a dynamic install path.
facter_dir
Default: See bamboo::params
Absolute path to the external facts directory. Refer to https://docs.puppet.com/facter/latest/custom_facts.html#external-facts
create_facter_dir
Default: true
Boolean
Whether this module should ensure the "facts.d" directory for external facts
is created. This module uses an Exec
resource to do that recursively if
this is true.
stop_command
Default: service crowd stop && sleep 15
The command to execute prior to upgrading. This should stop any running Crowd instance. This is executed after downloading the specified version and before extracting it to install it.
This requires crowd::facts_ensure = true
.
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.
Install the dependencies:
bundle install
Unit tests:
bundle exec rake spec
Syntax validation:
bundle exec rake validate
Puppet Lint:
bundle exec rake lint
- Refer to the CONTRIBUTORS file.
- Original module by @actionjack
- Josh Beard ([email protected]) https://github.com/joshbeard