phabricator
Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.4.x
- Puppet >= 4.9.0 < 6.0.0
Start using this module
Add this module to your Puppetfile:
mod 'joshuaspence-phabricator', '0.5.12'
Learn more about managing modules with a PuppetfileDocumentation
phabricator
Table of Contents
Description
This module installs, configures and manages Phabricator, a suite of web-based software development collaboration tools, including:
Phabricator is offered as a hosted service by Phacility, but can also be installed on-premise.
Usage
In order to utilize this module it is necessary to configure Phabricator using
the $config_hash
parameter. Specifically, the following settings are required:
mysql.host
: MySQL database hostname.mysql.user
: MySQL username to use when connecting to the database.mysql.pass
: MySQL password to use when connecting to the database.
There are many other settings that can be passed to the $config_hash
parameter, but the above settings should be the minimal configuration that is
required in order for Phabricator to be functional. The $config_hash
parameter is JSON-encoded and written to conf/local/local.json
. See
Advanced Configuration for further information on
configuring Phabricator.
class { 'phabricator':
config_hash => {
'mysql.host' => 'localhost',
'mysql.user' => 'user',
'mysql.pass' => 'password',
},
storage_upgrade => true,
storage_upgrade_user => 'admin',
storage_upgrade_password => 'password',
}
include phabricator::aphlict
include phabricator::daemons
Storage Upgrades and Adjustments
Phabricator uses MySQL or another MySQL-compatible database (such as MariaDB or
Amazon RDS). Phabricator consists of a ./bin/storage
script which can be used
to manage the database schema and apply storage upgrades and adjustments. You
can find more information about these processes in the official documentation
(see Storage: Configuring MySQL and Managing Storage Adjustments).
This module can, optionally, execute ./bin/storage upgrade
automatically in
order to apply storage upgrades and adjustments. Whilst I haven't observed any
issues using Puppet to apply storage upgrades and adjustments, I suspect that
many (most?) users of this module would prefer to apply storage upgrades and
adjustments using some other mechanism, perhaps as a step in a shell script
used for deployments. As such, $storage_upgrade
defaults to false
.
Users of this module that choose to set $storage_upgrade
to true
should be
aware of the following caveats:
- Storage upgrades can take a long time to complete. Generally the time taken
to apply storage upgrades will be proportional to the amount of data stored
in Phabricator. Whilst storage upgrades should be able to be applied multiple
times without adverse side effects, terminating the
./bin/storage upgrade
workflow is strongly advised against. - It is strongly recommended that a Phabricator installation is taken offline before storage upgrades are applied.
Reference
See the documentation.
Limitations
This module has been tested on:
- Ubuntu 16.04
Testing on other platforms has been minimal and cannot be guaranteed.
Development
Contributions to this module are welcome, but must be accompanied by
documentation, unit test coverage (with rspec-puppet
) and
acceptance test coverage (with beaker-rspec
). Refactoring
existing code and documentation changes do not require additional tests.
All pull requests must pass successfully through Travis CI before being accepted and merged. Each of the steps that is executed in Travis CI should be reproducible locally using the following commands:
Task | Command |
---|---|
Syntax Checks and Linting | bundle exec rake |
Unit tests | bundle exec rake spec |
Acceptance tests | bundle exec rake beaker |
Changelog
0.5.12 (UNRELEASED)
Breaking changes
- Bumped the version requirement for
puppet/logrotate
.
Bug fixes
- Run
bin/almanac register
as the daemon user so that the keys don't end up being owned byroot
.
0.5.11
Breaking changes
- Dropped support for Puppet 4.7 and 4.8.
Bug fixes
- Ensure that PHP is installed before starting Aphlict.
Features
- Set
RuntimeDirectory
for daemons so that/run/phabricator
is created automatically. This should mean that daemons survive a system reboot.
0.5.10
Bug fixes
- Add a dependency to ensure that PHP CLI is installed before any PHP extensions are configured.
- Fix warning text for unsupported PHP version.
Development
- Run acceptance tests using PHP 7.2.
Features
- Officially support Puppet 5.1, 5.3, 5.4 and 5.5. Puppet 5.2 is not supported due to PUP-7952: Types with a trailing comma fail on 5.2.0.
0.5.9
Breaking changes
- Bump version requirement for
puppet/logrotate
.
Bug fixes
- Bump version requirement for
puppetlabs/apt
. - Bump version requirement for
puppet/nodejs
. - Bump version requirement for
saz/sudo
. - Bump version requirement for
camptocamp/systemd
. - Add some missing dependencies.
Features
- Mark the
Exec['bin/storage upgrade']
command as sensitive to ensure that database credentials are written to the console.
0.5.8
Bug Fixes
- Restart PHP-FPM when the Phabricator code base is updated.
0.5.7
Features
- The
ws
NPM package is no longer pinned to version2.3.1
. See T12755: Aphlict doesn't work with the latest version ofws
. - Added an
$install_fonts
flag to install optional fonts.
0.5.6
Features
- Added a
logrotate
rule forphd
.
0.5.5
Breaking Changes
- Changed the
lookup_options
forphabricator::config_hash
fromdeep
tohash
.
Bug Fixes
- Grant
sudo
permissions to/usr/bin/git
for thediffusion
andwww-data
users.
0.5.4
Features
- Add support for specifying cluster peers in the Aphlict configuration file.
0.5.3
Breaking Changes
- Changed the home directory for the daemon user to be
/usr/local/src/phabricator/support/empty
.
Bug Fixes
- Fix a typo in Hiera data.
0.5.2
Features
- Allow
--identify-as
to be passed tobin/almanac register
.
0.5.1
Bug Fixes
- Changed the home directory for the daemon user to be
/nonexistent
.
0.5.0
Breaking Changes
- The repository directory (
/var/repo
by default) is, once again, managed by this module. This is a revert of #8. - The Almanac device key (
/usr/local/src/phabricator/conf/keys/device.key
) is no longer group-readable. - This module now overrides the configuration value for
environment.append-paths
.
Features
- Added a
logrotate
rule for Aphlict (#12). - Added support for Diffusion repository hosting (#14). This functionality is
disabled by default, but can be enabled with
$phabricator::manage_diffusion
.
Bug Fixes
- The daemon user (
phd
) is now created unconditionally (#11). Previously, this user would only be created if Phabricator daemons were configured on the host. It was discovered that there are other cases in which the daemon user may be required and, as such, it was decided to simply create the daemon user unconditionally. - Added
/usr/lib/git-core
toenvironment.append-paths
so thatgit-http-backend
works.
Improvements
- Refactor unit tests.
0.4.0
Breaking Changes
- The default value for
$vcs_user
has been changed fromvcs
todiffusion
(#10). - The repository directory (
/var/repo
by default) is no longer managed by this module (#8). Instead, this directory should be created byPhabricatorRepositoryPullLocalDaemon
. Consequently, the$repo_dir
parameter has also been removed.
Features
- Marked internal classes as private using
assert_private
. - Documentation improvements.
- Officially support Puppet 5 (#9).
Bug Fixes
- Ensure that
./bin/almanac register
is executed before thephd
service is started (#7).
0.3.4
Bug Fixes
- Fixes the
systemd
unit file for thephd
service, which was broken in v0.3.3.
0.3.3 (deleted)
Features
- Added support for registering Almanac devices (#4).
- The
$config_hash
parameter is now deep-merged by default. - Added support for launching a specific Phabricator daemon using
./bin/phd launch
(#5).
0.3.2
Features
- Added support for managing Aphlict, Phabricator's real-time notifications service (#3).
Bug Fixes
- Added a warning if the installed PHP version is incompatible with Phabricator (#2).
0.3.1
Features
- Added support for managing Phabricator daemons (#1).
0.3.0
Summary
This is a major rewrite which involved completely throwing away the old code
and starting again from scratch. The rewritten module has comprehensive unit
tests (with rspec-puppet
) and acceptance tests
(with beaker-rspec
).
Dependencies
- puppetlabs/apt (>= 2.0.0 < 7.0.0)
- stm/debconf (2.x)
- puppetlabs/git (< 1.0.0)
- puppet/logrotate (>= 3.4.0 < 4.0.0)
- puppet/nodejs (< 7.0.0)
- puppet/php (>= 4.0.0 < 7.0.0)
- saz/ssh (>= 2.9.0 < 5.0.0)
- puppetlabs/stdlib (>= 4.2.0 < 6.0.0)
- saz/sudo (>= 2.3.0 < 6.0.0)
- camptocamp/systemd (>= 0.3.0 < 3.0.0)
- puppetlabs/vcsrepo (>= 1.0.0 < 3.0.0)