Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F5330870
init.pp
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 20, 11:59 PM
Size
3 KB
Mime Type
text/plain
Expires
Sun, Nov 22, 11:59 PM (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
314882
Attached To
rXR Xreate
init.pp
View Options
# Class for installing Phabricator.
#
# @summary This class configures and installs Phabricator.
#
# @example
# class { 'phabricator':
# config_hash => {
# 'mysql.host' => 'localhost',
# 'mysql.user' => 'user',
# 'mysql.pass' => 'password',
# },
#
# storage_upgrade => true,
# storage_upgrade_user => 'root',
# storage_upgrade_password => 'password',
# }
#
# @param arcanist_revision The commit hash or branch for Arcanist.
# @param libphutil_revision The commit hash or branch for libphutil.
# @param phabricator_revision The commit hash or branch for Phabricator.
# @param config_hash Phabricator configuration. See
# {https://secure.phabricator.com/book/phabricator/article/advanced_configuration/
# Configuration User Guide: Advanced Configuration}.
# @param install_fonts Whether to install additional fonts.
# @param manage_diffusion Whether to configure the host in order to be able to
# serve (either directly or by proxying to another host in the cluster). See
# {https://secure.phabricator.com/book/phabricator/article/diffusion_hosting/
# Diffusion User Guide: Repository Hosting}.
# @param storage_upgrade A flag to enable storage upgrades. See
# {https://secure.phabricator.com/book/phabricator/article/configuration_guide/#storage-configuring-mysql
# Storage: Configuring MySQL}.
# @param storage_upgrade_user The MySQL user with which to execute
# `bin/storage upgrade`.
# @param storage_upgrade_password The MySQL password for the storage upgrade
# user.
#
# @param daemon_user
# @param group
# @param install_dir
# @param logs_dir
# @param pid_dir
# @param repo_dir
# @param vcs_user
#
class phabricator(
String $server_url,
String $arcanist_url,
String $phabricator_url,
String $libphutil_url,
String $xreate_docs_url,
String $init_db,
String $init_repo,
String $ctl,
Hash[String, Data] $config_hash,
Boolean $install_fonts,
Boolean $manage_diffusion,
Optional[String] $storage_upgrade_user,
Optional[String] $storage_upgrade_password,
String $admin_user,
String $daemon_user,
String $www_user,
String $vcs_user,
String $group,
Stdlib::Unixpath $install_dir,
Stdlib::Unixpath $logs_dir,
Stdlib::Unixpath $pid_dir,
Stdlib::Unixpath $repo_dir,
Stdlib::Unixpath $storage_dir,
Stdlib::Unixpath $dumps_dir,
String $secrets_dir,
String $xreate_docs_path,
) {
$fpm_socket = "/run/php/php-fpm.sock"
assert_type(String, $storage_upgrade_user)
assert_type(String, $storage_upgrade_password)
$log_access_path = "${logs_dir}phabricator.log"
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', '/usr/bin', '/bin'], #$PATH
'log.access.path' => $log_access_path,
'log.ssh.path' => "${logs_dir}/ssh.log",
'phd.log-directory' => $logs_dir,
'phd.user' => $daemon_user,
'repository.default-local-path' => $repo_dir,
}
)
$xreate_docs_config = {
'xreate.book.project' => "${phabricator::xreate_docs_path}manual.json"
}
#include phabricator::aphlict
class { '::phabricator::php':}
class { '::phabricator::nginx':}
include phabricator::config
class { 'phabricator::install': require => Class['::phabricator::php'] }
class {'phabricator::daemons':
daemon => undef
}
include phabricator::dumps
}
Event Timeline
Log In to Comment