Fix zuul installation
The following items were missing from an automated zuul install: * A pre-populated known hosts file * The git user/email for creating commits (.gitconfig existed on zuul.o.o, but switch to using zuul's config file instead). Also, make sure that the mergers specify the zuul server as the gearman server address rather than localhost. Change-Id: I47a473f60c4b5b2daaa910aa61cdf6e0c6fe1528
This commit is contained in:
parent
794b1d4e89
commit
17e09934db
@ -502,6 +502,7 @@ node 'zuul.openstack.org' {
|
|||||||
class { 'openstack_project::zuul_prod':
|
class { 'openstack_project::zuul_prod':
|
||||||
gerrit_server => 'review.openstack.org',
|
gerrit_server => 'review.openstack.org',
|
||||||
gerrit_user => 'jenkins',
|
gerrit_user => 'jenkins',
|
||||||
|
gerrit_ssh_host_key => hiera('gerrit_ssh_rsa_pubkey_contents'),
|
||||||
zuul_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
zuul_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
||||||
url_pattern => 'http://logs.openstack.org/{build.parameters[LOG_PATH]}',
|
url_pattern => 'http://logs.openstack.org/{build.parameters[LOG_PATH]}',
|
||||||
zuul_url => 'http://zuul.openstack.org/p',
|
zuul_url => 'http://zuul.openstack.org/p',
|
||||||
@ -526,8 +527,10 @@ node 'zuul.openstack.org' {
|
|||||||
|
|
||||||
node 'zm01.openstack.org' {
|
node 'zm01.openstack.org' {
|
||||||
class { 'openstack_project::zuul_merger':
|
class { 'openstack_project::zuul_merger':
|
||||||
|
gearman_server => 'zuul.openstack.org',
|
||||||
gerrit_server => 'review.openstack.org',
|
gerrit_server => 'review.openstack.org',
|
||||||
gerrit_user => 'jenkins',
|
gerrit_user => 'jenkins',
|
||||||
|
gerrit_ssh_host_key => hiera('gerrit_ssh_rsa_pubkey_contents'),
|
||||||
zuul_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
zuul_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
||||||
sysadmins => hiera('sysadmins'),
|
sysadmins => hiera('sysadmins'),
|
||||||
}
|
}
|
||||||
@ -535,8 +538,10 @@ node 'zm01.openstack.org' {
|
|||||||
|
|
||||||
node 'zm02.openstack.org' {
|
node 'zm02.openstack.org' {
|
||||||
class { 'openstack_project::zuul_merger':
|
class { 'openstack_project::zuul_merger':
|
||||||
|
gearman_server => 'zuul.openstack.org',
|
||||||
gerrit_server => 'review.openstack.org',
|
gerrit_server => 'review.openstack.org',
|
||||||
gerrit_user => 'jenkins',
|
gerrit_user => 'jenkins',
|
||||||
|
gerrit_ssh_host_key => hiera('gerrit_ssh_rsa_pubkey_contents'),
|
||||||
zuul_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
zuul_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
||||||
sysadmins => hiera('sysadmins'),
|
sysadmins => hiera('sysadmins'),
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,16 @@
|
|||||||
#
|
#
|
||||||
class openstack_project::zuul_dev(
|
class openstack_project::zuul_dev(
|
||||||
$vhost_name = $::fqdn,
|
$vhost_name = $::fqdn,
|
||||||
|
$gearman_server = '127.0.0.1',
|
||||||
$gerrit_server = '',
|
$gerrit_server = '',
|
||||||
$gerrit_user = '',
|
$gerrit_user = '',
|
||||||
|
$gerrit_ssh_host_key = '',
|
||||||
$zuul_ssh_private_key = '',
|
$zuul_ssh_private_key = '',
|
||||||
$url_pattern = '',
|
$url_pattern = '',
|
||||||
$zuul_url = '',
|
$zuul_url = '',
|
||||||
$sysadmins = [],
|
$sysadmins = [],
|
||||||
$statsd_host = '',
|
$statsd_host = '',
|
||||||
$gearman_workers = []
|
$gearman_workers = [],
|
||||||
) {
|
) {
|
||||||
# Turn a list of hostnames into a list of iptables rules
|
# Turn a list of hostnames into a list of iptables rules
|
||||||
$iptables_rules = regsubst ($gearman_workers, '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 4730 -s \1 -j ACCEPT')
|
$iptables_rules = regsubst ($gearman_workers, '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 4730 -s \1 -j ACCEPT')
|
||||||
@ -23,6 +25,7 @@ class openstack_project::zuul_dev(
|
|||||||
|
|
||||||
class { '::zuul':
|
class { '::zuul':
|
||||||
vhost_name => $vhost_name,
|
vhost_name => $vhost_name,
|
||||||
|
gearman_server => $gearman_server,
|
||||||
gerrit_server => $gerrit_server,
|
gerrit_server => $gerrit_server,
|
||||||
gerrit_user => $gerrit_user,
|
gerrit_user => $gerrit_user,
|
||||||
zuul_ssh_private_key => $zuul_ssh_private_key,
|
zuul_ssh_private_key => $zuul_ssh_private_key,
|
||||||
@ -31,11 +34,32 @@ class openstack_project::zuul_dev(
|
|||||||
job_name_in_report => true,
|
job_name_in_report => true,
|
||||||
status_url => 'http://zuul-dev.openstack.org/',
|
status_url => 'http://zuul-dev.openstack.org/',
|
||||||
statsd_host => $statsd_host,
|
statsd_host => $statsd_host,
|
||||||
|
git_email => 'jenkins@openstack.org',
|
||||||
|
git_name => 'OpenStack Jenkins',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::zuul::server': }
|
class { '::zuul::server': }
|
||||||
class { '::zuul::merger': }
|
class { '::zuul::merger': }
|
||||||
|
|
||||||
|
if $gerrit_ssh_host_key != '' {
|
||||||
|
file { '/home/zuul/.ssh':
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'zuul',
|
||||||
|
group => 'zuul',
|
||||||
|
mode => '0700',
|
||||||
|
require => Class['::zuul'],
|
||||||
|
}
|
||||||
|
file { '/home/zuul/.ssh/known_hosts':
|
||||||
|
ensure => present,
|
||||||
|
owner => 'zuul',
|
||||||
|
group => 'zuul',
|
||||||
|
mode => '0600',
|
||||||
|
content => "review.openstack.org ${gerrit_ssh_host_key}",
|
||||||
|
replace => true,
|
||||||
|
require => File['/home/zuul/.ssh'],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
file { '/etc/zuul/layout.yaml':
|
file { '/etc/zuul/layout.yaml':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => 'puppet:///modules/openstack_project/zuul/layout-dev.yaml',
|
source => 'puppet:///modules/openstack_project/zuul/layout-dev.yaml',
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
#
|
#
|
||||||
class openstack_project::zuul_merger(
|
class openstack_project::zuul_merger(
|
||||||
$vhost_name = $::fqdn,
|
$vhost_name = $::fqdn,
|
||||||
|
$gearman_server = '127.0.0.1',
|
||||||
$gerrit_server = '',
|
$gerrit_server = '',
|
||||||
$gerrit_user = '',
|
$gerrit_user = '',
|
||||||
|
$gerrit_ssh_host_key = '',
|
||||||
$zuul_ssh_private_key = '',
|
$zuul_ssh_private_key = '',
|
||||||
$zuul_url = "http://${::fqdn}/p",
|
$zuul_url = "http://${::fqdn}/p",
|
||||||
$sysadmins = [],
|
$sysadmins = [],
|
||||||
@ -16,14 +18,36 @@ class openstack_project::zuul_merger(
|
|||||||
|
|
||||||
class { '::zuul':
|
class { '::zuul':
|
||||||
vhost_name => $vhost_name,
|
vhost_name => $vhost_name,
|
||||||
|
gearman_server => $gearman_server,
|
||||||
gerrit_server => $gerrit_server,
|
gerrit_server => $gerrit_server,
|
||||||
gerrit_user => $gerrit_user,
|
gerrit_user => $gerrit_user,
|
||||||
zuul_ssh_private_key => $zuul_ssh_private_key,
|
zuul_ssh_private_key => $zuul_ssh_private_key,
|
||||||
zuul_url => $zuul_url,
|
zuul_url => $zuul_url,
|
||||||
|
git_email => 'jenkins@openstack.org',
|
||||||
|
git_name => 'OpenStack Jenkins',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::zuul::merger': }
|
class { '::zuul::merger': }
|
||||||
|
|
||||||
|
if $gerrit_ssh_host_key != '' {
|
||||||
|
file { '/home/zuul/.ssh':
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'zuul',
|
||||||
|
group => 'zuul',
|
||||||
|
mode => '0700',
|
||||||
|
require => Class['::zuul'],
|
||||||
|
}
|
||||||
|
file { '/home/zuul/.ssh/known_hosts':
|
||||||
|
ensure => present,
|
||||||
|
owner => 'zuul',
|
||||||
|
group => 'zuul',
|
||||||
|
mode => '0600',
|
||||||
|
content => "review.openstack.org ${gerrit_ssh_host_key}",
|
||||||
|
replace => true,
|
||||||
|
require => File['/home/zuul/.ssh'],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
file { '/etc/zuul/merger-logging.conf':
|
file { '/etc/zuul/merger-logging.conf':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => 'puppet:///modules/openstack_project/zuul/merger-logging.conf',
|
source => 'puppet:///modules/openstack_project/zuul/merger-logging.conf',
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
#
|
#
|
||||||
class openstack_project::zuul_prod(
|
class openstack_project::zuul_prod(
|
||||||
$vhost_name = $::fqdn,
|
$vhost_name = $::fqdn,
|
||||||
|
$gearman_server = '127.0.0.1',
|
||||||
$gerrit_server = '',
|
$gerrit_server = '',
|
||||||
$gerrit_user = '',
|
$gerrit_user = '',
|
||||||
|
$gerrit_ssh_host_key = '',
|
||||||
$zuul_ssh_private_key = '',
|
$zuul_ssh_private_key = '',
|
||||||
$url_pattern = '',
|
$url_pattern = '',
|
||||||
$zuul_url = '',
|
$zuul_url = '',
|
||||||
@ -23,6 +25,7 @@ class openstack_project::zuul_prod(
|
|||||||
|
|
||||||
class { '::zuul':
|
class { '::zuul':
|
||||||
vhost_name => $vhost_name,
|
vhost_name => $vhost_name,
|
||||||
|
gearman_server => $gearman_server,
|
||||||
gerrit_server => $gerrit_server,
|
gerrit_server => $gerrit_server,
|
||||||
gerrit_user => $gerrit_user,
|
gerrit_user => $gerrit_user,
|
||||||
zuul_ssh_private_key => $zuul_ssh_private_key,
|
zuul_ssh_private_key => $zuul_ssh_private_key,
|
||||||
@ -31,10 +34,31 @@ class openstack_project::zuul_prod(
|
|||||||
job_name_in_report => true,
|
job_name_in_report => true,
|
||||||
status_url => 'http://status.openstack.org/zuul/',
|
status_url => 'http://status.openstack.org/zuul/',
|
||||||
statsd_host => $statsd_host,
|
statsd_host => $statsd_host,
|
||||||
|
git_email => 'jenkins@openstack.org',
|
||||||
|
git_name => 'OpenStack Jenkins',
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::zuul::server': }
|
class { '::zuul::server': }
|
||||||
|
|
||||||
|
if $gerrit_ssh_host_key != '' {
|
||||||
|
file { '/home/zuul/.ssh':
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'zuul',
|
||||||
|
group => 'zuul',
|
||||||
|
mode => '0700',
|
||||||
|
require => Class['::zuul'],
|
||||||
|
}
|
||||||
|
file { '/home/zuul/.ssh/known_hosts':
|
||||||
|
ensure => present,
|
||||||
|
owner => 'zuul',
|
||||||
|
group => 'zuul',
|
||||||
|
mode => '0600',
|
||||||
|
content => "review.openstack.org ${gerrit_ssh_host_key}",
|
||||||
|
replace => true,
|
||||||
|
require => File['/home/zuul/.ssh'],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
file { '/etc/zuul/layout.yaml':
|
file { '/etc/zuul/layout.yaml':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
source => 'puppet:///modules/openstack_project/zuul/layout.yaml',
|
source => 'puppet:///modules/openstack_project/zuul/layout.yaml',
|
||||||
|
@ -32,6 +32,8 @@ class zuul (
|
|||||||
$job_name_in_report = false,
|
$job_name_in_report = false,
|
||||||
$revision = 'master',
|
$revision = 'master',
|
||||||
$statsd_host = '',
|
$statsd_host = '',
|
||||||
|
$git_email = '',
|
||||||
|
$git_name = '',
|
||||||
) {
|
) {
|
||||||
include apache
|
include apache
|
||||||
include pip
|
include pip
|
||||||
|
@ -24,3 +24,9 @@ zuul_url=<%= zuul_url %>
|
|||||||
git_dir=/var/lib/zuul/git
|
git_dir=/var/lib/zuul/git
|
||||||
zuul_url=<%= zuul_url %>
|
zuul_url=<%= zuul_url %>
|
||||||
log_config=/etc/zuul/merger-logging.conf
|
log_config=/etc/zuul/merger-logging.conf
|
||||||
|
<% if git_email != "" -%>
|
||||||
|
git_user_email=<%= git_email %>
|
||||||
|
<% end -%>
|
||||||
|
<% if git_name != "" -%>
|
||||||
|
git_user_name=<%= git_name %>
|
||||||
|
<% end -%>
|
||||||
|
Loading…
Reference in New Issue
Block a user