Jenkins slave puppetry for CentOS.
The install scripts now look for CentOS in release files. Also some instances of facter's operatingsystem are switched to osfamily and capitalization of RedHat is normalized to match what facter uses. Change-Id: I3bbca5481d0d5e6de9e62bfd6e2b0a85264ed6ed Reviewed-on: https://review.openstack.org/27398 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
This commit is contained in:
parent
901e706aea
commit
ae3dfe4d95
@ -5,7 +5,7 @@ if [[ $EUID -ne 0 ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if cat /etc/*release | grep "Red Hat" &> /dev/null; then
|
if cat /etc/*release | grep -e "CentOS" -e "Red Hat" &> /dev/null; then
|
||||||
|
|
||||||
rpm -qi epel-release &> /dev/null || rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
|
rpm -qi epel-release &> /dev/null || rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
|
||||||
#installing this package gives use the key
|
#installing this package gives use the key
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
# The repo and preferences files are also managed by puppet, so be sure
|
# The repo and preferences files are also managed by puppet, so be sure
|
||||||
# to keep them in sync with this file.
|
# to keep them in sync with this file.
|
||||||
|
|
||||||
if cat /etc/*release | grep "Red Hat" &> /dev/null; then
|
if cat /etc/*release | grep -e "CentOS" -e "Red Hat" &> /dev/null; then
|
||||||
rpm -qi epel-release &> /dev/null || rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
|
rpm -qi epel-release &> /dev/null || rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
|
||||||
rpm -ivh http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-6.noarch.rpm
|
rpm -ivh http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-6.noarch.rpm
|
||||||
|
|
||||||
|
@ -348,6 +348,28 @@ node /^oneiric.*\.slave\.openstack\.org$/ {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
node /^centos6.*\.slave\.openstack\.org$/ {
|
||||||
|
include openstack_project::puppet_cron
|
||||||
|
class { 'openstack_project::slave':
|
||||||
|
certname => 'centos6.slave.openstack.org',
|
||||||
|
sysadmins => hiera('sysadmins'),
|
||||||
|
}
|
||||||
|
file { '/home/jenkins/.config/glance':
|
||||||
|
ensure => absent,
|
||||||
|
force => true,
|
||||||
|
recurse => true,
|
||||||
|
}
|
||||||
|
include jenkins::cgroups
|
||||||
|
include ulimit
|
||||||
|
ulimit::conf { 'limit_jenkins_procs':
|
||||||
|
limit_domain => 'jenkins',
|
||||||
|
limit_type => 'hard',
|
||||||
|
limit_item => 'nproc',
|
||||||
|
limit_value => '256'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
node /^rhel6.*\.slave\.openstack\.org$/ {
|
node /^rhel6.*\.slave\.openstack\.org$/ {
|
||||||
include openstack_project::puppet_cron
|
include openstack_project::puppet_cron
|
||||||
class { 'openstack_project::slave':
|
class { 'openstack_project::slave':
|
||||||
|
@ -9,7 +9,7 @@ class exim(
|
|||||||
ensure => present,
|
ensure => present,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($::operatingsystem == 'Redhat') {
|
if ($::osfamily == 'RedHat') {
|
||||||
service { 'postfix':
|
service { 'postfix':
|
||||||
ensure => stopped
|
ensure => stopped
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# accessed by other classes.
|
# accessed by other classes.
|
||||||
class exim::params {
|
class exim::params {
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Redhat': {
|
'RedHat': {
|
||||||
$package = 'exim'
|
$package = 'exim'
|
||||||
$service_name = 'exim'
|
$service_name = 'exim'
|
||||||
$config_file = '/etc/exim/exim.conf'
|
$config_file = '/etc/exim/exim.conf'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# accessed by other classes.
|
# accessed by other classes.
|
||||||
class iptables::params {
|
class iptables::params {
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Redhat': {
|
'RedHat': {
|
||||||
$package_name = 'iptables'
|
$package_name = 'iptables'
|
||||||
$service_name = 'iptables'
|
$service_name = 'iptables'
|
||||||
$rules_dir = '/etc/sysconfig'
|
$rules_dir = '/etc/sysconfig'
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# accessed by other classes.
|
# accessed by other classes.
|
||||||
class jenkins::params {
|
class jenkins::params {
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Redhat': {
|
'RedHat': {
|
||||||
#yum groupinstall "Development Tools"
|
#yum groupinstall "Development Tools"
|
||||||
# common packages
|
# common packages
|
||||||
$jdk_package = 'java-1.7.0-openjdk'
|
$jdk_package = 'java-1.7.0-openjdk'
|
||||||
|
@ -66,7 +66,7 @@ class jenkins::slave(
|
|||||||
ensure => present,
|
ensure => present,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($::operatingsystem == 'Redhat') {
|
if ($::osfamily == 'RedHat') {
|
||||||
|
|
||||||
exec { 'yum Group Install':
|
exec { 'yum Group Install':
|
||||||
unless => '/usr/bin/yum grouplist "Development tools" | /bin/grep "^Installed Groups"',
|
unless => '/usr/bin/yum grouplist "Development tools" | /bin/grep "^Installed Groups"',
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# accessed by other classes.
|
# accessed by other classes.
|
||||||
class openstack_project::params {
|
class openstack_project::params {
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Redhat': {
|
'RedHat': {
|
||||||
$packages = ['puppet', 'python-setuptools', 'wget']
|
$packages = ['puppet', 'python-setuptools', 'wget']
|
||||||
$user_packages = ['byobu', 'emacs-nox']
|
$user_packages = ['byobu', 'emacs-nox']
|
||||||
$update_pkg_list_cmd = ''
|
$update_pkg_list_cmd = ''
|
||||||
|
@ -12,7 +12,7 @@ class pip {
|
|||||||
require => Package[$::pip::params::python_devel_package]
|
require => Package[$::pip::params::python_devel_package]
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($::operatingsystem == 'Redhat' or $::operatingsystem == 'Fedora') {
|
if ($::osfamily == 'RedHat') {
|
||||||
|
|
||||||
file { '/usr/bin/pip':
|
file { '/usr/bin/pip':
|
||||||
ensure => 'link',
|
ensure => 'link',
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# accessed by other classes.
|
# accessed by other classes.
|
||||||
class pip::params {
|
class pip::params {
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Fedora', 'Redhat': {
|
'RedHat': {
|
||||||
$python_devel_package = 'python-devel'
|
$python_devel_package = 'python-devel'
|
||||||
$python_pip_package = 'python-pip'
|
$python_pip_package = 'python-pip'
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# accessed by other classes.
|
# accessed by other classes.
|
||||||
class snmpd::params {
|
class snmpd::params {
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Redhat': {
|
'RedHat': {
|
||||||
$package_name = 'net-snmp'
|
$package_name = 'net-snmp'
|
||||||
}
|
}
|
||||||
'Debian', 'Ubuntu': {
|
'Debian', 'Ubuntu': {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# accessed by other classes.
|
# accessed by other classes.
|
||||||
class ssh::params {
|
class ssh::params {
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Redhat': {
|
'RedHat': {
|
||||||
$package_name = 'openssh-server'
|
$package_name = 'openssh-server'
|
||||||
$service_name = 'sshd'
|
$service_name = 'sshd'
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# accessed by other classes.
|
# accessed by other classes.
|
||||||
class ulimit::params {
|
class ulimit::params {
|
||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'Fedora', 'Redhat': {
|
'RedHat': {
|
||||||
$pam_packages = ['pam']
|
$pam_packages = ['pam']
|
||||||
}
|
}
|
||||||
'Debian', 'Ubuntu': {
|
'Debian', 'Ubuntu': {
|
||||||
|
Loading…
Reference in New Issue
Block a user