Fix Jenkins modules.

Previously you could not use the Jenkins module to go from fresh host to
running jenkins. There were two problems.
1. jenkins::master does not explicitly create a jenkins user which is
required by Zuul. Instead the jenkins deb package creates the users.
Zuul File resources that need the jenkins user should require the
jenkins package.
2. jenkins::master did not install Bazaar but attempted to run a service
that depended on bzr.

Correct these two errors (require jenkins package and remove bzr
service).

Change-Id: Ib2d6f58fbcd456781f10cf2ceefc11503d6f92f2
Reviewed-on: https://review.openstack.org/13926
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Clark Boylan 2012-10-01 15:11:43 -07:00 committed by Jenkins
parent e030293b15
commit a4f1a267ac
2 changed files with 12 additions and 24 deletions

View File

@ -4,8 +4,7 @@ class jenkins::master($vhost_name=$fqdn,
$ssl_cert_file='',
$ssl_key_file='',
$ssl_chain_file=''
) {
) {
include pip
include apt
include apache
@ -43,8 +42,8 @@ class jenkins::master($vhost_name=$fqdn,
}
$packages = [
"python-babel",
"wget",
'python-babel',
'wget',
]
package { $packages:
@ -56,21 +55,6 @@ class jenkins::master($vhost_name=$fqdn,
require => Apt::Source['jenkins'],
}
service { "versions":
provider => upstart,
ensure => running,
}
file { '/etc/init/versions.conf':
owner => 'root',
group => 'root',
mode => 444,
ensure => 'present',
source => "puppet:///modules/jenkins/versions.conf",
replace => 'true',
notify => Service["versions"]
}
package { "apache-libcloud":
ensure => present,
provider => pip,

View File

@ -62,27 +62,31 @@ class zuul (
mode => 400,
ensure => 'present',
content => template('zuul/zuul.conf.erb'),
require => File["/etc/zuul"],
require => [File["/etc/zuul"], Package['jenkins']]
}
file { "/var/log/zuul":
ensure => "directory",
owner => 'jenkins'
owner => 'jenkins',
require => Package['jenkins']
}
file { "/var/run/zuul":
ensure => "directory",
owner => 'jenkins'
owner => 'jenkins',
require => Package['jenkins']
}
file { "/var/lib/zuul":
ensure => "directory",
owner => 'jenkins'
owner => 'jenkins',
require => Package['jenkins']
}
file { "/var/lib/zuul/git":
ensure => "directory",
owner => 'jenkins'
owner => 'jenkins',
require => Package['jenkins']
}
file { "/etc/init.d/zuul/":