Split out gerrit module
The spec: http://specs.openstack.org/openstack-infra/infra-specs/specs/puppet-modules.html Depends-On: Id7e8173438ed065bc64d120a0468c112ac2a3227 Change-Id: Idb0c6710ef98c033a64f6eb56e73b987e9026f08
This commit is contained in:
parent
570abf2dce
commit
2ce47e76da
@ -57,6 +57,7 @@ SOURCE_MODULES["https://github.com/puppet-community/puppet-module-puppetboard"]=
|
||||
|
||||
# Add modules that should be part of the openstack-infra integration test here
|
||||
INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-elasticsearch"]="origin/master"
|
||||
INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-gerrit"]="origin/master"
|
||||
INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-storyboard"]="origin/master"
|
||||
INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-kibana"]="origin/master"
|
||||
INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-lodgeit"]="origin/master"
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo 'Content-Type: text/html
|
||||
|
||||
OK'
|
@ -1 +0,0 @@
|
||||
GERRIT_SITE=/home/gerrit2/review_site
|
Binary file not shown.
Before ![]() (image error) Size: 4.6 KiB |
@ -1,23 +0,0 @@
|
||||
# == Class: gerrit::cron
|
||||
#
|
||||
class gerrit::cron {
|
||||
|
||||
cron { 'gerrit_repack':
|
||||
user => 'gerrit2',
|
||||
weekday => '0',
|
||||
hour => '4',
|
||||
minute => '7',
|
||||
command => 'find /home/gerrit2/review_site/git/ -type d -name "*.git" -print -exec git --git-dir="{}" repack -afd \;',
|
||||
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
|
||||
}
|
||||
|
||||
cron { 'expireoldreviews':
|
||||
ensure => 'absent',
|
||||
user => 'gerrit2',
|
||||
}
|
||||
|
||||
cron { 'removedbdumps':
|
||||
ensure => 'absent',
|
||||
user => 'gerrit2',
|
||||
}
|
||||
}
|
@ -1,687 +0,0 @@
|
||||
# Install and maintain Gerrit Code Review.
|
||||
# params:
|
||||
# mysql_host:
|
||||
# The mysql host to which gerrit should connect.
|
||||
# mysql_password:
|
||||
# The password with which gerrit connects to mysql.
|
||||
# vhost_name:
|
||||
# used in the Apache virtual host, eg., review.example.com
|
||||
# canonicalweburl:
|
||||
# Used in the Gerrit config to generate links,
|
||||
# eg., https://review.example.com/
|
||||
# ssl_cert_file:
|
||||
# ssl_key_file:
|
||||
# Used in the Apache virtual host to specify the SSL cert and key files.
|
||||
# ssl_chain_file:
|
||||
# Optional, if you have an intermediate cert Apache should serve.
|
||||
# ssl_*_file_contents:
|
||||
# Optional, the contents of the respective cert files as a string. Will be
|
||||
# used to have Puppet ensure the contents of these files. Default value of
|
||||
# '' means Puppet should not manage these files.
|
||||
# openidssourl:
|
||||
# The URL to use for OpenID in SSO mode.
|
||||
# email:
|
||||
# The email address Gerrit should use when sending mail.
|
||||
# smtpserver:
|
||||
# The smtp server that Gerrit should send mail through.
|
||||
# sendemail_from:
|
||||
# gerrit.conf value for sendemail.from.
|
||||
# database_poollimit:
|
||||
# container_heaplimit:
|
||||
# core_packedgitopenfiles:
|
||||
# core_packedgitlimit:
|
||||
# core_packedgitwindowsize:
|
||||
# sshd_threads:
|
||||
# sshd_listen_address:
|
||||
# httpd_acceptorthreads:
|
||||
# httpd_minthreads:
|
||||
# httpd_maxthreads:
|
||||
# httpd_maxwait:
|
||||
# Gerrit configuration options; see Gerrit docs.
|
||||
# commentlinks:
|
||||
# A list of regexes Gerrit should hyperlink.
|
||||
# trackingids:
|
||||
# A list of regexes to reference external tracking systems.
|
||||
# war:
|
||||
# The URL of the Gerrit WAR that should be downloaded and installed.
|
||||
# Note that only the final component is used for comparing to the most
|
||||
# recently installed WAR. In other words, if you update the war from:
|
||||
#
|
||||
# http://tarballs.openstack.org/ci/gerrit.war
|
||||
# to:
|
||||
# http://somewhereelse.example.com/gerrit.war
|
||||
#
|
||||
# Gerrit won't be updated unless you delete gerrit.war from
|
||||
# ~gerrit2/gerrit-wars. But if you change the URL from:
|
||||
#
|
||||
# http://tarballs.openstack.org/ci/gerrit-2.2.2.war
|
||||
# to:
|
||||
# http://tarballs.openstack.org/ci/gerrit-2.3.0.war
|
||||
# Gerrit will be upgraded on the next puppet run.
|
||||
# contactstore:
|
||||
# A boolean enabling the contact store feature
|
||||
# contactstore_appsec:
|
||||
# An application shared secret for the contact store protocol
|
||||
# contactstore_pubkey:
|
||||
# A public key with which to encrypt contact information
|
||||
# contactstore_url:
|
||||
# A URL for the remote contact store application
|
||||
# replicate_local:
|
||||
# A boolean enabling local replication for apache acceleration
|
||||
# replicate_path:
|
||||
# The path to the local git replica if replicate_local is enabled
|
||||
# gitweb:
|
||||
# A boolean enabling gitweb
|
||||
# cgit:
|
||||
# A boolean enabling cgit
|
||||
# web_repo_url:
|
||||
# Url for setting the location of an external git browser
|
||||
# testmode:
|
||||
# Set this to true to disable cron jobs and replication,
|
||||
# which can interfere with testing.
|
||||
# secondary_index:
|
||||
# Set this to true to enable secondary index support
|
||||
# secondary_index_type:
|
||||
# which secondary index to use: SQL (no secondary index),
|
||||
# LUCENE (recommended), SOLR (experimental). Note: as of
|
||||
# Gerrit 2.9 LUCENE is default secondary index and SQL is
|
||||
# removed.
|
||||
# TODO: make more gerrit options configurable here
|
||||
#
|
||||
class gerrit(
|
||||
$mysql_host = 'localhost',
|
||||
$mysql_password,
|
||||
$war = '',
|
||||
$email_private_key = '',
|
||||
$vhost_name = $::fqdn,
|
||||
$canonicalweburl = "https://${::fqdn}/",
|
||||
$robots_txt_source = '', # If left empty, the gerrit default will be used.
|
||||
$serveradmin = "webmaster@${::fqdn}",
|
||||
$ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem',
|
||||
$ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key',
|
||||
$ssl_chain_file = '',
|
||||
$ssl_cert_file_contents = '', # If left empty puppet will not create file.
|
||||
$ssl_key_file_contents = '', # If left empty puppet will not create file.
|
||||
$ssl_chain_file_contents = '', # If left empty puppet will not create file.
|
||||
$ssh_dsa_key_contents = '', # If left empty puppet will not create file.
|
||||
$ssh_dsa_pubkey_contents = '', # If left empty puppet will not create file.
|
||||
$ssh_rsa_key_contents = '', # If left empty puppet will not create file.
|
||||
$ssh_rsa_pubkey_contents = '', # If left empty puppet will not create file.
|
||||
$ssh_project_rsa_key_contents = '', # If left empty will not create file.
|
||||
$ssh_project_rsa_pubkey_contents = '', # If left empty will not create file.
|
||||
$ssh_replication_rsa_key_contents = '', # If left emptry will not create files.
|
||||
$ssh_replication_rsa_pubkey_contents = '', # If left emptry will not create files.
|
||||
$gerrit_auth_type = 'OPENID_SSO',
|
||||
$gerrit_contributor_agreement = true,
|
||||
$openidssourl = 'https://login.launchpad.net/+openid',
|
||||
$ldap_server = '',
|
||||
$ldap_account_base = '',
|
||||
$ldap_username = '',
|
||||
$ldap_password = '',
|
||||
$ldap_account_pattern = '',
|
||||
$ldap_account_email_address = '',
|
||||
$ldap_sslverify = true,
|
||||
$ldap_ssh_account_name = '',
|
||||
$ldap_accountfullname = '',
|
||||
$email = '',
|
||||
$smtpserver = 'localhost',
|
||||
$sendemail_from = 'MIXED',
|
||||
$database_poollimit = '',
|
||||
$container_heaplimit = '',
|
||||
$core_packedgitopenfiles = '',
|
||||
$core_packedgitlimit = '',
|
||||
$core_packedgitwindowsize = '',
|
||||
$sshd_threads = '',
|
||||
$sshd_listen_address = '*:29418',
|
||||
$httpd_acceptorthreads = '',
|
||||
$httpd_minthreads = '',
|
||||
$httpd_maxthreads = '',
|
||||
$httpd_maxwait = '',
|
||||
$commentlinks = [],
|
||||
$trackingids = [],
|
||||
$contactstore = false,
|
||||
$contactstore_appsec = '',
|
||||
$contactstore_pubkey = '',
|
||||
$contactstore_url = '',
|
||||
$enable_melody = false,
|
||||
$melody_session = false,
|
||||
$replicate_local = false,
|
||||
$replicate_path = '/opt/lib/git',
|
||||
$replication = [],
|
||||
$gitweb = true,
|
||||
$cgit = false,
|
||||
$web_repo_url = '',
|
||||
$testmode = false,
|
||||
$secondary_index = false,
|
||||
$secondary_index_type = 'LUCENE',
|
||||
$enable_javamelody_top_menu = false,
|
||||
) {
|
||||
include apache
|
||||
include jeepyb
|
||||
include pip
|
||||
|
||||
$java_home = $::lsbdistcodename ? {
|
||||
'precise' => '/usr/lib/jvm/java-7-openjdk-amd64/jre',
|
||||
}
|
||||
|
||||
$gerrit_war = '/home/gerrit2/review_site/bin/gerrit.war'
|
||||
$gerrit_site = '/home/gerrit2/review_site'
|
||||
|
||||
include gerrit::user
|
||||
|
||||
if ($gitweb) {
|
||||
package { 'gitweb':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
package { 'unzip':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'openjdk-7-jre-headless':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'openjdk-6-jre-headless':
|
||||
ensure => purged,
|
||||
require => Package['openjdk-7-jre-headless'],
|
||||
}
|
||||
|
||||
file { '/var/log/gerrit':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
}
|
||||
|
||||
if ((!defined(File['/opt/lib']))
|
||||
and ($replicate_path =~ /^\/opt\/lib\/.*$/)) {
|
||||
file { '/opt/lib':
|
||||
ensure => directory,
|
||||
owner => root,
|
||||
}
|
||||
}
|
||||
|
||||
# Prepare gerrit directories. Even though some of these would be created
|
||||
# by the init command, we can go ahead and create them now and populate them.
|
||||
# That way the config files are already in place before init runs.
|
||||
|
||||
file { '/home/gerrit2/review_site':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
require => User['gerrit2'],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/plugins':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
require => [User['gerrit2'], File['/home/gerrit2/review_site']],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/.ssh':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
mode => '0700',
|
||||
require => User['gerrit2'],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/etc':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
require => File['/home/gerrit2/review_site'],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/bin':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
require => File['/home/gerrit2/review_site'],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/static':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
require => File['/home/gerrit2/review_site'],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/hooks':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
require => File['/home/gerrit2/review_site'],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/review_site/lib':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
require => File['/home/gerrit2/review_site'],
|
||||
}
|
||||
|
||||
# Skip replication if we're in test mode
|
||||
if ($testmode == false) {
|
||||
# Template uses $replication
|
||||
file { '/home/gerrit2/review_site/etc/replication.config':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
content => template('gerrit/replication.config.erb'),
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc'],
|
||||
}
|
||||
}
|
||||
|
||||
# Gerrit sets these permissions in 'init'; don't fight them.
|
||||
# Template uses:
|
||||
# - $mysql_host
|
||||
# - $canonicalweburl
|
||||
# - $database_poollimit
|
||||
# - $gerrit_contributor_agreement
|
||||
# - $gerrit_auth_type
|
||||
# - $openidssourl
|
||||
# - $ldap_server
|
||||
# - $ldap_username
|
||||
# - $ldap_password
|
||||
# - $ldap_account_base
|
||||
# - $ldap_account_pattern
|
||||
# - $ldap_account_email_address
|
||||
# - $smtpserver
|
||||
# - $sendmail_from
|
||||
# - $java_home
|
||||
# - $container_heaplimit
|
||||
# - $core_packedgitopenfiles
|
||||
# - $core_packedgitlimit
|
||||
# - $core_packedgitwindowsize
|
||||
# - $sshd_listen_address
|
||||
# - $sshd_threads
|
||||
# - $httpd_maxwait
|
||||
# - $httpd_acceptorthreads
|
||||
# - $httpd_minthreads
|
||||
# - $httpd_maxthreads
|
||||
# - $commentlinks
|
||||
# - $trackingids
|
||||
# - $enable_melody
|
||||
# - $melody_session
|
||||
# - $gitweb
|
||||
# - $contactstore_appsec
|
||||
# - $contactstore_url
|
||||
file { '/home/gerrit2/review_site/etc/gerrit.config':
|
||||
ensure => present,
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0644',
|
||||
content => template('gerrit/gerrit.config.erb'),
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc'],
|
||||
}
|
||||
|
||||
# Secret files.
|
||||
|
||||
# Gerrit sets these permissions in 'init'; don't fight them. If
|
||||
# these permissions aren't set correctly, gerrit init will write a
|
||||
# new secure.config file and lose the mysql password.
|
||||
# Template uses $mysql_password, $email_private_key
|
||||
file { '/home/gerrit2/review_site/etc/secure.config':
|
||||
ensure => present,
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0600',
|
||||
content => template('gerrit/secure.config.erb'),
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc'],
|
||||
}
|
||||
|
||||
# Set up apache.
|
||||
|
||||
# Template uses:
|
||||
# - $vhost_name
|
||||
# - $serveradmin
|
||||
# - $ssl_cert_file
|
||||
# - $ssl_key_file
|
||||
# - $ssl_chain_file
|
||||
# - $canonicalweburl
|
||||
# - $replicate_local
|
||||
# - $replicate_path
|
||||
# - $contactstore
|
||||
# - $robots_txt_source
|
||||
apache::vhost { $vhost_name:
|
||||
port => 443,
|
||||
docroot => 'MEANINGLESS ARGUMENT',
|
||||
priority => '50',
|
||||
template => 'gerrit/gerrit.vhost.erb',
|
||||
ssl => true,
|
||||
}
|
||||
a2mod { 'rewrite':
|
||||
ensure => present,
|
||||
}
|
||||
a2mod { 'proxy':
|
||||
ensure => present,
|
||||
}
|
||||
a2mod { 'proxy_http':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
if $ssl_cert_file_contents != '' {
|
||||
file { $ssl_cert_file:
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0640',
|
||||
content => $ssl_cert_file_contents,
|
||||
before => Apache::Vhost[$vhost_name],
|
||||
}
|
||||
}
|
||||
|
||||
if $ssl_key_file_contents != '' {
|
||||
file { $ssl_key_file:
|
||||
owner => 'root',
|
||||
group => 'ssl-cert',
|
||||
mode => '0640',
|
||||
content => $ssl_key_file_contents,
|
||||
before => Apache::Vhost[$vhost_name],
|
||||
}
|
||||
}
|
||||
|
||||
if $ssl_chain_file_contents != '' {
|
||||
file { $ssl_chain_file:
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0640',
|
||||
content => $ssl_chain_file_contents,
|
||||
before => Apache::Vhost[$vhost_name],
|
||||
}
|
||||
}
|
||||
|
||||
if $robots_txt_source != '' {
|
||||
file { '/home/gerrit2/review_site/static/robots.txt':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
source => $robots_txt_source,
|
||||
require => File['/home/gerrit2/review_site/static'],
|
||||
}
|
||||
}
|
||||
|
||||
if $ssh_dsa_key_contents != '' {
|
||||
file { '/home/gerrit2/review_site/etc/ssh_host_dsa_key':
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0600',
|
||||
content => $ssh_dsa_key_contents,
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc']
|
||||
}
|
||||
}
|
||||
|
||||
if $ssh_dsa_pubkey_contents != '' {
|
||||
file { '/home/gerrit2/review_site/etc/ssh_host_dsa_key.pub':
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0644',
|
||||
content => $ssh_dsa_pubkey_contents,
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc']
|
||||
}
|
||||
}
|
||||
|
||||
if $ssh_rsa_key_contents != '' {
|
||||
file { '/home/gerrit2/review_site/etc/ssh_host_rsa_key':
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0600',
|
||||
content => $ssh_rsa_key_contents,
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc']
|
||||
}
|
||||
}
|
||||
|
||||
if $ssh_rsa_pubkey_contents != '' {
|
||||
file { '/home/gerrit2/review_site/etc/ssh_host_rsa_key.pub':
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0644',
|
||||
content => $ssh_rsa_pubkey_contents,
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc']
|
||||
}
|
||||
}
|
||||
|
||||
if $ssh_project_rsa_key_contents != '' {
|
||||
file { '/home/gerrit2/review_site/etc/ssh_project_rsa_key':
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0600',
|
||||
content => $ssh_project_rsa_key_contents,
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc']
|
||||
}
|
||||
}
|
||||
|
||||
if $ssh_project_rsa_pubkey_contents != '' {
|
||||
file { '/home/gerrit2/review_site/etc/ssh_project_rsa_key.pub':
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0644',
|
||||
content => $ssh_project_rsa_pubkey_contents,
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc']
|
||||
}
|
||||
}
|
||||
|
||||
if $ssh_replication_rsa_key_contents != '' {
|
||||
file { '/home/gerrit2/.ssh/id_rsa':
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0600',
|
||||
content => $ssh_replication_rsa_key_contents,
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/.ssh']
|
||||
}
|
||||
}
|
||||
|
||||
if $ssh_replication_rsa_pubkey_contents != '' {
|
||||
file { '/home/gerrit2/id_rsa.pub':
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0644',
|
||||
content => $ssh_replication_rsa_pubkey_contents,
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/.ssh']
|
||||
}
|
||||
}
|
||||
|
||||
# Install Gerrit itself.
|
||||
|
||||
# The Gerrit WAR is specified as a url like
|
||||
# 'http://tarballs.openstack.org/ci/gerrit-2.2.2-363-gd0a67ce.war'
|
||||
# Set $basewar so that we can work with filenames like
|
||||
# gerrit-2.2.2-363-gd0a67ce.war'.
|
||||
|
||||
if $war =~ /.*\/(.*)/ {
|
||||
$basewar = $1
|
||||
} else {
|
||||
$basewar = $war
|
||||
}
|
||||
|
||||
# This directory is used to download and cache gerrit war files.
|
||||
# That way the download and install steps are kept separate.
|
||||
file { '/home/gerrit2/gerrit-wars':
|
||||
ensure => directory,
|
||||
require => User['gerrit2'],
|
||||
}
|
||||
|
||||
# If we don't already have the specified WAR, download it.
|
||||
exec { "download:${war}":
|
||||
command => "/usr/bin/wget ${war} -O /home/gerrit2/gerrit-wars/${basewar}",
|
||||
creates => "/home/gerrit2/gerrit-wars/${basewar}",
|
||||
require => File['/home/gerrit2/gerrit-wars'],
|
||||
}
|
||||
|
||||
# If gerrit.war isn't the same as $basewar, install it.
|
||||
file { $gerrit_war:
|
||||
ensure => present,
|
||||
source => "file:///home/gerrit2/gerrit-wars/${basewar}",
|
||||
require => Exec["download:${war}"],
|
||||
replace => true,
|
||||
# user, group, and mode have to be set this way to avoid retriggering
|
||||
# gerrit-init on every run because gerrit init sets them this way
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0644',
|
||||
}
|
||||
|
||||
|
||||
# If gerrit.war was just installed, run the Gerrit "init" command.
|
||||
exec { 'gerrit-initial-init':
|
||||
user => 'gerrit2',
|
||||
command => "/usr/bin/java -jar ${gerrit_war} init -d ${gerrit_site} --batch --no-auto-start; /usr/bin/java -jar ${gerrit_war} reindex -d ${gerrit_site}",
|
||||
subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'],
|
||||
refreshonly => true,
|
||||
require => [Package['openjdk-7-jre-headless'],
|
||||
User['gerrit2'],
|
||||
File['/home/gerrit2/review_site/etc/gerrit.config'],
|
||||
File['/home/gerrit2/review_site/etc/secure.config']],
|
||||
notify => Exec['install-core-plugins'],
|
||||
unless => '/usr/bin/test -f /etc/init.d/gerrit',
|
||||
logoutput => true,
|
||||
}
|
||||
|
||||
# If a new gerrit.war was just installed, run the Gerrit "init" command.
|
||||
# Stop is included here because it may not be running or the init
|
||||
# script may not exist, and in those cases, we don't care if it fails.
|
||||
# Running the init script as the gerrit2 user _does_ work.
|
||||
exec { 'gerrit-init':
|
||||
user => 'gerrit2',
|
||||
command => "/etc/init.d/gerrit stop; /usr/bin/java -jar ${gerrit_war} init -d ${gerrit_site} --batch --no-auto-start; /usr/bin/java -jar ${gerrit_war} reindex -d ${gerrit_site}",
|
||||
subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'],
|
||||
refreshonly => true,
|
||||
require => [Package['openjdk-7-jre-headless'],
|
||||
User['gerrit2'],
|
||||
File['/home/gerrit2/review_site/etc/gerrit.config'],
|
||||
File['/home/gerrit2/review_site/etc/secure.config']],
|
||||
notify => Exec['install-core-plugins'],
|
||||
onlyif => '/usr/bin/test -f /etc/init.d/gerrit',
|
||||
logoutput => true,
|
||||
}
|
||||
|
||||
# Install Core Plugins
|
||||
exec { 'install-core-plugins':
|
||||
user => 'gerrit2',
|
||||
command => '/usr/bin/unzip -jo /home/gerrit2/review_site/bin/gerrit.war WEB-INF/plugins/* -d /home/gerrit2/review_site/plugins || true',
|
||||
subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'],
|
||||
require => [Package['unzip'],
|
||||
File['/home/gerrit2/review_site/plugins']],
|
||||
notify => Exec['gerrit-start'],
|
||||
refreshonly => true,
|
||||
logoutput => true,
|
||||
}
|
||||
|
||||
# Symlink the init script.
|
||||
file { '/etc/init.d/gerrit':
|
||||
ensure => link,
|
||||
target => '/home/gerrit2/review_site/bin/gerrit.sh',
|
||||
require => Exec['gerrit-initial-init'],
|
||||
}
|
||||
|
||||
# The init script requires the path to gerrit to be set.
|
||||
file { '/etc/default/gerritcodereview':
|
||||
ensure => present,
|
||||
source => 'puppet:///modules/gerrit/gerritcodereview.default',
|
||||
replace => true,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
}
|
||||
|
||||
# Make sure the init script starts on boot.
|
||||
file { ['/etc/rc0.d/K10gerrit',
|
||||
'/etc/rc1.d/K10gerrit',
|
||||
'/etc/rc2.d/S90gerrit',
|
||||
'/etc/rc3.d/S90gerrit',
|
||||
'/etc/rc4.d/S90gerrit',
|
||||
'/etc/rc5.d/S90gerrit',
|
||||
'/etc/rc6.d/K10gerrit']:
|
||||
ensure => link,
|
||||
target => '/etc/init.d/gerrit',
|
||||
require => File['/etc/init.d/gerrit'],
|
||||
}
|
||||
|
||||
exec { 'gerrit-start':
|
||||
command => '/etc/init.d/gerrit start',
|
||||
require => File['/etc/init.d/gerrit'],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
file { '/usr/local/gerrit':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
}
|
||||
|
||||
file { '/usr/local/gerrit/scripts':
|
||||
ensure => absent,
|
||||
}
|
||||
|
||||
package { 'libmysql-java':
|
||||
ensure => present,
|
||||
}
|
||||
file { '/home/gerrit2/review_site/lib/mysql-connector-java.jar':
|
||||
ensure => link,
|
||||
target => '/usr/share/java/mysql-connector-java.jar',
|
||||
require => [
|
||||
Package['libmysql-java'],
|
||||
File['/home/gerrit2/review_site/lib'],
|
||||
],
|
||||
}
|
||||
file { '/home/gerrit2/review_site/lib/mysql-connector-java-5.1.10.jar':
|
||||
ensure => absent,
|
||||
require => File['/home/gerrit2/review_site/lib/mysql-connector-java.jar'],
|
||||
}
|
||||
|
||||
package { 'libbcprov-java':
|
||||
ensure => present,
|
||||
}
|
||||
file { '/home/gerrit2/review_site/lib/bcprov.jar':
|
||||
ensure => link,
|
||||
target => '/usr/share/java/bcprov.jar',
|
||||
require => [
|
||||
Package['libbcprov-java'],
|
||||
File['/home/gerrit2/review_site/lib'],
|
||||
],
|
||||
}
|
||||
file { '/home/gerrit2/review_site/lib/bcprov-jdk16-144.jar':
|
||||
ensure => absent,
|
||||
require => File['/home/gerrit2/review_site/lib/bcprov.jar'],
|
||||
}
|
||||
|
||||
# Install Bouncy Castle's OpenPGP plugin and populate the contact store
|
||||
# public key file if we're using that feature.
|
||||
if ($contactstore == true) {
|
||||
package { 'libbcpg-java':
|
||||
ensure => present,
|
||||
}
|
||||
file { '/home/gerrit2/review_site/lib/bcpg.jar':
|
||||
ensure => link,
|
||||
target => '/usr/share/java/bcpg.jar',
|
||||
require => [
|
||||
Package['libbcpg-java'],
|
||||
File['/home/gerrit2/review_site/lib'],
|
||||
],
|
||||
}
|
||||
# Template uses $contactstore_pubkey
|
||||
file { '/home/gerrit2/review_site/etc/contact_information.pub':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
content => template('gerrit/contact_information.pub.erb'),
|
||||
replace => true,
|
||||
require => File['/home/gerrit2/review_site/etc'],
|
||||
}
|
||||
file { '/home/gerrit2/review_site/lib/fakestore.cgi':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0555',
|
||||
source => 'puppet:///modules/gerrit/fakestore.cgi',
|
||||
require => File['/home/gerrit2/review_site/lib'],
|
||||
}
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
# == Class: gerrit::mysql
|
||||
#
|
||||
class gerrit::mysql(
|
||||
$mysql_root_password = '',
|
||||
$database_name = '',
|
||||
$database_user = '',
|
||||
$database_password = '',
|
||||
) {
|
||||
|
||||
class { 'mysql::server':
|
||||
config_hash => {
|
||||
'root_password' => $mysql_root_password,
|
||||
'default_engine' => 'InnoDB',
|
||||
'bind_address' => '127.0.0.1',
|
||||
}
|
||||
}
|
||||
include mysql::server::account_security
|
||||
|
||||
mysql::db { $database_name:
|
||||
user => $database_user,
|
||||
password => $database_password,
|
||||
host => 'localhost',
|
||||
grant => ['all'],
|
||||
charset => 'latin1',
|
||||
require => [
|
||||
Class['mysql::server'],
|
||||
Class['mysql::server::account_security'],
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
@ -1,78 +0,0 @@
|
||||
# Copyright (C) 2014 R. Tyler Croy <tyler@monkeypox.org>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Defined resource type to install gerrit plugins.
|
||||
#
|
||||
# Borrowed from: https://github.com/jenkinsci/puppet-jenkins
|
||||
#
|
||||
|
||||
define gerrit::plugin(
|
||||
$version=0,
|
||||
) {
|
||||
$base_plugin = "${name}.jar"
|
||||
$plugin = "${name}-${version}.jar"
|
||||
$plugin_cache_dir = '/home/gerrit2/gerrit-plugins'
|
||||
$plugin_dir = '/home/gerrit2/review_site/plugins'
|
||||
$plugin_parent_dir = '/home/gerrit2/review_site'
|
||||
$base_url = "http://tarballs.openstack.org/ci/gerrit/plugins/${name}"
|
||||
|
||||
include gerrit::user
|
||||
|
||||
# This directory is used to download and cache gerrit plugin files.
|
||||
# That way the download and install steps are kept separate.
|
||||
if (!defined(File[$plugin_cache_dir])) {
|
||||
file { $plugin_cache_dir:
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
require => [
|
||||
File[$plugin_parent_dir],
|
||||
Class['gerrit::user'],
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
# If we don't already have the specified plugin, download it.
|
||||
exec { "download-${plugin}":
|
||||
command => "wget ${base_url}/${plugin} -O ${plugin_cache_dir}/${plugin}",
|
||||
path => ['/bin','/usr/bin', '/usr/sbin', '/usr/local/bin'],
|
||||
creates => "${plugin_cache_dir}/${plugin}",
|
||||
user => 'gerrit2',
|
||||
require => [
|
||||
File[$plugin_cache_dir],
|
||||
Class['gerrit::user'],
|
||||
],
|
||||
}
|
||||
|
||||
if (!defined(File[$plugin_dir])) {
|
||||
file { $plugin_dir:
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
require => [
|
||||
File[$plugin_parent_dir],
|
||||
Class['gerrit::user'],
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
exec { "install-${base_plugin}":
|
||||
command => "cp ${plugin_cache_dir}/${plugin} ${plugin_dir}/${base_plugin}",
|
||||
path => ['/bin','/usr/bin', '/usr/sbin', '/usr/local/bin'],
|
||||
require => Exec["download-${plugin}"],
|
||||
user => 'gerrit2',
|
||||
unless => "test -f ${plugin_dir}/${base_plugin}",
|
||||
}
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
# == Class: gerrit::remotes
|
||||
#
|
||||
class gerrit::remotes($ensure=present) {
|
||||
cron { 'gerritfetchremotes':
|
||||
ensure => $ensure,
|
||||
user => 'gerrit2',
|
||||
minute => '*/30',
|
||||
command => 'sleep $((RANDOM\%60+90)) && /usr/local/bin/manage-projects',
|
||||
require => [Class['jeepyb'], File['/var/lib/jeepyb']],
|
||||
}
|
||||
|
||||
file { '/var/lib/jeepyb':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
require => User['gerrit2'],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2/remotes.config':
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
# == Class: gerrit::user
|
||||
#
|
||||
class gerrit::user {
|
||||
|
||||
group { 'gerrit2':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
user { 'gerrit2':
|
||||
ensure => present,
|
||||
comment => 'Gerrit2 User',
|
||||
home => '/home/gerrit2',
|
||||
gid => 'gerrit2',
|
||||
shell => '/bin/bash',
|
||||
membership => 'minimum',
|
||||
require => Group['gerrit2'],
|
||||
}
|
||||
|
||||
file { '/home/gerrit2':
|
||||
ensure => directory,
|
||||
owner => 'gerrit2',
|
||||
group => 'gerrit2',
|
||||
mode => '0644',
|
||||
require => User['gerrit2'],
|
||||
}
|
||||
|
||||
}
|
@ -1 +0,0 @@
|
||||
<%= @contactstore_pubkey %>
|
@ -1,143 +0,0 @@
|
||||
# This file is managed by puppet.
|
||||
# https://git.openstack.org/cgit/openstack-infra/system-config
|
||||
|
||||
[gerrit]
|
||||
basePath = git
|
||||
canonicalWebUrl = <%= @canonicalweburl %>
|
||||
[database]
|
||||
type = MYSQL
|
||||
hostname = <%= @mysql_host %>
|
||||
database = reviewdb
|
||||
username = gerrit2
|
||||
<% if @database_poollimit != "" -%>
|
||||
poolLimit = <%= @database_poollimit %>
|
||||
<% end -%>
|
||||
connectionpool = true
|
||||
[auth]
|
||||
<% if @gerrit_contributor_agreement -%>
|
||||
contributorAgreements = true
|
||||
<% end -%>
|
||||
type = <%= @gerrit_auth_type %>
|
||||
cookieSecure = true
|
||||
enableRunAs = true
|
||||
<% if @gerrit_auth_type == 'OPENID_SSO' -%>
|
||||
openIdSsoUrl = <%= @openidssourl %>
|
||||
<% end -%>
|
||||
<% if @gerrit_auth_type == 'LDAP' -%>
|
||||
[ldap]
|
||||
server = <%= @ldap_server %>
|
||||
accountBase = <%= @ldap_account_base %>
|
||||
<% if @ldap_username -%>username = <%= @ldap_username %><%end%>
|
||||
<% if @ldap_password -%>password = <%= @ldap_password %><%end%>
|
||||
<% if @ldap_accountfullname -%>accountFullName = <%= @ldap_accountfullname %><%end%>
|
||||
accountPattern = <%= @ldap_account_pattern %>
|
||||
accountEmailAddress = <%= @ldap_account_email_address %>
|
||||
sslVerify = <%= @ldap_sslverify %>
|
||||
<% if @ldap_ssh_account_name -%>accountSshUserName = <%= @ldap_ssh_account_name %><%end%>
|
||||
<% end %>
|
||||
[sendemail]
|
||||
smtpServer = <%= @smtpserver %>
|
||||
from = <%= @sendemail_from %>
|
||||
[container]
|
||||
user = gerrit2
|
||||
javaHome = <%= @java_home %>
|
||||
<% if @container_heaplimit != "" -%>
|
||||
heapLimit = <%= @container_heaplimit %>
|
||||
<% end -%>
|
||||
[core]
|
||||
<% if @core_packedgitopenfiles != "" -%>
|
||||
packedGitOpenFiles = <%= @core_packedgitopenfiles %>
|
||||
<% end -%>
|
||||
<% if @core_packedgitlimit != "" -%>
|
||||
packedGitLimit = <%= @core_packedgitlimit %>
|
||||
<% end -%>
|
||||
<% if @core_packedgitwindowsize != "" -%>
|
||||
packedGitWindowSize = <%= @core_packedgitwindowsize %>
|
||||
<% end -%>
|
||||
[sshd]
|
||||
listenAddress = <%= @sshd_listen_address %>
|
||||
<% if @sshd_threads != "" -%>
|
||||
threads = <%= @sshd_threads %>
|
||||
<% end -%>
|
||||
[httpd]
|
||||
listenUrl = proxy-https://*:8081/
|
||||
<% if @httpd_maxwait != "" -%>
|
||||
maxWait = <%= @httpd_maxwait %>
|
||||
<% end -%>
|
||||
<% if @httpd_acceptorthreads != "" -%>
|
||||
acceptorThreads = <%= @httpd_acceptorthreads %>
|
||||
<% end -%>
|
||||
<% if @httpd_minthreads != "" -%>
|
||||
minThreads = <%= @httpd_minthreads %>
|
||||
<% end -%>
|
||||
<% if @httpd_maxthreads != "" -%>
|
||||
maxThreads = <%= @httpd_maxthreads %>
|
||||
<% end -%>
|
||||
[cache]
|
||||
directory = cache
|
||||
[cache "web_sessions"]
|
||||
maxAge = 1d
|
||||
[user]
|
||||
email = <%= @email %>
|
||||
<% @commentlinks.each do |commentlink| -%>
|
||||
[commentlink "<%= commentlink['name'] %>"]
|
||||
match = "<%= commentlink['match'] %>"
|
||||
<% if commentlink['link'] != "" -%>
|
||||
link = "<%= commentlink['link'] %>"
|
||||
<% end -%>
|
||||
<% if commentlink['html'] != "" -%>
|
||||
html = "<%= commentlink['html'] %>"
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% @trackingids.each do |trackingid| -%>
|
||||
[trackingid "<%= trackingid['name'] %>"]
|
||||
match = "<%= trackingid['match'] %>"
|
||||
footer = "<%= trackingid['footer'] %>"
|
||||
system = "<%= trackingid['system'] %>"
|
||||
<% end -%>
|
||||
[theme]
|
||||
backgroundColor = ffffff
|
||||
topMenuColor = ffffff
|
||||
textColor = 264d69
|
||||
trimColor = eef3f5
|
||||
selectionColor = d1e6ea
|
||||
changeTableOutdatedColor = f5cccc
|
||||
tableOddRowColor = ffffff
|
||||
tableEvenRowColor = f5f5ff
|
||||
[melody]
|
||||
monitoring = <%= @enable_melody %>
|
||||
session = <%= @melody_session %>
|
||||
[plugin "javamelody"]
|
||||
allowTopMenu = <%= @enable_javamelody_top_menu %>
|
||||
<% if gitweb or cgit -%>
|
||||
[gitweb]
|
||||
<% if gitweb -%>
|
||||
revision = "?p=${project}.git;a=commitdiff;h=${commit}"
|
||||
<% else -%>
|
||||
type = cgit
|
||||
<% end -%>
|
||||
<% if scope.lookupvar("gerrit::web_repo_url") -%>
|
||||
url = "<%= scope.lookupvar('gerrit::web_repo_url') %>"
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% if contactstore == true -%>
|
||||
[contactstore]
|
||||
appsec = <%= @contactstore_appsec %>
|
||||
url = <%= @contactstore_url %>
|
||||
<% end -%>
|
||||
<% if @secondary_index == true -%>
|
||||
[index]
|
||||
type = <%= @secondary_index_type %>
|
||||
<% end -%>
|
||||
[mimetype "image/*"]
|
||||
safe = true
|
||||
[mimetype "application/yaml"]
|
||||
safe = true
|
||||
[mimetype "application/xml"]
|
||||
safe = true
|
||||
[mimetype "application/rst"]
|
||||
safe = true
|
||||
[mimetype "application/txt"]
|
||||
safe = true
|
||||
[mimetype "application/html"]
|
||||
safe = true
|
@ -1,89 +0,0 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName <%= scope.lookupvar("gerrit::vhost_name") %>
|
||||
ServerAdmin <%= scope.lookupvar("gerrit::serveradmin") %>
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/gerrit-error.log
|
||||
|
||||
LogLevel warn
|
||||
|
||||
CustomLog ${APACHE_LOG_DIR}/gerrit-access.log combined
|
||||
|
||||
Redirect / https://<%= scope.lookupvar("gerrit::vhost_name") %>/
|
||||
|
||||
</VirtualHost>
|
||||
|
||||
<IfModule mod_ssl.c>
|
||||
<VirtualHost *:443>
|
||||
ServerName <%= scope.lookupvar("gerrit::vhost_name") %>
|
||||
ServerAdmin <%= scope.lookupvar("gerrit::serveradmin") %>
|
||||
AllowEncodedSlashes NoDecode
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/gerrit-ssl-error.log
|
||||
|
||||
LogLevel warn
|
||||
|
||||
CustomLog ${APACHE_LOG_DIR}/gerrit-ssl-access.log combined
|
||||
|
||||
SSLEngine on
|
||||
SSLProtocol All -SSLv2 -SSLv3
|
||||
|
||||
SSLCertificateFile <%= scope.lookupvar("gerrit::ssl_cert_file") %>
|
||||
SSLCertificateKeyFile <%= scope.lookupvar("gerrit::ssl_key_file") %>
|
||||
<% if scope.lookupvar("gerrit::ssl_chain_file") != "" %>
|
||||
SSLCertificateChainFile <%= scope.lookupvar("gerrit::ssl_chain_file") %>
|
||||
<% end %>
|
||||
|
||||
<FilesMatch "\.(cgi|shtml|phtml|php)$">
|
||||
SSLOptions +StdEnvVars
|
||||
</FilesMatch>
|
||||
<Directory /usr/lib/cgi-bin>
|
||||
SSLOptions +StdEnvVars
|
||||
</Directory>
|
||||
|
||||
BrowserMatch "MSIE [2-6]" \
|
||||
nokeepalive ssl-unclean-shutdown \
|
||||
downgrade-1.0 force-response-1.0
|
||||
# MSIE 7 and newer should be able to use keepalive
|
||||
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{HTTP_HOST} !<%= scope.lookupvar("gerrit::vhost_name") %>
|
||||
RewriteRule ^.*$ <%= scope.lookupvar("gerrit::canonicalweburl") %>
|
||||
<% if scope.lookupvar("gerrit::replicate_local") -%>
|
||||
RewriteCond %{REQUEST_URI} !^/p/
|
||||
<% end -%>
|
||||
<% if scope.lookupvar("gerrit::contactstore") == true -%>
|
||||
RewriteCond %{REQUEST_URI} !^/fakestore$
|
||||
<% end -%>
|
||||
<% if scope.lookupvar("gerrit::robots_txt_source") != "" -%>
|
||||
RewriteCond %{REQUEST_URI} !^/robots.txt$
|
||||
<% end -%>
|
||||
RewriteRule ^/(.*)$ http://localhost:8081/$1 [NE,P]
|
||||
|
||||
ProxyPassReverse / http://localhost:8081/
|
||||
|
||||
<% if scope.lookupvar("gerrit::robots_txt_source") != "" -%>
|
||||
Alias /robots.txt /home/gerrit2/review_site/static/robots.txt
|
||||
<% end -%>
|
||||
|
||||
<% if scope.lookupvar("gerrit::replicate_local") -%>
|
||||
SetEnv GIT_PROJECT_ROOT <%= scope.lookupvar("gerrit::replicate_path") %>
|
||||
SetEnv GIT_HTTP_EXPORT_ALL
|
||||
|
||||
AliasMatch ^/p/(.*/objects/[0-9a-f]{2}/[0-9a-f]{38})$ <%= scope.lookupvar("gerrit::replicate_path") %>/$1
|
||||
AliasMatch ^/p/(.*/objects/pack/pack-[0-9a-f]{40}.(pack|idx))$ <%= scope.lookupvar("gerrit::replicate_path") %>/$1
|
||||
ScriptAlias /p/ /usr/lib/git-core/git-http-backend/
|
||||
<% end -%>
|
||||
|
||||
<% if scope.lookupvar("gerrit::contactstore") == true -%>
|
||||
ScriptAlias /fakestore /home/gerrit2/review_site/lib/fakestore.cgi
|
||||
<% end -%>
|
||||
|
||||
<Directory /home/gerrit2/review_site/git/>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</Directory>
|
||||
|
||||
|
||||
</VirtualHost>
|
||||
</IfModule>
|
@ -1,22 +0,0 @@
|
||||
# This file is managed by puppet.
|
||||
# https://git.openstack.org/cgit/openstack-infra/system-config
|
||||
|
||||
<% @replication.each do |replication| -%>
|
||||
[remote "<%= replication['name'] %>"]
|
||||
url = <%= replication['url'] %>${name}.git
|
||||
<% if replication['replicationDelay'] != nil -%>
|
||||
replicationDelay = <%= replication['replicationDelay'] %>
|
||||
<% end -%>
|
||||
<% if replication['threads'] != nil -%>
|
||||
threads = <%= replication['threads'] %>
|
||||
<% end -%>
|
||||
<% if replication['authGroup'] != nil -%>
|
||||
authGroup = <%= replication['authGroup'] %>
|
||||
<% end -%>
|
||||
<% if replication['replicatePermissions'] != nil -%>
|
||||
replicatePermissions = <%= replication['replicatePermissions'] %>
|
||||
<% end -%>
|
||||
<% if replication['mirror'] != nil -%>
|
||||
mirror = <%= replication['mirror'] %>
|
||||
<% end -%>
|
||||
<% end -%>
|
@ -1,4 +0,0 @@
|
||||
[database]
|
||||
password = <%= @mysql_password %>
|
||||
[auth]
|
||||
registerEmailPrivateKey = <%= @email_private_key %>
|
Loading…
x
Reference in New Issue
Block a user