Add zuul.conf.
Add a templated zuul.conf with apikey filled in by hiera. Made an openstack_project::zuul class to encapsulate installation and config of zuul with our config files. Change-Id: Idc09819b27672879b74b90bdbf699b07aa416a2a Reviewed-on: https://review.openstack.org/10460 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Monty Taylor <mordred@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
e63619e980
commit
5fdfa26704
@ -32,6 +32,13 @@ node "jenkins.openstack.org" {
|
||||
class { 'openstack_project::jenkins':
|
||||
jenkins_jobs_password => hiera('jenkins_jobs_password'),
|
||||
}
|
||||
class { "openstack_project::zuul":
|
||||
jenkins_server => "https://$fqdn",
|
||||
jenkins_user => 'hudson-openstack',
|
||||
jenkins_apikey => hiera('zuul_jenkins_apikey'),
|
||||
gerrit_server => 'review.openstack.org',
|
||||
gerrit_user => 'jenkins',
|
||||
}
|
||||
}
|
||||
|
||||
node "jenkins-dev.openstack.org" {
|
||||
|
@ -1,5 +1,4 @@
|
||||
class openstack_project::jenkins($jenkins_jobs_password) {
|
||||
include openstack_project::zuul_config
|
||||
|
||||
class { 'openstack_project::server':
|
||||
iptables_public_tcp_ports => [80, 443, 4155]
|
||||
@ -22,4 +21,5 @@ class openstack_project::jenkins($jenkins_jobs_password) {
|
||||
ensure => 'present',
|
||||
source => 'puppet:///modules/openstack_project/jenkins/jenkins.default'
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,18 @@
|
||||
class openstack_project::zuul_config {
|
||||
include ::zuul
|
||||
class openstack_project::zuul(
|
||||
$jenkins_server,
|
||||
$jenkins_user,
|
||||
$jenkins_apikey,
|
||||
$gerrit_server,
|
||||
$gerrit_user
|
||||
) {
|
||||
|
||||
class { "::zuul":
|
||||
jenkins_server => $jenkins_server,
|
||||
jenkins_user => $jenkins_user,
|
||||
jenkins_apikey => $jenkins_apikey,
|
||||
gerrit_server => $gerrit_server,
|
||||
gerrit_user => $gerrit_user,
|
||||
}
|
||||
|
||||
file { "/etc/zuul/layout.yaml":
|
||||
ensure => 'present',
|
@ -1,5 +1,10 @@
|
||||
class zuul ()
|
||||
{
|
||||
class zuul (
|
||||
$jenkins_server,
|
||||
$jenkins_user,
|
||||
$jenkins_apikey,
|
||||
$gerrit_server,
|
||||
$gerrit_user
|
||||
) {
|
||||
$packages = ["python-webob",
|
||||
"python-daemon",
|
||||
"python-paste"]
|
||||
@ -37,6 +42,17 @@ class zuul ()
|
||||
ensure => "directory",
|
||||
}
|
||||
|
||||
# TODO: We should put in notify either Service['zuul'] or Exec['zuul-reload']
|
||||
# at some point, but that still has some problems.
|
||||
file { "/etc/zuul/zuul.conf":
|
||||
owner => 'jenkins',
|
||||
group => 'jenkins',
|
||||
mode => 400,
|
||||
ensure => 'present',
|
||||
content => template('zuul/zuul.conf.erb'),
|
||||
require => File["/etc/zuul"],
|
||||
}
|
||||
|
||||
file { "/var/log/zuul":
|
||||
ensure => "directory",
|
||||
owner => 'jenkins'
|
||||
|
14
modules/zuul/templates/zuul.conf.erb
Normal file
14
modules/zuul/templates/zuul.conf.erb
Normal file
@ -0,0 +1,14 @@
|
||||
[jenkins]
|
||||
server=<%= jenkins_server %>
|
||||
user=<%= jenkins_user %>
|
||||
apikey=<%= jenkins_apikey %>
|
||||
|
||||
[gerrit]
|
||||
server=<%= gerrit_server %>
|
||||
user=<%= gerrit_user %>
|
||||
sshkey=/var/lib/jenkins/.ssh/id_rsa
|
||||
|
||||
[zuul]
|
||||
layout_config=/etc/zuul/layout.yaml
|
||||
log_config=/etc/zuul/logging.conf
|
||||
state_dir=/var/lib/zuul
|
Loading…
x
Reference in New Issue
Block a user