Cleanup jenkins manifest lint errors. Take 2.

Change-Id: Id45aa43e20d281babd89f06f552bb244f2da353a
Reviewed-on: https://review.openstack.org/14896
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Matthew Wagoner 2012-10-26 12:36:43 -04:00 committed by Jenkins
parent 02d0aa1ecb
commit 2332c2ecfc
5 changed files with 405 additions and 414 deletions

View File

@ -1,37 +1,40 @@
# == Class: jenkins::cgroups
#
class jenkins::cgroups { class jenkins::cgroups {
package { 'cgroup-bin': package { 'cgroup-bin':
ensure => present ensure => present,
} }
file { '/etc/cgconfig.conf': file { '/etc/cgconfig.conf':
ensure => present, ensure => present,
replace => true, replace => true,
owner => root, owner => 'root',
mode => 0644, group => 'jenkins',
content => template('jenkins/cgconfig.erb') mode => '0644',
content => template('jenkins/cgconfig.erb'),
} }
file { '/etc/cgrules.conf': file { '/etc/cgrules.conf':
ensure => present, ensure => present,
replace => true, replace => true,
owner => root, owner => 'root',
mode => 0644, group => 'jenkins',
source => 'puppet:///modules/jenkins/cgroups/cgrules.conf' mode => '0644',
source => 'puppet:///modules/jenkins/cgroups/cgrules.conf',
} }
service { 'cgconfig': service { 'cgconfig':
enable => true,
ensure => running, ensure => running,
enable => true,
require => Package['cgroup-bin'], require => Package['cgroup-bin'],
subscribe => File['/etc/cgconfig.conf'] subscribe => File['/etc/cgconfig.conf'],
} }
service { 'cgred': service { 'cgred':
enable => true,
ensure => running, ensure => running,
enable => true,
require => Package['cgroup-bin'], require => Package['cgroup-bin'],
subscribe => File['/etc/cgrules.conf'] subscribe => File['/etc/cgrules.conf'],
} }
} }

View File

