Add jeepyb & cgit repo creation script to git.o.o
Includes the jeepyb and required pip modules to the new git.openstack.org server. Also installs and sets up the create_cgitrepos.py script for creating the /etc/cgitrepos configuration file Change-Id: I06606ca73541dd328f413bfdbd2810fe66ca633b
This commit is contained in:
@@ -17,15 +17,22 @@
|
||||
# == Class: openstack_project::git
|
||||
class openstack_project::git (
|
||||
$sysadmins = [],
|
||||
$git_gerrit_ssh_key = $git_gerrit_ssh_key,
|
||||
$gerrit_url = 'review.openstack.org'
|
||||
$git_gerrit_ssh_key = '',
|
||||
) {
|
||||
class { 'openstack_project::server':
|
||||
iptables_public_tcp_ports => [80, 9418],
|
||||
sysadmins => $sysadmins,
|
||||
}
|
||||
|
||||
# We don't actually use these, but jeepyb requires them.
|
||||
class {'jeepyb::git':
|
||||
local_git_dir => '/var/lib/git',
|
||||
ssh_project_key => '',
|
||||
}
|
||||
|
||||
include cgit
|
||||
include jeepyb
|
||||
include pip
|
||||
|
||||
file { '/etc/cgitrc':
|
||||
ensure => present,
|
||||
@@ -43,15 +50,32 @@ class openstack_project::git (
|
||||
require => User['cgit'],
|
||||
}
|
||||
|
||||
file { '/home/cgit/.ssh/known_hosts':
|
||||
file { '/home/cgit/.ssh/authorized_keys':
|
||||
owner => 'cgit',
|
||||
group => 'cgit',
|
||||
mode => '0600',
|
||||
content => "${gerrit_url} ${git_gerrit_ssh_key}",
|
||||
content => $git_gerrit_ssh_key,
|
||||
replace => true,
|
||||
require => File['/home/cgit/.ssh/']
|
||||
}
|
||||
|
||||
file { '/home/cgit/projects.yaml':
|
||||
ensure => present,
|
||||
owner => 'cgit',
|
||||
group => 'cgit',
|
||||
mode => '0444',
|
||||
content => template('openstack_project/review.projects.yaml.erb'),
|
||||
replace => true,
|
||||
}
|
||||
|
||||
exec { 'create_cgitrepos':
|
||||
command => 'create-cgitrepos',
|
||||
path => '/bin:/usr/bin:/usr/local/bin',
|
||||
require => File['/home/cgit/projects.yaml'],
|
||||
subscribe => File['/home/cgit/projects.yaml'],
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
class { 'selinux':
|
||||
mode => 'enforcing'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user