- Overview
- Prerequisites
- Usage
- Reference
- Limitations
- Development and Contributing
- Authors and Contributors
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 configuration settings, such as Tomcat ports, proxy configuration, Java options, and JVM tuning.
- Manages a user, group, and home
- Manages a service for Bamboo
There's still some post-installation steps that will need to be completed manually, such as entering a license and configuring the database.
This is a fork of [joshbeard/puppet-bamboo]https://github.com/joshbeard/puppet-bamboo which itself 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 BitBucket modules
- puppetlabs/augeas_core: https://forge.puppet.com/puppetlabs/augeas_core
- puppet/archive: https://forge.puppetlabs.com/puppet/archive
- puppetlabs/stdlib: https://forge.puppet.com/puppetlabs/stdlib
- A Java installation (e.g. via puppetlabs/java)
Consult the Atlassian Bamboo documentation for specific system requirements for your platform and version. This module does not manage a Java installation.
NOTE: Since Bamboo 5.10, Atlassian no longer supports JDK < 8
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 => '6.7.1',
installdir => '/opt/bamboo',
homedir => '/var/local/bamboo',
user => 'bamboo',
java_home => '/over/the/rainbow/java',
download_url => 'https://mirrors.example.com/atlassian/bamboo',
context_path => 'bamboo',
umask => '0022',
proxy => {
scheme => 'https',
proxyName => 'bamboo.example.com',
proxyPort => '443',
},
}
contain bamboo
bamboo::version: '6.7.1'
bamboo::checksum: '774ec0917cccc5b90b7be3df4d661620'
bamboo::installdir: '/opt/bamboo'
bamboo::jvm_xms: '512m'
bamboo::jvm_xmx: '1024m'
bamboo::proxy:
scheme: 'https'
proxyName: 'bamboo.intranet.org'
proxyPort: '443'
bamboo::umask: '0022'
bamboo::download_url: 'https://repo.intranet.org/atlassian'
bamboo::java_home: '/etc/alternatives/java_sdk'
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: '6.7.1'
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-6.7.1/
So an installdir
of /usr/local/bamboo
will
ultimately install Bamboo to /usr/local/bamboo/atlassian-bamboo-6.7.1/
by
default.
Refer to manage_installdir
and appdir
Default: true
Boolean. Whether this module should be responsible for managing the
installdir
Default: ${installdir}/atlassian-bamboo-${version}
This is the directory that Bamboo gets extracted to within the 'installdir'
By default, this is a subdirectory with the specific version appended to it.
You might want to customize this if you don't want to use the default
atlassian-bamboo-${version}
convention.
Default: true
Boolean. Whether this module should be responsible for managing the appdir
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: undef
Specify a proxy server to use on the archive
resource for downloading Bamboo, with port number
if needed. (e.g. https://example.com:8080)
Default: undef
Proxy server type (none|http|https|ftp) to use on the archive
resource for downloading Bamboo.
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: OS-specific (refer to manifests/params.pp
)
Path to the init script or service file (systemd).
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).
Default: 'present'
Valid values are 'present' or 'absent'
Will provide an external fact called bamboo_version
with the installed
Bamboo version.
Default: See bamboo::params
Absolute path to the external facts directory. Refer to https://docs.puppet.com/facter/latest/custom_facts.html#external-facts
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.
Default: service bamboo stop && sleep 15
The command to execute prior to upgrading. This should stop any running Bamboo instance. This is executed after downloading the specified version and before extracting it to install it.
This requires the bamboo_version
fact.
Default: false
Specifies whether the initconfig file should be managed by this module.
Default: $::osfamily
specific - see bamboo::params
Absolute path to the init config file (sysconfig, defaults). This file is
sourced by the init script if it exists.
Defaults to /etc/sysconfig/bamboo
on Red Hat family systems.
Defaults to /etc/default/bamboo
on Debian family systems.
Default: '' (empty)
If initconfig_manage => true
, this string should be the content to populate
the init config file with.
Default: undef
(will use Bamboo's default)
Specifies a UMASK to run Bamboo with.
Download archive file checksum.
Type of checksum for the archive file download.
Specifies the checksum_type
parameter on the puppet/archive resource.
Valid options: (none|md5|sha1|sha2|sha256|sha384|sha512)
Default: md5
The following classes are called from the base class. You shouldn't need to declare these directly.
- EL 6
- EL 7
- Debian 8
- Debian 9
- Ubuntu 14.04
- Ubuntu 16.04
- Ubuntu 18.04
- Puppet 4.x
- Puppet 5.x
- Puppet 6.x
This module does not manage the initial set up 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 submit a ticket for any issues, bug fixes, questions, and feature requests.
Pull requests with passing tests and updated tests are appreciated. Please add yourself to the CONTRIBUTORS
file and update the README
for documentation if appropriate.
Travis CI is used for testing.
Install the dependencies:
bundle install
To see what's available:
bundle exec rake -T
Syntax validation, lint, and spec tests:
bundle exec rake validate
Unit tests:
bundle exec rake parallel_spec
Syntax validation:
bundle exec rake validate
Puppet Lint:
bundle exec rake lint
Acceptance tests (beaker):
# By default, this will test against CentOS 7 in a Docker container
bundle exec rake beaker:default
Other Beaker tests:
# Test against centos-6 using Docker
PUPPET_INSTALL_TYPE=agent \
BEAKER_debug=true \
BEAKER_PUPPET_COLLECTION=puppet6 \
BEAKER_TESTMODE=apply \
BEAKER_set=docker/centos-6 \
bundle exec rake beaker
# Test against centos-7 using Docker
PUPPET_INSTALL_TYPE=agent \
BEAKER_debug=true \
BEAKER_PUPPET_COLLECTION=puppet6 \
BEAKER_TESTMODE=apply \
BEAKER_set=docker/centos-7 \
bundle exec rake beaker
# Test against debian-8 using Docker
PUPPET_INSTALL_TYPE=agent \
BEAKER_debug=true \
BEAKER_PUPPET_COLLECTION=puppet6 \
BEAKER_TESTMODE=apply \
BEAKER_set=docker/debian-8 \
bundle exec rake beaker
# Test against debian-9 using Docker
PUPPET_INSTALL_TYPE=agent \
BEAKER_debug=true \
BEAKER_PUPPET_COLLECTION=puppet6 \
BEAKER_TESTMODE=apply \
BEAKER_set=docker/debian-9 \
bundle exec rake beaker
# Test against ubuntu-14.04 using Docker
PUPPET_INSTALL_TYPE=agent \
BEAKER_debug=true \
BEAKER_PUPPET_COLLECTION=puppet6 \
BEAKER_TESTMODE=apply \
BEAKER_set=docker/ubuntu-14.04 \
bundle exec rake beaker
# Test against ubuntu-16.04 using Docker
PUPPET_INSTALL_TYPE=agent \
BEAKER_debug=true \
BEAKER_PUPPET_COLLECTION=puppet6 \
BEAKER_TESTMODE=apply \
BEAKER_set=docker/ubuntu-16.04 \
bundle exec rake beaker
# Test against ubuntu-18.04 using Docker
PUPPET_INSTALL_TYPE=agent \
BEAKER_debug=true \
BEAKER_PUPPET_COLLECTION=puppet6 \
BEAKER_TESTMODE=apply \
BEAKER_set=docker/ubuntu-18.04 \
bundle exec rake beaker
You can set the BAMBOO_DOWNLOAD_URL
and BAMBOO_VERSION
environment
variables for setting the corresponding ::bamboo
class parameters for the
beaker tests.
- 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)