This is a Puppet module to manage the installation and initial configuration of Atlassian Bamboo, a continuous integration and build server.
- Manages the download and installation of Bamboo
- Manages some pre-installation configuration settings, such as Tomcat ports, proxy configuration, Java options
- Manages a bamboo user, group, and home
- Manages a service for Bamboo
This is a fork of maestrodev/bamboo, which appears to be dormant. It includes improvements from other authors as well, notably, Simon Croomes.
This module tries to follow conventions in the Confluence, Jira, and Stash modules
- nanliu/staging: http://forge.puppetlabs.com/nanliu/staging
- A Java installation (e.g. via puppetlabs/java)
To have Puppet install Bamboo with the default parameters, declare the bamboo class:
class { 'bamboo': }
The bamboo
class serves as a single "point of entry" for the module.
class { 'bamboo':
version => '5.9.7',
installdir => '/opt/bamboo',
home => '/var/local/bamboo',
user => 'bamboo',
java_home => '/over/the/rainbow/java',
download_url => 'https://mirrors.example.com/atlassian/bamboo',
context_path => 'bamboo',
proxy => {
scheme => 'https',
proxyName => 'bamboo.example.com',
proxyPort => '443',
},
}
Specifying a context_path
for instances where Bamboo is being served
from a path (e.g. example.com/bamboo)
class { 'bamboo':
context_path => 'bamboo',
}
This configures the embedded Bamboo Tomcat instance with the context path.
For instances where Bamboo is behind a reverse proxy
class { 'bamboo':
proxy => {
scheme => 'https',
proxyName => 'bamboo.example.com',
proxyPort => '443',
},
}
This configures the embedded Bamboo Tomcat instance's connector.
The proxy parameter accepts a hash of Tomcat options for configuring the connector's proxy settings. Refer to Tomcat's documentation for more information.
class { 'bamboo':
installdir => '/opt/bamboo',
homedir => '/opt/local/bamboo',
}
class { 'bamboo':
java_home => '/usr/lib/java/custom',
jvm_xms => '512m',
jvm_xmx => '2048m',
jvm_permgen => '512m',
jvm_opts => '-Dcustomopt',
}
Bamboo's powered by an embedded Tomcat instance, which can be tweaked.
class { 'bamboo':
tomcat_port => '9090',
max_threads => '256',
min_spare_threads => '50',
connection_timeout => '30000',
accept_count => '200',
}
Default: '5.9.7'
The version of Bamboo to download and install. Should be in a MAJOR.MINOR.PATH format.
Refer to https://www.atlassian.com/software/bamboo/download
Default: 'tar.gz'
The file extension of the remote archive. This is typically .tar.gz
.
Accepts .tar.gz
or .zip
Default: '/usr/local/bamboo'
The base directory for extracting/installing Bamboo to. Note that it will
decompress inside this directory to a directory such as
atlassian-bamboo-5.9.7/
So an installdir
of /usr/local/bamboo
will
ultimately install Bamboo to /usr/local/bamboo/atlassian-bamboo-5.9.7/
Note that the installdir
is managed by this module.
Default: '/var/local/bamboo'
The home directory for the Bamboo user. This path will be managed by this
module, even if manage_user
is false.
Default: '' (empty)
For instances where Bamboo is being served from a sub path, such as
example.com/bamboo
, where the context_path
would be bamboo
Default: '8085'
The HTTP port for serving Bamboo.
Default: '150'
Maps to Tomcat's maxThreads
HTTP attribute.
Refer to https://tomcat.apache.org/tomcat-7.0-doc/config/http.html for more information.
Default: '25'
Maps to Tomcat's minSpareThreads
HTTP attribute.
Refer to https://tomcat.apache.org/tomcat-7.0-doc/config/http.html for more information.
Default: '20000'
Maps to Tomcat's connectionTimeout
HTTP attribute.
Refer to https://tomcat.apache.org/tomcat-7.0-doc/config/http.html for more information.
Default: '100'
Maps to Tomcat's acceptCount
HTTP attribute.
Refer to https://tomcat.apache.org/tomcat-7.0-doc/config/http.html for more information.
Default: {}
Bamboo's proxy configuration for instances where Bamboo's being served with a reverse proxy in front of it (e.g. Apache or Nginx).
Default: true
Specifies whether the module should manage the user or not.
Default: true
Specifies whether the module should manage the group or not.
Default: 'bamboo'
Bamboo's installation will be owned by this user and the service will run as this user.
Default: 'bamboo'
Bamboo's installation will be owned by this group.
Default: undef
Optionally specify a UID for the user.
Default: undef
Optionally specify a GID for the group.
Default: '*'
Specify a password for the user.
Default: '/bin/bash'
Specify a shell for the user.
Default: '/usr/lib/jvm/java'
Absolute path to the Java installation.
Default: '256m'
Amount of memory the JVM will be started with.
Default: '1024m'
Maximum amount of memory the JVM has available.
You may need to increase this if you see java.lang.OutOfMemoryError
Default: '256m'
Size of the permanent generation heap. Unlikely that you need to tune this.
Default: ''
Any custom options to start the JVM with.
Default: ''
From Bamboo's default setenv.sh
:
Occasionally Atlassian Support may recommend that you set some specific JVM
arguments. You can use this variable below to do that.
Default: 'https://www.atlassian.com/software/bamboo/downloads/binary'
The base url to download Bamboo from. This should be the URL up to the actual filename. The default downloads from Atlassian's site.
Default: true
Whether this module should manage the service.
Default: 'running'
The state of the service, if managed.
Default: true
Whether the service should start on boot.
Default: /etc/init.d/bamboo
for everything except EL7
Path to the init script. Typically, this is /etc/init.d/bamboo
. On EL7,
systemd is used and this parameter is set to
/usr/lib/systemd/system/bamboo.service
Default: $bamboo::params::service_template
Template for the init script/service definition. The module includes an init
script and systemd service configuration, but you can use your own if you'd
like. This should refer to a Puppet module template. E.g.
modulename/bamboo.init.erb
Default: '20',
Seconds to wait for the Bamboo process to stop. (e.g. service bamboo stop will wait this interval before attempting to kill the process and returning).
The following classes are called from the base class. You shouldn't need to declare these directly.
-
el6.x
-
Puppet 3.x
If you've used this module on other platforms, please submit a pull request to add it to this list.
This module does not manage the initial setup of Bamboo - the steps that are
done via the web interface once installed and running. This doesn't appear
to be easily managed automatically. This includes database configuration and
the license. Ultimately, this configuration is placed in
${homedir}/bamboo-cfg.xml
. Contributions are welcome to help manage this.
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 MaestroDev (http://www.maestrodev.com)
- Josh Beard (josh@signalboxes.net) https://github.com/joshbeard
- Carlos Sanchez (csanchez@maestrodev.com)