summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2014-09-08 14:36:51 -0700
committerClark Boylan <clark.boylan@gmail.com>2014-09-08 15:34:26 -0700
commitde01e82ec099b07a1da4af0e30cfdb38b7925a84 (patch)
tree946aaa3a405966cc8067a42676cd6e2eaa6f7a18
parentbba12cb11a4411eb480c2da24d2b1e0ea33affad (diff)
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
Notes
Notes (review): Code-Review+2: James E. Blair <corvus@inaugust.com> Verified+2: Jenkins Code-Review+1: Matthew Treinish <mtreinish@kortar.org> Code-Review+2: Jeremy Stanley <fungi@yuggoth.org> Workflow+1: Jeremy Stanley <fungi@yuggoth.org> Code-Review+1: K Jonathan Harker <code@gentlydownthe.net> Code-Review+1: Anita Kuno <anteaya@anteaya.info> Submitted-by: Jenkins Submitted-at: Tue, 30 Sep 2014 17:43:09 +0000 Reviewed-on: https://review.openstack.org/119936 Project: openstack-infra/config Branch: refs/heads/master
-rw-r--r--modules/jenkins/manifests/params.pp19
-rw-r--r--modules/jenkins/manifests/slave.pp35
-rw-r--r--modules/openstack_project/manifests/jenkins_params.pp2
-rw-r--r--modules/openstack_project/manifests/thick_slave.pp28
4 files changed, 36 insertions, 48 deletions
diff --git a/modules/jenkins/manifests/params.pp b/modules/jenkins/manifests/params.pp
index 210bfcc..aef7686 100644
--- a/modules/jenkins/manifests/params.pp
+++ b/modules/jenkins/manifests/params.pp
@@ -13,21 +13,8 @@ class jenkins::params {
13 $haveged_package = 'haveged' 13 $haveged_package = 'haveged'
14 # FIXME: No Maven packages on RHEL 14 # FIXME: No Maven packages on RHEL
15 #$maven_package = 'maven' 15 #$maven_package = 'maven'
16 # FIXME: No php mcrypt package on RHEL, used for openstackid
17 #$php5_mcrypt_package = ''
18 # For Tooz unit tests
19 # FIXME: No zookeeper packages on RHEL
20 #$zookeeper_package = 'zookeeper-server'
21 $cgroups_package = 'libcgroup' 16 $cgroups_package = 'libcgroup'
22 if ($::operatingsystem == 'Fedora') and ($::operatingsystemrelease >= 19) { 17 if ($::operatingsystem == 'Fedora') and ($::operatingsystemrelease >= 19) {
23 # From Fedora 19 and onwards there's no longer
24 # support to mysql-devel.
25 # Only community-mysql-devel. If you try to
26 # install mysql-devel you get a conflict with
27 # mariadb packages.
28 $mysql_dev_package = 'community-mysql-devel'
29 $zookeeper_package = 'zookeeper'
30 $mysql_package = 'community-mysql'
31 $cgroups_tools_package = 'libcgroup-tools' 18 $cgroups_tools_package = 'libcgroup-tools'
32 $cgconfig_require = [ 19 $cgconfig_require = [
33 Package['cgroups'], 20 Package['cgroups'],
@@ -38,7 +25,6 @@ class jenkins::params {
38 Package['cgroups-tools'], 25 Package['cgroups-tools'],
39 ] 26 ]
40 } else { 27 } else {
41 $mysql_dev_package = 'mysql-devel'
42 $cgroups_tools_package = '' 28 $cgroups_tools_package = ''
43 $cgconfig_require = Package['cgroups'] 29 $cgconfig_require = Package['cgroups']
44 $cgred_require = Package['cgroups'] 30 $cgred_require = Package['cgroups']
@@ -51,13 +37,8 @@ class jenkins::params {
51 $python_netaddr_package = 'python-netaddr' 37 $python_netaddr_package = 'python-netaddr'
52 $haveged_package = 'haveged' 38 $haveged_package = 'haveged'
53 $maven_package = 'maven2' 39 $maven_package = 'maven2'
54 # For tooz unit tests
55 $memcached_package = 'memcached'
56 $ruby1_9_1_package = 'ruby1.9.1' 40 $ruby1_9_1_package = 'ruby1.9.1'
57 $ruby1_9_1_dev_package = 'ruby1.9.1-dev' 41 $ruby1_9_1_dev_package = 'ruby1.9.1-dev'
58 $php5_mcrypt_package = 'php5-mcrypt'
59 # For [tooz, taskflow, nova] using zookeeper in unit tests
60 $zookeeper_package = 'zookeeperd'
61 $cgroups_package = 'cgroup-bin' 42 $cgroups_package = 'cgroup-bin'
62 $cgroups_tools_package = '' 43 $cgroups_tools_package = ''
63 $cgconfig_require = [ 44 $cgconfig_require = [
diff --git a/modules/jenkins/manifests/slave.pp b/modules/jenkins/manifests/slave.pp
index 3400c9f..538596f 100644
--- a/modules/jenkins/manifests/slave.pp
+++ b/modules/jenkins/manifests/slave.pp
@@ -37,32 +37,20 @@ class jenkins::slave(
37 37
38 case $::osfamily { 38 case $::osfamily {
39 'RedHat': { 39 'RedHat': {
40
41 exec { 'yum Group Install': 40 exec { 'yum Group Install':
42 unless => '/usr/bin/yum grouplist "Development tools" | /bin/grep "^Installed [Gg]roups"', 41 unless => '/usr/bin/yum grouplist "Development tools" | /bin/grep "^Installed [Gg]roups"',
43 command => '/usr/bin/yum -y groupinstall "Development tools"', 42 command => '/usr/bin/yum -y groupinstall "Development tools"',
44 } 43 }
45 44
46 if ($::operatingsystem == 'Fedora') { 45 if ($::operatingsystem != 'Fedora') {
47 package { $::jenkins::params::zookeeper_package: 46 exec { 'update-java-alternatives':
48 ensure => present, 47 unless => '/bin/ls -l /etc/alternatives/java | /bin/grep 1.7.0-openjdk',
49 } 48 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',
50 # Fedora needs community-mysql package for mysql_config 49 require => Anchor['jenkins::slave::update-java-alternatives']
51 # command used in some gate-{project}-python27 50 }
52 # jobs in Jenkins
53 package { $::jenkins::params::mysql_package:
54 ensure => present,
55 }
56 } else {
57 exec { 'update-java-alternatives':
58 unless => '/bin/ls -l /etc/alternatives/java | /bin/grep 1.7.0-openjdk',
59 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',
60 require => Anchor['jenkins::slave::update-java-alternatives']
61 }
62 } 51 }
63 } 52 }
64 'Debian': { 53 'Debian': {
65
66 # install build-essential package group 54 # install build-essential package group
67 package { 'build-essential': 55 package { 'build-essential':
68 ensure => present, 56 ensure => present,
@@ -86,22 +74,11 @@ class jenkins::slave(
86 require => Package[$::jenkins::params::jdk_package], 74 require => Package[$::jenkins::params::jdk_package],
87 } 75 }
88 76
89 # For [tooz, taskflow, nova] using zookeeper in unit tests
90 package { $::jenkins::params::zookeeper_package:
91 ensure => present,
92 }
93
94 # For openstackid using php5-mcrypt for distro build
95 package { $::jenkins::params::php5_mcrypt_package:
96 ensure => present,
97 }
98
99 exec { 'update-java-alternatives': 77 exec { 'update-java-alternatives':
100 unless => '/bin/ls -l /etc/alternatives/java | /bin/grep java-7-openjdk-amd64', 78 unless => '/bin/ls -l /etc/alternatives/java | /bin/grep java-7-openjdk-amd64',
101 command => '/usr/sbin/update-java-alternatives --set java-1.7.0-openjdk-amd64', 79 command => '/usr/sbin/update-java-alternatives --set java-1.7.0-openjdk-amd64',
102 require => Anchor['jenkins::slave::update-java-alternatives'] 80 require => Anchor['jenkins::slave::update-java-alternatives']
103 } 81 }
104
105 } 82 }
106 default: { 83 default: {
107 fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).") 84 fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).")
diff --git a/modules/openstack_project/manifests/jenkins_params.pp b/modules/openstack_project/manifests/jenkins_params.pp
index da72904..48a10f8 100644
--- a/modules/openstack_project/manifests/jenkins_params.pp
+++ b/modules/openstack_project/manifests/jenkins_params.pp
@@ -66,6 +66,8 @@ class openstack_project::jenkins_params {
66 # install mysql-devel you get a conflict with 66 # install mysql-devel you get a conflict with
67 # mariadb packages. 67 # mariadb packages.
68 $mysql_dev_package = 'community-mysql-devel' 68 $mysql_dev_package = 'community-mysql-devel'
69 $mysql_package = 'community-mysql'
70 $zookeeper_package = 'zookeeper'
69 $cgroups_tools_package = 'libcgroup-tools' 71 $cgroups_tools_package = 'libcgroup-tools'
70 $cgconfig_require = [ 72 $cgconfig_require = [
71 Package['cgroups'], 73 Package['cgroups'],
diff --git a/modules/openstack_project/manifests/thick_slave.pp b/modules/openstack_project/manifests/thick_slave.pp
index de07569..5e0ef15 100644
--- a/modules/openstack_project/manifests/thick_slave.pp
+++ b/modules/openstack_project/manifests/thick_slave.pp
@@ -90,6 +90,34 @@ class openstack_project::thick_slave(
90 } 90 }
91 } 91 }
92 92
93 case $::osfamily {
94 'RedHat': {
95 if ($::operatingsystem == 'Fedora') {
96 # For [tooz, taskflow, nova] using zookeeper in unit tests
97 package { $::openstack_project::jenkins_params::zookeeper_package:
98 ensure => present,
99 }
100
101 # Fedora needs community-mysql package for mysql_config
102 # command used in some gate-{project}-python27
103 # jobs in Jenkins
104 package { $::openstack_project::jenkins_params::mysql_package:
105 ensure => present,
106 }
107 }
108 }
109 'Debian': {
110 # For [tooz, taskflow, nova] using zookeeper in unit tests
111 package { $::openstack_project::jenkins_params::zookeeper_package:
112 ensure => present,
113 }
114
115 # For openstackid using php5-mcrypt for distro build
116 package { $::openstack_project::jenkins_params::php5_mcrypt_package:
117 ensure => present,
118 }
119 }
120 }
93 package { 'rake': 121 package { 'rake':
94 ensure => '10.1.1', 122 ensure => '10.1.1',
95 provider => gem, 123 provider => gem,