Set some parameters to more sensible defaults.
Also, moved depends for launchpad sync script to the launchpad sync module, and put the ntp stuff into an ntp module. Change-Id: I2568752493fefa305f9108a23da101d80a311552
This commit is contained in:
parent
0b921968d1
commit
ef3881d487
@ -1,6 +1,6 @@
|
|||||||
class gerrit::cron(
|
class gerrit::cron(
|
||||||
$script_user,
|
$script_user='update',
|
||||||
$script_key_file
|
$script_key_file='/home/gerrit2/.ssh/id_rsa'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
cron { "expireoldreviews":
|
cron { "expireoldreviews":
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
|
|
||||||
class gerrit($virtual_hostname=$fqdn,
|
class gerrit($virtual_hostname=$fqdn,
|
||||||
$canonicalweburl="https://$fqdn/",
|
$canonicalweburl="https://$fqdn/",
|
||||||
$ssl_cert_file='',
|
$ssl_cert_file='/etc/ssl/certs/ssl-cert-snakeoil.pem',
|
||||||
$ssl_key_file='',
|
$ssl_key_file='/etc/ssl/private/ssl-cert-snakeoil.key',
|
||||||
$ssl_chain_file='',
|
$ssl_chain_file='',
|
||||||
$openidssourl="https://login.launchpad.net/+openid",
|
$openidssourl="https://login.launchpad.net/+openid",
|
||||||
$email='',
|
$email='',
|
||||||
@ -70,8 +70,6 @@ class gerrit($virtual_hostname=$fqdn,
|
|||||||
$httpd_maxwait='',
|
$httpd_maxwait='',
|
||||||
$commentlinks = [],
|
$commentlinks = [],
|
||||||
$war,
|
$war,
|
||||||
$script_user,
|
|
||||||
$script_key_file,
|
|
||||||
$enable_melody = 'false',
|
$enable_melody = 'false',
|
||||||
$melody_session = 'false',
|
$melody_session = 'false',
|
||||||
$mysql_password,
|
$mysql_password,
|
||||||
|
@ -1,11 +1,23 @@
|
|||||||
class launchpad_sync(
|
class launchpad_sync(
|
||||||
$user,
|
$user='gerrit2',
|
||||||
$script_user,
|
$script_user='update',
|
||||||
$script_key_file,
|
$script_key_file='/home/gerrit2/.ssh/id_rsa',
|
||||||
$site,
|
$site,
|
||||||
$root_team
|
$root_team
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
include mysql
|
||||||
|
include mysql::python
|
||||||
|
|
||||||
|
$packages = [
|
||||||
|
"python-openid", # for launchpad sync script
|
||||||
|
"python-launchpadlib", # for launchpad sync script
|
||||||
|
]
|
||||||
|
|
||||||
|
package { $packages:
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
|
||||||
file { '/usr/local/bin/update_gerrit_users.py':
|
file { '/usr/local/bin/update_gerrit_users.py':
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
|
15
modules/ntp/manifests/init.pp
Normal file
15
modules/ntp/manifests/init.pp
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
class ntp {
|
||||||
|
|
||||||
|
package { "ntp":
|
||||||
|
ensure => installed
|
||||||
|
}
|
||||||
|
|
||||||
|
service { 'ntpd':
|
||||||
|
name => 'ntp',
|
||||||
|
ensure => running,
|
||||||
|
enable => true,
|
||||||
|
hasrestart => true,
|
||||||
|
require => Package['ntp'],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -21,8 +21,8 @@ class openstack_project::gerrit (
|
|||||||
$httpd_maxthreads='',
|
$httpd_maxthreads='',
|
||||||
$httpd_maxwait='',
|
$httpd_maxwait='',
|
||||||
$war,
|
$war,
|
||||||
$script_user,
|
$script_user='update',
|
||||||
$script_key_file,
|
$script_key_file='/home/gerrit2/.ssh/id_rsa',
|
||||||
$github_projects = [],
|
$github_projects = [],
|
||||||
$github_username,
|
$github_username,
|
||||||
$github_oauth_token,
|
$github_oauth_token,
|
||||||
@ -31,19 +31,6 @@ class openstack_project::gerrit (
|
|||||||
$email_private_key,
|
$email_private_key,
|
||||||
$testmode=false,
|
$testmode=false,
|
||||||
) {
|
) {
|
||||||
class { 'openstack_project::server':
|
|
||||||
iptables_public_tcp_ports => [80, 443, 29418]
|
|
||||||
}
|
|
||||||
|
|
||||||
$packages = [
|
|
||||||
"python-mysqldb", # for launchpad sync script
|
|
||||||
"python-openid", # for launchpad sync script
|
|
||||||
"python-launchpadlib", # for launchpad sync script
|
|
||||||
]
|
|
||||||
|
|
||||||
package { $packages:
|
|
||||||
ensure => present,
|
|
||||||
}
|
|
||||||
|
|
||||||
class { '::gerrit':
|
class { '::gerrit':
|
||||||
virtual_hostname => $virtual_hostname,
|
virtual_hostname => $virtual_hostname,
|
||||||
@ -80,13 +67,12 @@ class openstack_project::gerrit (
|
|||||||
link => 'https://blueprints.launchpad.net/openstack/?searchtext=$2' },
|
link => 'https://blueprints.launchpad.net/openstack/?searchtext=$2' },
|
||||||
],
|
],
|
||||||
war => $war,
|
war => $war,
|
||||||
script_user => $script_user,
|
|
||||||
script_key_file => $script_key_file,
|
|
||||||
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 => true,
|
replicate_github => true,
|
||||||
testmode => $testmode,
|
testmode => $testmode,
|
||||||
|
require => Class[openstack_project::server],
|
||||||
}
|
}
|
||||||
if ($testmode == false) {
|
if ($testmode == false) {
|
||||||
class { 'gerrit::cron':
|
class { 'gerrit::cron':
|
||||||
|
@ -11,8 +11,6 @@ class openstack_project::review_dev(
|
|||||||
ssl_chain_file => '',
|
ssl_chain_file => '',
|
||||||
email => "review-dev@openstack.org",
|
email => "review-dev@openstack.org",
|
||||||
war => 'http://tarballs.openstack.org/ci/gerrit-2.4.2-11-gb5a28fb.war',
|
war => 'http://tarballs.openstack.org/ci/gerrit-2.4.2-11-gb5a28fb.war',
|
||||||
script_user => 'update',
|
|
||||||
script_key_file => '/home/gerrit2/.ssh/id_rsa',
|
|
||||||
github_projects => [ {
|
github_projects => [ {
|
||||||
name => 'gtest-org/test',
|
name => 'gtest-org/test',
|
||||||
close_pull => 'true'
|
close_pull => 'true'
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# A template host with no running services
|
# A template host with no running services
|
||||||
class openstack_project::template ($iptables_public_tcp_ports) {
|
class openstack_project::template ($iptables_public_tcp_ports) {
|
||||||
include openstack_project::base
|
include openstack_project::base
|
||||||
|
include ntp
|
||||||
include ssh
|
include ssh
|
||||||
include snmpd
|
include snmpd
|
||||||
include apt::unattended-upgrades
|
include apt::unattended-upgrades
|
||||||
@ -8,16 +9,4 @@ class openstack_project::template ($iptables_public_tcp_ports) {
|
|||||||
class { 'iptables':
|
class { 'iptables':
|
||||||
public_tcp_ports => $iptables_public_tcp_ports,
|
public_tcp_ports => $iptables_public_tcp_ports,
|
||||||
}
|
}
|
||||||
|
|
||||||
package { "ntp":
|
|
||||||
ensure => installed
|
|
||||||
}
|
|
||||||
|
|
||||||
service { 'ntpd':
|
|
||||||
name => 'ntp',
|
|
||||||
ensure => running,
|
|
||||||
enable => true,
|
|
||||||
hasrestart => true,
|
|
||||||
require => Package['ntp'],
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user