Puppet Class: phabricator
- Defined in:
- manifests/init.pp
Summary
This class configures and installs Phabricator.Overview
Class for installing Phabricator.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'manifests/init.pp', line 45
class phabricator(
Phabricator::Revision $arcanist_revision,
Phabricator::Revision $libphutil_revision,
Phabricator::Revision $phabricator_revision,
Hash[String, Data] $config_hash,
Boolean $install_fonts,
Boolean $manage_diffusion,
Boolean $storage_upgrade,
Optional[String] $storage_upgrade_user,
Optional[String] $storage_upgrade_password,
String $daemon_user,
String $group,
Stdlib::Unixpath $install_dir,
Stdlib::Unixpath $logs_dir,
Stdlib::Unixpath $pid_dir,
Stdlib::Unixpath $repo_dir,
String $vcs_user,
) {
if $storage_upgrade {
assert_type(String, $storage_upgrade_user)
assert_type(String, $storage_upgrade_password)
}
if $pid_dir =~ /^\/run\// {
$runtime_directory = regsubst($pid_dir, /^\/run\//, '')
} else {
fail('$pid_dir must be a descendent of /run.')
}
$config = merge(
$config_hash,
{
'diffusion.ssh-user' => $vcs_user,
'environment.append-paths' => ['/usr/lib/git-core'],
'log.access.path' => "${logs_dir}/access.log",
'log.ssh.path' => "${logs_dir}/ssh.log",
'phd.log-directory' => $logs_dir,
'phd.pid-directory' => $pid_dir,
'phd.user' => $daemon_user,
'repository.default-local-path' => $repo_dir,
}
)
# TODO: It's not currently possible to test for warnings with `rspec-puppet`.
# See https://github.com/rodjek/rspec-puppet/issues/108.
if $facts['phpversion'] != undef and versioncmp($facts['phpversion'], '7.0.0') >= 0 and versioncmp($facts['phpversion'], '7.1.0') < 0 {
warning('Phabricator does not support PHP 7.0. See https://secure.phabricator.com/T12101.')
}
include phabricator::config
include phabricator::install
}
|