
The ::jenkins::slave class contained a lot of openstack-specific configuration rather than configuration of a generic jenkins slave. The term "bare slave" is overloaded and confusing: create simple_slave and thick_slave to differentiate between the two meanings of "bare". Some portions of ::jenkins::slave will move to simple_slave, some portions to thick_slave, and some portions to slave_common (all in the openstack_project module). Change-Id: I5281a03a7f6da3f98714bcc59ae840ace8435578
59 lines
1.6 KiB
Puppet
59 lines
1.6 KiB
Puppet
# == Class: openstack_project::slave_common
|
|
#
|
|
# Common configuration between openstack_project::slave and
|
|
# openstack_project::single_use_slave
|
|
class openstack_project::slave_common(
|
|
$include_pypy = false,
|
|
){
|
|
vcsrepo { '/opt/requirements':
|
|
ensure => latest,
|
|
provider => git,
|
|
revision => 'master',
|
|
source => 'https://git.openstack.org/openstack/requirements',
|
|
}
|
|
|
|
file { '/usr/local/jenkins/slave_scripts':
|
|
ensure => directory,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0755',
|
|
recurse => true,
|
|
purge => true,
|
|
force => true,
|
|
require => File['/usr/local/jenkins'],
|
|
source => 'puppet:///modules/openstack_project/slave_scripts',
|
|
}
|
|
|
|
# Temporary for debugging glance launch problem
|
|
# https://lists.launchpad.net/openstack/msg13381.html
|
|
# NOTE(dprince): ubuntu only as RHEL6 doesn't have sysctl.d yet
|
|
if ($::osfamily == 'Debian') {
|
|
|
|
file { '/etc/sysctl.d/10-ptrace.conf':
|
|
ensure => present,
|
|
source => 'puppet:///modules/jenkins/10-ptrace.conf',
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0444',
|
|
}
|
|
|
|
exec { 'ptrace sysctl':
|
|
subscribe => File['/etc/sysctl.d/10-ptrace.conf'],
|
|
refreshonly => true,
|
|
command => '/sbin/sysctl -p /etc/sysctl.d/10-ptrace.conf',
|
|
}
|
|
|
|
if $include_pypy {
|
|
apt::ppa { 'ppa:pypy/ppa': }
|
|
package { 'pypy':
|
|
ensure => present,
|
|
require => Apt::Ppa['ppa:pypy/ppa']
|
|
}
|
|
package { 'pypy-dev':
|
|
ensure => present,
|
|
require => Apt::Ppa['ppa:pypy/ppa']
|
|
}
|
|
}
|
|
}
|
|
}
|