Trim jenkins::slave package installations further
We are installing packages in jenkins::slave that we do not need on all of our slaves. Trim the package install down there and move things to openstack_project::thick_slave where they belong. In particular zookeeper and php mcrypt packages. As part of this cleanup remove unused parameter values from jenkins::params. Change-Id: I57bf1c61287f74418bb06502f06bcd2989161243
This commit is contained in:
parent
bba12cb11a
commit
de01e82ec0
@ -13,21 +13,8 @@ class jenkins::params {
|
||||
$haveged_package = 'haveged'
|
||||
# FIXME: No Maven packages on RHEL
|
||||
#$maven_package = 'maven'
|
||||
# FIXME: No php mcrypt package on RHEL, used for openstackid
|
||||
#$php5_mcrypt_package = ''
|
||||
# For Tooz unit tests
|
||||
# FIXME: No zookeeper packages on RHEL
|
||||
#$zookeeper_package = 'zookeeper-server'
|
||||
$cgroups_package = 'libcgroup'
|
||||
if ($::operatingsystem == 'Fedora') and ($::operatingsystemrelease >= 19) {
|
||||
# From Fedora 19 and onwards there's no longer
|
||||
# support to mysql-devel.
|
||||
# Only community-mysql-devel. If you try to
|
||||
# install mysql-devel you get a conflict with
|
||||
# mariadb packages.
|
||||
$mysql_dev_package = 'community-mysql-devel'
|
||||
$zookeeper_package = 'zookeeper'
|
||||
$mysql_package = 'community-mysql'
|
||||
$cgroups_tools_package = 'libcgroup-tools'
|
||||
$cgconfig_require = [
|
||||
Package['cgroups'],
|
||||
@ -38,7 +25,6 @@ class jenkins::params {
|
||||
Package['cgroups-tools'],
|
||||
]
|
||||
} else {
|
||||
$mysql_dev_package = 'mysql-devel'
|
||||
$cgroups_tools_package = ''
|
||||
$cgconfig_require = Package['cgroups']
|
||||
$cgred_require = Package['cgroups']
|
||||
@ -51,13 +37,8 @@ class jenkins::params {
|
||||
$python_netaddr_package = 'python-netaddr'
|
||||
$haveged_package = 'haveged'
|
||||
$maven_package = 'maven2'
|
||||
# For tooz unit tests
|
||||
$memcached_package = 'memcached'
|
||||
$ruby1_9_1_package = 'ruby1.9.1'
|
||||
$ruby1_9_1_dev_package = 'ruby1.9.1-dev'
|
||||
$php5_mcrypt_package = 'php5-mcrypt'
|
||||
# For [tooz, taskflow, nova] using zookeeper in unit tests
|
||||
$zookeeper_package = 'zookeeperd'
|
||||
$cgroups_package = 'cgroup-bin'
|
||||
$cgroups_tools_package = ''
|
||||
$cgconfig_require = [
|
||||
|
@ -37,32 +37,20 @@ class jenkins::slave(
|
||||
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
|
||||
exec { 'yum Group Install':
|
||||
unless => '/usr/bin/yum grouplist "Development tools" | /bin/grep "^Installed [Gg]roups"',
|
||||
command => '/usr/bin/yum -y groupinstall "Development tools"',
|
||||
}
|
||||
|
||||
if ($::operatingsystem == 'Fedora') {
|
||||
package { $::jenkins::params::zookeeper_package:
|
||||
ensure => present,
|
||||
}
|
||||
# Fedora needs community-mysql package for mysql_config
|
||||
# command used in some gate-{project}-python27
|
||||
# jobs in Jenkins
|
||||
package { $::jenkins::params::mysql_package:
|
||||
ensure => present,
|
||||
}
|
||||
} else {
|
||||
exec { 'update-java-alternatives':
|
||||
unless => '/bin/ls -l /etc/alternatives/java | /bin/grep 1.7.0-openjdk',
|
||||
command => '/usr/sbin/alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java && /usr/sbin/alternatives --set javac /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/javac',
|
||||
require => Anchor['jenkins::slave::update-java-alternatives']
|
||||
}
|
||||
if ($::operatingsystem != 'Fedora') {
|
||||
exec { 'update-java-alternatives':
|
||||
unless => '/bin/ls -l /etc/alternatives/java | /bin/grep 1.7.0-openjdk',
|
||||
command => '/usr/sbin/alternatives --set java /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java && /usr/sbin/alternatives --set javac /usr/lib/jvm/java-1.7.0-openjdk.x86_64/bin/javac',
|
||||
require => Anchor['jenkins::slave::update-java-alternatives']
|
||||
}
|
||||
}
|
||||
}
|
||||
'Debian': {
|
||||
|
||||
# install build-essential package group
|
||||
package { 'build-essential':
|
||||
ensure => present,
|
||||
@ -86,22 +74,11 @@ class jenkins::slave(
|
||||
require => Package[$::jenkins::params::jdk_package],
|
||||
}
|
||||
|
||||
# For [tooz, taskflow, nova] using zookeeper in unit tests
|
||||
package { $::jenkins::params::zookeeper_package:
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
# For openstackid using php5-mcrypt for distro build
|
||||
package { $::jenkins::params::php5_mcrypt_package:
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
exec { 'update-java-alternatives':
|
||||
unless => '/bin/ls -l /etc/alternatives/java | /bin/grep java-7-openjdk-amd64',
|
||||
command => '/usr/sbin/update-java-alternatives --set java-1.7.0-openjdk-amd64',
|
||||
require => Anchor['jenkins::slave::update-java-alternatives']
|
||||
}
|
||||
|
||||
}
|
||||
default: {
|
||||
fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).")
|
||||
|
@ -66,6 +66,8 @@ class openstack_project::jenkins_params {
|
||||
# install mysql-devel you get a conflict with
|
||||
# mariadb packages.
|
||||
$mysql_dev_package = 'community-mysql-devel'
|
||||
$mysql_package = 'community-mysql'
|
||||
$zookeeper_package = 'zookeeper'
|
||||
$cgroups_tools_package = 'libcgroup-tools'
|
||||
$cgconfig_require = [
|
||||
Package['cgroups'],
|
||||
|
@ -90,6 +90,34 @@ class openstack_project::thick_slave(
|
||||
}
|
||||
}
|
||||
|
||||
case $::osfamily {
|
||||
'RedHat': {
|
||||
if ($::operatingsystem == 'Fedora') {
|
||||
# For [tooz, taskflow, nova] using zookeeper in unit tests
|
||||
package { $::openstack_project::jenkins_params::zookeeper_package:
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
# Fedora needs community-mysql package for mysql_config
|
||||
# command used in some gate-{project}-python27
|
||||
# jobs in Jenkins
|
||||
package { $::openstack_project::jenkins_params::mysql_package:
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
}
|
||||
'Debian': {
|
||||
# For [tooz, taskflow, nova] using zookeeper in unit tests
|
||||
package { $::openstack_project::jenkins_params::zookeeper_package:
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
# For openstackid using php5-mcrypt for distro build
|
||||
package { $::openstack_project::jenkins_params::php5_mcrypt_package:
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
}
|
||||
package { 'rake':
|
||||
ensure => '10.1.1',
|
||||
provider => gem,
|
||||
|
Loading…
x
Reference in New Issue
Block a user