Add replication of git from gerrit to git.o.o
Modify gerrit's git replication configuration so that it pulls in from a list of replication targets defined in puppet rather than individually added stanzas. Pull the replicate_github variable from files, since it is no longer required. The replicate_local variable remains because it's used in the apache configuration and for setup of the local replication space for git. Also add the cgit server to the list of servers. Change-Id: I68de89bb216565f1754eb9b192bd437adcbf768b
This commit is contained in:
parent
d420137041
commit
1ae208113d
@ -56,8 +56,6 @@
|
||||
# A public key with which to encrypt contact information
|
||||
# contactstore_url:
|
||||
# A URL for the remote contact store application
|
||||
# replicate_github:
|
||||
# A boolean enabling replication to github
|
||||
# replicate_local:
|
||||
# A boolean enabling local replication for apache acceleration
|
||||
# gitweb:
|
||||
@ -108,8 +106,8 @@ class gerrit(
|
||||
$contactstore_url = '',
|
||||
$enable_melody = false,
|
||||
$melody_session = false,
|
||||
$replicate_github = false,
|
||||
$replicate_local = false,
|
||||
$replication = [],
|
||||
$replication_targets = [],
|
||||
$gitweb = true,
|
||||
$testmode = false
|
||||
|
@ -1,18 +1,22 @@
|
||||
# This file is managed by puppet.
|
||||
# https://github.com/openstack-infra/config
|
||||
|
||||
<% if replicate_github -%>
|
||||
[remote "github"]
|
||||
url = git@github.com:${name}.git
|
||||
authGroup = Anonymous Users
|
||||
replicatePermissions = false
|
||||
mirror = true
|
||||
<% 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 -%>
|
||||
|
||||
<% if replicate_local -%>
|
||||
[remote "local"]
|
||||
url = file:///var/lib/git/${name}.git
|
||||
replicationDelay = 0
|
||||
threads = 4
|
||||
mirror = true
|
||||
<% end -%>
|
||||
|
@ -49,8 +49,8 @@ class openstack_project::gerrit (
|
||||
$mysql_root_password = '',
|
||||
$trivial_rebase_role_id = '',
|
||||
$email_private_key = '',
|
||||
$replicate_github = true,
|
||||
$replicate_local = true,
|
||||
$replication = [],
|
||||
$local_git_dir = '/var/lib/git',
|
||||
$cla_description = 'OpenStack Individual Contributor License Agreement',
|
||||
$cla_file = 'static/cla.html',
|
||||
@ -148,8 +148,8 @@ class openstack_project::gerrit (
|
||||
mysql_password => $mysql_password,
|
||||
mysql_root_password => $mysql_root_password,
|
||||
email_private_key => $email_private_key,
|
||||
replicate_github => $replicate_github,
|
||||
replicate_local => $replicate_local,
|
||||
replication => $replication,
|
||||
testmode => $testmode,
|
||||
require => Class[openstack_project::server],
|
||||
}
|
||||
|
@ -53,7 +53,6 @@ class openstack_project::review (
|
||||
$lp_sync_secret='',
|
||||
$contactstore_appsec='',
|
||||
$contactstore_pubkey='',
|
||||
$replicate_github=true,
|
||||
$sysadmins = [],
|
||||
$swift_username = '',
|
||||
$swift_password = ''
|
||||
@ -102,11 +101,34 @@ class openstack_project::review (
|
||||
mysql_root_password => $mysql_root_password,
|
||||
trivial_rebase_role_id => 'trivial-rebase@review.openstack.org',
|
||||
email_private_key => $email_private_key,
|
||||
replicate_github => $replicate_github,
|
||||
sysadmins => $sysadmins,
|
||||
swift_username => $swift_username,
|
||||
swift_password => $swift_password,
|
||||
replication => [
|
||||
{
|
||||
name => 'github',
|
||||
url => 'git@github.com:',
|
||||
authGroup => 'Anonymous Users',
|
||||
replicatePermissions => false,
|
||||
mirror => true,
|
||||
},
|
||||
{
|
||||
name => 'local',
|
||||
url => 'file:///var/lib/git/',
|
||||
replicationDelay => '0',
|
||||
threads => '4',
|
||||
mirror => true,
|
||||
},
|
||||
{
|
||||
name => 'cgit',
|
||||
url => 'cgit@git.openstack.org:/var/lib/git/',
|
||||
replicationDelay => '0',
|
||||
threads => '4',
|
||||
mirror => true,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
class { 'gerritbot':
|
||||
nick => 'openstackgerrit',
|
||||
password => $gerritbot_password,
|
||||
|
@ -20,7 +20,6 @@ class openstack_project::review_dev (
|
||||
$lp_sync_consumer_key = '',
|
||||
$lp_sync_token = '',
|
||||
$lp_sync_secret = '',
|
||||
$replicate_github = true,
|
||||
$sysadmins = [],
|
||||
$swift_username = '',
|
||||
$swift_password = ''
|
||||
@ -59,10 +58,25 @@ class openstack_project::review_dev (
|
||||
trivial_rebase_role_id =>
|
||||
'trivial-rebase@review-dev.openstack.org',
|
||||
email_private_key => $email_private_key,
|
||||
replicate_github => $replicate_github,
|
||||
sysadmins => $sysadmins,
|
||||
swift_username => $swift_username,
|
||||
swift_password => $swift_password,
|
||||
replication => [
|
||||
{
|
||||
name => 'github',
|
||||
url => 'git@github.com:',
|
||||
authGroup => 'Anonymous Users',
|
||||
replicatePermissions => false,
|
||||
mirror => true,
|
||||
},
|
||||
{
|
||||
name => 'local',
|
||||
url => 'file:///var/lib/git/',
|
||||
replicationDelay => '0',
|
||||
threads => '4',
|
||||
mirror => true,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
file { '/var/log/gerrit_user_sync':
|
||||
|
Loading…
Reference in New Issue
Block a user