@ -1,7 +1,13 @@
class jenkins::jenkinsuser($ensure = present, $sudo = false, $ssh_key) { # == Class: jenkins::jenkinsuser
#
class jenkins::jenkinsuser(
$ssh_key,
$ensure = present,
$sudo = false,
) {
group { 'jenkins': group { 'jenkins':
ensure => 'present' ensure => present,
} }
if ($sudo == true) { if ($sudo == true) {
@ -11,150 +17,132 @@ class jenkins::jenkinsuser($ensure = present, $sudo = false, $ssh_key) {
} }
user { 'jenkins': user { 'jenkins':
ensure => 'present', ensure => present,
comment => 'Jenkins User', comment => 'Jenkins User',
home => '/home/jenkins', home => '/home/jenkins',
gid => 'jenkins', gid => 'jenkins',
shell => '/bin/bash', shell => '/bin/bash',
membership => 'minimum', membership => 'minimum',
groups => $groups, groups => $groups,
require => Group['jenkins'] require => Group['jenkins'],
} }
file { 'jenkinshome': file { '/home/jenkins':
name => '/home/jenkins', ensure => directory,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 644, mode => '0644',
ensure => 'directory', require => User['jenkins'],
require => User['jenkins']
} }
file { 'jenkinspipdir': file { '/home/jenkins/.pip':
name => '/home/jenkins/.pip', ensure => directory,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
ensure => 'directory', require => File['/home/jenkins'],
require => File['jenkinshome'],
} }
file { 'jenkinspipconf': file { '/home/jenkins/.pip/pip.conf':
name => '/home/jenkins/.pip/pip.conf', ensure => present,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 640, mode => '0640',
ensure => 'present', source => 'puppet:///modules/jenkins/pip.conf',
source => "puppet:///modules/jenkins/pip.conf", require => File['/home/jenkins/.pip'],
require => File['jenkinspipdir'],
} }
file { 'jenkinspydistutilscfg': file { '/home/jenkins/.pydistutils.cfg':
name => '/home/jenkins/.pydistutils.cfg', ensure => absent,
ensure => 'absent', require => File['/home/jenkins'],
require => File['jenkinshome'],
} }
file { 'jenkinsgitconfig': file { '/home/jenkins/.gitconfig':
name => '/home/jenkins/.gitconfig', ensure => present,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 640, mode => '0640',
ensure => 'present', source => 'puppet:///modules/jenkins/gitconfig',
source => "puppet:///modules/jenkins/gitconfig", require => File['/home/jenkins'],
require => File['jenkinshome'],
} }
file { 'jenkinssshdir': file { '/home/jenkins/.ssh':
name => '/home/jenkins/.ssh', ensure => directory,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 600, mode => '0600',
ensure => 'directory', require => File['/home/jenkins'],
require => File['jenkinshome'],
} }
file { 'jenkinskeys': file { '/home/jenkins/.ssh/authorized_keys':
name => '/home/jenkins/.ssh/authorized_keys', ensure => present,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 640, mode => '0640',
content => "${ssh_key}", content => $ssh_key,
ensure => 'present', require => File['/home/jenkins/.ssh'],
require => File['jenkinssshdir'],
} }
file { 'jenkinsbashrc': file { '/home/jenkins/.bashrc':
name => '/home/jenkins/.bashrc', ensure => present,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 640, mode => '0640',
source => "/etc/skel/.bashrc", source => '/etc/skel/.bashrc',
replace => 'false', replace => false,
ensure => 'present', require => File['/home/jenkins'],
} }
file { 'jenkinsbash_logout': file { '/home/jenkins/.bash_logout':
name => '/home/jenkins/.bash_logout', ensure => present,
source => "/etc/skel/.bash_logout", source => '/etc/skel/.bash_logout',
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 640, mode => '0640',
replace => 'false', replace => false,
ensure => 'present', require => File['/home/jenkins'],
} }
file { 'jenkinsprofile': file { '/home/jenkins/.profile':
name => '/home/jenkins/.profile', ensure => present,
source => "/etc/skel/.profile", source => '/etc/skel/.profile',
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 640, mode => '0640',
replace => 'false', replace => false,
ensure => 'present', require => File['/home/jenkins'],
} }
file { 'jenkinssshconfig': file { '/home/jenkins/.ssh/config':
name => '/home/jenkins/.ssh/config', ensure => present,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 640, mode => '0640',
ensure => 'present', require => File['/home/jenkins/.ssh'],
require => File['jenkinssshdir'], source => 'puppet:///modules/jenkins/ssh_config',
source => [
"puppet:///modules/jenkins/ssh_config",
],
} }
file { 'jenkinsgpgdir': file { '/home/jenkins/.gnupg':
name => '/home/jenkins/.gnupg', ensure => directory,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 700, mode => '0700',
ensure => 'directory', require => File['/home/jenkins'],
require => File['jenkinshome'],
} }
file { 'jenkinspubring': file { '/home/jenkins/.gnupg/pubring.gpg':
name => '/home/jenkins/.gnupg/pubring.gpg', ensure => present,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 600, mode => '0600',
ensure => 'present', require => File['/home/jenkins/.gnupg'],
require => File['jenkinsgpgdir'], source => 'puppet:///modules/jenkins/pubring.gpg',
source => [
"puppet:///modules/jenkins/pubring.gpg",
],
} }
file { 'jenkinsconfigdir': file { '/home/jenkins/.config':
name => '/home/jenkins/.config', ensure => directory,
owner => 'jenkins', owner => 'jenkins',
group => 'jenkins', group => 'jenkins',
mode => 755, mode => '0755',
ensure => 'directory', require => File['/home/jenkins'],
require => File['jenkinshome'],
} }
} }

View File

@ -1,61 +1,62 @@
# == Class: jenkins::job_builder
#
class jenkins::job_builder ( class jenkins::job_builder (
$url, $url,
$username, $username,
$password, $password,
) { ) {
# A lot of things need yaml, be conservative requiring this package to avoid # A lot of things need yaml, be conservative requiring this package to avoid
# conflicts with other modules. # conflicts with other modules.
if ! defined(Package['python-yaml']) { if ! defined(Package['python-yaml']) {
package { 'python-yaml': package { 'python-yaml':
ensure => "present",
}
}
if ! defined(Package['python-jenkins']) {
package { "python-jenkins":
ensure => present, ensure => present,
} }
} }
vcsrepo { "/opt/jenkins_job_builder": if ! defined(Package['python-jenkins']) {
ensure => latest, package { 'python-jenkins':
ensure => present,
}
}
vcsrepo { '/opt/jenkins_job_builder':
ensure => latest,
provider => git, provider => git,
revision => "master", revision => 'master',
source => "https://github.com/openstack-ci/jenkins-job-builder.git", source => 'https://github.com/openstack-ci/jenkins-job-builder.git',
} }
exec { "install_jenkins_job_builder": exec { 'install_jenkins_job_builder':
command => "python setup.py install", command => 'python setup.py install',
cwd => "/opt/jenkins_job_builder", cwd => '/opt/jenkins_job_builder',
path => "/bin:/usr/bin", path => '/bin:/usr/bin',
refreshonly => true, refreshonly => true,
subscribe => Vcsrepo["/opt/jenkins_job_builder"], subscribe => Vcsrepo['/opt/jenkins_job_builder'],
} }
file { "/etc/jenkins_jobs": file { '/etc/jenkins_jobs':
ensure => "directory", ensure => directory,
} }
exec { "jenkins_jobs_update": exec { 'jenkins_jobs_update':
command => "jenkins-jobs update /etc/jenkins_jobs/config", command => 'jenkins-jobs update /etc/jenkins_jobs/config',
path => '/bin:/usr/bin:/usr/local/bin', path => '/bin:/usr/bin:/usr/local/bin',
refreshonly => true, refreshonly => true,
require => [ require => [
File['/etc/jenkins_jobs/jenkins_jobs.ini'], File['/etc/jenkins_jobs/jenkins_jobs.ini'],
Package['python-jenkins'], Package['python-jenkins'],
Package['python-yaml'] Package['python-yaml'],
] ]
} }
# TODO: We should put in notify Exec['jenkins_jobs_update'] # TODO: We should put in notify Exec['jenkins_jobs_update']
# at some point, but that still has some problems. # at some point, but that still has some problems.
file { "/etc/jenkins_jobs/jenkins_jobs.ini": file { '/etc/jenkins_jobs/jenkins_jobs.ini':
owner => 'jenkins', ensure => present,
mode => 400, owner => 'jenkins',
ensure => 'present', mode => '0400',
content => template('jenkins/jenkins_jobs.ini.erb'), content => template('jenkins/jenkins_jobs.ini.erb'),
require => File["/etc/jenkins_jobs"], require => File['/etc/jenkins_jobs'],
} }
} }

View File

@ -1,48 +1,50 @@
# == Class: jenkins::master
#
class jenkins::master( class jenkins::master(
$vhost_name=$fqdn,
$serveradmin="webmaster@$fqdn",
$logo, $logo,
$ssl_cert_file='', $vhost_name = $::fqdn,
$ssl_key_file='', $serveradmin = "webmaster@${::fqdn}",
$ssl_chain_file='', $ssl_cert_file = '',
$ssl_cert_file_contents='', # If left empty puppet will not create file. $ssl_key_file = '',
$ssl_key_file_contents='', # If left empty puppet will not create file. $ssl_chain_file = '',
$ssl_chain_file_contents='' # If left empty puppet will not create file. $ssl_cert_file_contents = '', # If left empty puppet will not create file.
$ssl_key_file_contents = '', # If left empty puppet will not create file.
$ssl_chain_file_contents = '', # If left empty puppet will not create file.
) { ) {
include pip include pip
include apt include apt
include apache include apache
#This key is at http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key #This key is at http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key
apt::key { "jenkins": apt::key { 'jenkins':
key => "D50582E6", key => 'D50582E6',
key_source => "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key", key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key',
require => Package["wget"] require => Package['wget'],
} }
apt::source { 'jenkins': apt::source { 'jenkins':
location => "http://pkg.jenkins-ci.org/debian", location => 'http://pkg.jenkins-ci.org/debian',
release => "binary/", release => 'binary/',
repos => "", repos => '',
require => Apt::Key['jenkins'], require => Apt::Key['jenkins'],
include_src => false, include_src => false,
} }
apache::vhost { $vhost_name: apache::vhost { $vhost_name:
port => 443, port => 443,
docroot => 'MEANINGLESS ARGUMENT', docroot => 'MEANINGLESS ARGUMENT',
priority => '50', priority => '50',
template => 'jenkins/jenkins.vhost.erb', template => 'jenkins/jenkins.vhost.erb',
ssl => true, ssl => true,
} }
a2mod { 'rewrite': a2mod { 'rewrite':
ensure => present ensure => present,
} }
a2mod { 'proxy': a2mod { 'proxy':
ensure => present ensure => present,
} }
a2mod { 'proxy_http': a2mod { 'proxy_http':
ensure => present ensure => present,
} }
if $ssl_cert_file_contents != '' { if $ssl_cert_file_contents != '' {
@ -84,56 +86,56 @@ class jenkins::master(
] ]
package { $packages: package { $packages:
ensure => "present", ensure => present,
} }
# devstack-gate # devstack-gate
if ! defined(Package['python-jenkins']) { if ! defined(Package['python-jenkins']) {
package { "python-jenkins": package { 'python-jenkins':
ensure => present, ensure => present,
} }
} }
package { "jenkins": package { 'jenkins':
ensure => "present", ensure => present,
require => Apt::Source['jenkins'], require => Apt::Source['jenkins'],
} }
package { "apache-libcloud": package { 'apache-libcloud':
ensure => present, ensure => present,
provider => pip, provider => pip,
require => Class[pip] require => Class[pip],
} }
package { "git-review": package { 'git-review':
ensure => latest, ensure => latest,
provider => pip, provider => pip,
require => Class[pip] require => Class[pip],
} }
package { "tox": package { 'tox':
ensure => latest, # okay to use latest for pip
provider => pip,
require => Class[pip],
}
package { "statsd":
ensure => latest, # okay to use latest for pip ensure => latest, # okay to use latest for pip
provider => pip, provider => pip,
require => Class[pip], require => Class[pip],
} }
exec { "update apt cache": package { 'statsd':
subscribe => [ File["/etc/apt/sources.list.d/jenkins.list"]], ensure => latest, # okay to use latest for pip
provider => pip,
require => Class[pip],
}
exec { 'update apt cache':
subscribe => File['/etc/apt/sources.list.d/jenkins.list'],
refreshonly => true, refreshonly => true,
path => "/bin:/usr/bin", path => '/bin:/usr/bin',
command => "apt-get update", command => 'apt-get update',
} }
file { '/var/lib/jenkins': file { '/var/lib/jenkins':
ensure => directory, ensure => directory,
owner => 'jenkins', owner => 'jenkins',
group => 'adm', group => 'adm',
require => Package['jenkins'], require => Package['jenkins'],
} }
@ -152,46 +154,44 @@ class jenkins::master(
require => File['/var/lib/jenkins/plugins'], require => File['/var/lib/jenkins/plugins'],
} }
file { "/var/lib/jenkins/plugins/simple-theme-plugin/openstack.css": file { '/var/lib/jenkins/plugins/simple-theme-plugin/openstack.css':
ensure => present, ensure => present,
source => "puppet:///modules/jenkins/openstack.css", source => 'puppet:///modules/jenkins/openstack.css',
require => File["/var/lib/jenkins/plugins/simple-theme-plugin"] require => File['/var/lib/jenkins/plugins/simple-theme-plugin'],
} }
file { "/var/lib/jenkins/plugins/simple-theme-plugin/openstack.js": file { '/var/lib/jenkins/plugins/simple-theme-plugin/openstack.js':
ensure => present, ensure => present,
content => template("jenkins/openstack.js.erb"), content => template('jenkins/openstack.js.erb'),
require => File["/var/lib/jenkins/plugins/simple-theme-plugin"] require => File['/var/lib/jenkins/plugins/simple-theme-plugin'],
} }
file { "/var/lib/jenkins/plugins/simple-theme-plugin/openstack-page-bkg.jpg": file { '/var/lib/jenkins/plugins/simple-theme-plugin/openstack-page-bkg.jpg':
ensure => present, ensure => present,
source => "puppet:///modules/jenkins/openstack-page-bkg.jpg", source => 'puppet:///modules/jenkins/openstack-page-bkg.jpg',
require => File["/var/lib/jenkins/plugins/simple-theme-plugin"] require => File['/var/lib/jenkins/plugins/simple-theme-plugin'],
} }
file { "/var/lib/jenkins/plugins/simple-theme-plugin/title.png": file { '/var/lib/jenkins/plugins/simple-theme-plugin/title.png':
ensure => present, ensure => present,
source => "puppet:///modules/jenkins/${logo}", source => "puppet:///modules/jenkins/${logo}",
require => File["/var/lib/jenkins/plugins/simple-theme-plugin"] require => File['/var/lib/jenkins/plugins/simple-theme-plugin'],
} }
file { '/usr/local/jenkins': file { '/usr/local/jenkins':
owner => 'root', ensure => directory,
group => 'root', owner => 'root',
mode => 755, group => 'root',
ensure => 'directory', mode => '0755',
} }
file { '/usr/local/jenkins/slave_scripts': file { '/usr/local/jenkins/slave_scripts':
owner => 'root', ensure => directory,
group => 'root', owner => 'root',
mode => 755, group => 'root',
ensure => 'directory', mode => '0755',
recurse => true, recurse => true,
require => File['/usr/local/jenkins'], require => File['/usr/local/jenkins'],
source => [ source => 'puppet:///modules/jenkins/slave_scripts',
"puppet:///modules/jenkins/slave_scripts",
],
} }
} }

View File

@ -1,192 +1,191 @@
class jenkins::slave($ssh_key, $sudo = false, $bare = false, $user = true) { # == Class: jenkins::slave
#
class jenkins::slave(
$ssh_key,
$sudo = false,
$bare = false,
$user = true,
) {
include pip include pip
if ($user == true) { if ($user == true) {
class { 'jenkins::jenkinsuser': class { 'jenkins::jenkinsuser':
ensure => present, ensure => present,
sudo => $sudo, sudo => $::sudo,
ssh_key => "${ssh_key}" ssh_key => $::ssh_key,
}
}
# Packages that all jenkins slaves need
$common_packages = [
'default-jdk', # jdk for building java jobs
'build-essential',
'ccache',
'python-netaddr', # Needed for devstack address_in_net()
]
# Packages that most jenkins slaves (eg, unit test runners) need
$standard_packages = [
'asciidoc', # for building gerrit/building openstack docs
'curl',
'docbook-xml', # for building openstack docs
'docbook5-xml', # for building openstack docs
'docbook-xsl', # for building openstack docs
'firefox', # for selenium tests
'libapache2-mod-wsgi',
'libcurl4-gnutls-dev',
'libldap2-dev',
'libmysqlclient-dev',
'libsqlite3-dev',
'libxml2-dev',
'libxslt1-dev',
'maven2',
'pandoc', #for docs, markdown->docbook, bug 924507
'pyflakes',
'python-libvirt',
'python-zmq', # zeromq unittests (not pip installable)
'python3-all-dev',
'rubygems',
'sqlite3',
'unzip',
'xsltproc', # for building openstack docs
'xvfb', # for selenium tests
]
if ($bare == false) {
$packages = [$common_packages, $standard_packages]
} else {
$packages = $common_packages
}
package { $packages:
ensure => present,
}
if ($bare == false) {
$gem_packages = [
'puppet-lint',
'puppetlabs_spec_helper',
]
package { $gem_packages:
ensure => latest,
provider => gem,
require => Package['rubygems'],
}
}
# Packages that need to be installed from pip
$pip_packages = [
'setuptools-git',
'tox',
]
package { $pip_packages:
ensure => latest, # we want the latest from these
provider => pip,
require => Class[pip],
}
package { 'git-review':
ensure => '1.17',
provider => pip,
require => Class[pip],
}
file { '/etc/profile.d/rubygems.sh':
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/jenkins/rubygems.sh',
}
file { '/usr/local/bin/gcc':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { '/usr/local/bin/g++':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { '/usr/local/bin/cc':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { '/usr/local/bin/c++':
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
if ($bare == false) {
class {'mysql::server':
config_hash => {
'root_password' => 'insecure_slave',
'default_engine' => 'MyISAM',
'bind_address' => '127.0.0.1',
} }
} }
include mysql::server::account_security
# Packages that all jenkins slaves need mysql::db { 'openstack_citest':
$common_packages = [ user => 'openstack_citest',
"default-jdk", # jdk for building java jobs password => 'openstack_citest',
"build-essential", host => 'localhost',
"ccache", grant => ['all'],
"python-netaddr", # Needed for devstack address_in_net() require => [
] Class['mysql::server'],
Class['mysql::server::account_security'],
# Packages that most jenkins slaves (eg, unit test runners) need
$standard_packages = [
"asciidoc", # for building gerrit/building openstack docs
"curl",
"docbook-xml", # for building openstack docs
"docbook5-xml", # for building openstack docs
"docbook-xsl", # for building openstack docs
"firefox", # for selenium tests
"libapache2-mod-wsgi",
"libcurl4-gnutls-dev",
"libldap2-dev",
"libmysqlclient-dev",
"libsqlite3-dev",
"libxml2-dev",
"libxslt1-dev",
"maven2",
"pandoc", #for docs, markdown->docbook, bug 924507
"python-libvirt",
"python-zmq", # zeromq unittests (not pip installable)
"python3-all-dev",
"rubygems",
"sqlite3",
"unzip",
"xsltproc", # for building openstack docs
"xvfb", # for selenium tests
"pyflakes"]
if ($bare == false) {
$packages = [$common_packages, $standard_packages]
} else {
$packages = $common_packages
}
package { $packages:
ensure => present,
}
if ($bare == false) {
$gem_packages = [
'puppet-lint',
'puppetlabs_spec_helper',
] ]
package { $gem_packages:
ensure => latest,
provider => gem,
require => Package['rubygems'],
}
} }
}
# Packages that need to be installed from pip file { '/usr/local/jenkins':
$pip_packages = [ ensure => directory,
"setuptools-git", owner => 'root',
"tox"] group => 'root',
mode => '0755',
}
package { $pip_packages: file { '/usr/local/jenkins/slave_scripts':
ensure => latest, # we want the latest from these ensure => directory,
provider => pip, owner => 'root',
require => Class[pip] group => 'root',
} mode => '0755',
recurse => true,
require => File['/usr/local/jenkins'],
source => 'puppet:///modules/jenkins/slave_scripts',
}
package { 'git-review': file { '/etc/sudoers.d/jenkins-sudo-grep':
ensure => '1.17', ensure => present,
provider => pip, source => 'puppet:///modules/jenkins/jenkins-sudo-grep.sudo',
require => Class[pip] owner => 'root',
} group => 'root',
mode => '0440',
}
file { 'profilerubygems': # Temporary for debugging glance launch problem
name => '/etc/profile.d/rubygems.sh', # https://lists.launchpad.net/openstack/msg13381.html
owner => 'root', file { '/etc/sysctl.d/10-ptrace.conf':
group => 'root', ensure => present,
mode => 644, source => 'puppet:///modules/jenkins/10-ptrace.conf',
ensure => 'present', owner => 'root',
source => [ group => 'root',
"puppet:///modules/jenkins/rubygems.sh", mode => '0444',
], }
}
file { 'ccachegcc': exec { 'ptrace sysctl':
name => '/usr/local/bin/gcc', subscribe => File['/etc/sysctl.d/10-ptrace.conf'],
ensure => link, refreshonly => true,
target => '/usr/bin/ccache', command => '/sbin/sysctl -p /etc/sysctl.d/10-ptrace.conf',
require => Package['ccache'], }
}
file { 'ccacheg++':
name => '/usr/local/bin/g++',
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { 'ccachecc':
name => '/usr/local/bin/cc',
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
file { 'ccachec++':
name => '/usr/local/bin/c++',
ensure => link,
target => '/usr/bin/ccache',
require => Package['ccache'],
}
if ($bare == false) {
class {'mysql::server':
config_hash => {
'root_password' => 'insecure_slave',
'default_engine' => 'MyISAM',
'bind_address' => '127.0.0.1',
}
}
include mysql::server::account_security
mysql::db { 'openstack_citest':
user => 'openstack_citest',
password => 'openstack_citest',
host => 'localhost',
grant => ['all'],
require => [Class['mysql::server'],
Class['mysql::server::account_security']]
}
}
file { '/usr/local/jenkins':
owner => 'root',
group => 'root',
mode => 755,
ensure => 'directory',
}
file { '/usr/local/jenkins/slave_scripts':
owner => 'root',
group => 'root',
mode => 755,
ensure => 'directory',
recurse => true,
require => File['/usr/local/jenkins'],
source => [
"puppet:///modules/jenkins/slave_scripts",
],
}
file { '/etc/sudoers.d/jenkins-sudo-grep':
ensure => present,
source => "puppet:///modules/jenkins/jenkins-sudo-grep.sudo",
owner => 'root',
group => 'root',
mode => 440,
}
# Temporary for debugging glance launch problem
# https://lists.launchpad.net/openstack/msg13381.html
file { '/etc/sysctl.d/10-ptrace.conf':
ensure => present,
source => "puppet:///modules/jenkins/10-ptrace.conf",
owner => 'root',
group => 'root',
mode => 444,
}
exec { "ptrace sysctl":
subscribe => File['/etc/sysctl.d/10-ptrace.conf'],
refreshonly => true,
command => "/sbin/sysctl -p /etc/sysctl.d/10-ptrace.conf",
}
} }