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
|
# A public key with which to encrypt contact information
|
||||||
# contactstore_url:
|
# contactstore_url:
|
||||||
# A URL for the remote contact store application
|
# A URL for the remote contact store application
|
||||||
# replicate_github:
|
|
||||||
# A boolean enabling replication to github
|
|
||||||
# replicate_local:
|
# replicate_local:
|
||||||
# A boolean enabling local replication for apache acceleration
|
# A boolean enabling local replication for apache acceleration
|
||||||
# gitweb:
|
# gitweb:
|
||||||
@ -108,8 +106,8 @@ class gerrit(
|
|||||||
$contactstore_url = '',
|
$contactstore_url = '',
|
||||||
$enable_melody = false,
|
$enable_melody = false,
|
||||||
$melody_session = false,
|
$melody_session = false,
|
||||||
$replicate_github = false,
|
|
||||||
$replicate_local = false,
|
$replicate_local = false,
|
||||||
|
$replication = [],
|
||||||
$replication_targets = [],
|
$replication_targets = [],
|
||||||
$gitweb = true,
|
$gitweb = true,
|
||||||
$testmode = false
|
$testmode = false
|
||||||
|
@ -1,18 +1,22 @@
|
|||||||
# This file is managed by puppet.
|
# This file is managed by puppet.
|
||||||
# https://github.com/openstack-infra/config
|
# https://github.com/openstack-infra/config
|
||||||
|
|
||||||
<% if replicate_github -%>
|
<% replication.each do |replication| -%>
|
||||||
[remote "github"]
|
[remote "<%= replication['name'] %>"]
|
||||||
url = git@github.com:${name}.git
|
url = <%= replication['url'] %>${name}.git
|
||||||
authGroup = Anonymous Users
|
<% if replication['replicationDelay'] != nil -%>
|
||||||
replicatePermissions = false
|
replicationDelay = <%= replication['replicationDelay'] %>
|
||||||
mirror = true
|
<% 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 -%>
|
||||||
|
|
||||||
<% if replicate_local -%>
|
|
||||||
[remote "local"]
|
|
||||||
url = file:///var/lib/git/${name}.git
|
|
||||||
replicationDelay = 0
|
|
||||||
threads = 4
|
|
||||||
mirror = true
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
@ -49,8 +49,8 @@ class openstack_project::gerrit (
|
|||||||
$mysql_root_password = '',
|
$mysql_root_password = '',
|
||||||
$trivial_rebase_role_id = '',
|
$trivial_rebase_role_id = '',
|
||||||
$email_private_key = '',
|
$email_private_key = '',
|
||||||
$replicate_github = true,
|
|
||||||
$replicate_local = true,
|
$replicate_local = true,
|
||||||
|
$replication = [],
|
||||||
$local_git_dir = '/var/lib/git',
|
$local_git_dir = '/var/lib/git',
|
||||||
$cla_description = 'OpenStack Individual Contributor License Agreement',
|
$cla_description = 'OpenStack Individual Contributor License Agreement',
|
||||||
$cla_file = 'static/cla.html',
|
$cla_file = 'static/cla.html',
|
||||||
@ -148,8 +148,8 @@ class openstack_project::gerrit (
|
|||||||
mysql_password => $mysql_password,
|
mysql_password => $mysql_password,
|
||||||
mysql_root_password => $mysql_root_password,
|
mysql_root_password => $mysql_root_password,
|
||||||
email_private_key => $email_private_key,
|
email_private_key => $email_private_key,
|
||||||
replicate_github => $replicate_github,
|
|
||||||
replicate_local => $replicate_local,
|
replicate_local => $replicate_local,
|
||||||
|
replication => $replication,
|
||||||
testmode => $testmode,
|
testmode => $testmode,
|
||||||
require => Class[openstack_project::server],
|
require => Class[openstack_project::server],
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,6 @@ class openstack_project::review (
|
|||||||
$lp_sync_secret='',
|
$lp_sync_secret='',
|
||||||
$contactstore_appsec='',
|
$contactstore_appsec='',
|
||||||
$contactstore_pubkey='',
|
$contactstore_pubkey='',
|
||||||
$replicate_github=true,
|
|
||||||
$sysadmins = [],
|
$sysadmins = [],
|
||||||
$swift_username = '',
|
$swift_username = '',
|
||||||
$swift_password = ''
|
$swift_password = ''
|
||||||
@ -102,11 +101,34 @@ class openstack_project::review (
|
|||||||
mysql_root_password => $mysql_root_password,
|
mysql_root_password => $mysql_root_password,
|
||||||
trivial_rebase_role_id => 'trivial-rebase@review.openstack.org',
|
trivial_rebase_role_id => 'trivial-rebase@review.openstack.org',
|
||||||
email_private_key => $email_private_key,
|
email_private_key => $email_private_key,
|
||||||
replicate_github => $replicate_github,
|
|
||||||
sysadmins => $sysadmins,
|
sysadmins => $sysadmins,
|
||||||
swift_username => $swift_username,
|
swift_username => $swift_username,
|
||||||
swift_password => $swift_password,
|
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':
|
class { 'gerritbot':
|
||||||
nick => 'openstackgerrit',
|
nick => 'openstackgerrit',
|
||||||
password => $gerritbot_password,
|
password => $gerritbot_password,
|
||||||
|
@ -20,7 +20,6 @@ class openstack_project::review_dev (
|
|||||||
$lp_sync_consumer_key = '',
|
$lp_sync_consumer_key = '',
|
||||||
$lp_sync_token = '',
|
$lp_sync_token = '',
|
||||||
$lp_sync_secret = '',
|
$lp_sync_secret = '',
|
||||||
$replicate_github = true,
|
|
||||||
$sysadmins = [],
|
$sysadmins = [],
|
||||||
$swift_username = '',
|
$swift_username = '',
|
||||||
$swift_password = ''
|
$swift_password = ''
|
||||||
@ -59,10 +58,25 @@ class openstack_project::review_dev (
|
|||||||
trivial_rebase_role_id =>
|
trivial_rebase_role_id =>
|
||||||
'trivial-rebase@review-dev.openstack.org',
|
'trivial-rebase@review-dev.openstack.org',
|
||||||
email_private_key => $email_private_key,
|
email_private_key => $email_private_key,
|
||||||
replicate_github => $replicate_github,
|
|
||||||
sysadmins => $sysadmins,
|
sysadmins => $sysadmins,
|
||||||
swift_username => $swift_username,
|
swift_username => $swift_username,
|
||||||
swift_password => $swift_password,
|
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':
|
file { '/var/log/gerrit_user_sync':
|
||||||
|
Loading…
Reference in New Issue
Block a user