Browse Source

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
changes/36/119936/2
Clark Boylan 5 years ago
parent
commit
de01e82ec0

+ 0
- 19
modules/jenkins/manifests/params.pp View File

@@ -13,21 +13,8 @@ class jenkins::params {
13 13
       $haveged_package = 'haveged'
14 14
       # FIXME: No Maven packages on RHEL
15 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 16
       $cgroups_package = 'libcgroup'
22 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 18
         $cgroups_tools_package = 'libcgroup-tools'
32 19
         $cgconfig_require = [
33 20
           Package['cgroups'],
@@ -38,7 +25,6 @@ class jenkins::params {
38 25
           Package['cgroups-tools'],
39 26
         ]
40 27
       } else {
41
-        $mysql_dev_package = 'mysql-devel'
42 28
         $cgroups_tools_package = ''
43 29
         $cgconfig_require = Package['cgroups']
44 30
         $cgred_require = Package['cgroups']
@@ -51,13 +37,8 @@ class jenkins::params {
51 37
       $python_netaddr_package = 'python-netaddr'
52 38
       $haveged_package = 'haveged'
53 39
       $maven_package = 'maven2'
54
-      # For tooz unit tests
55
-      $memcached_package = 'memcached'
56 40
       $ruby1_9_1_package = 'ruby1.9.1'
57 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 42
       $cgroups_package = 'cgroup-bin'
62 43
       $cgroups_tools_package = ''
63 44
       $cgconfig_require = [

+ 6
- 29
modules/jenkins/manifests/slave.pp View File

@@ -37,32 +37,20 @@ class jenkins::slave(
37 37
 
38 38
   case $::osfamily {
39 39
     'RedHat': {
40
-
41 40
       exec { 'yum Group Install':
42 41
         unless  => '/usr/bin/yum grouplist "Development tools" | /bin/grep "^Installed [Gg]roups"',
43 42
         command => '/usr/bin/yum -y groupinstall "Development tools"',
44 43
       }
45 44
 
46
-      if ($::operatingsystem == 'Fedora') {
47
-          package { $::jenkins::params::zookeeper_package:
48
-              ensure => present,
49
-          }
50
-          # Fedora needs community-mysql package for mysql_config
51
-          # command used in some gate-{project}-python27
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
-          }
45
+      if ($::operatingsystem != 'Fedora') {
46
+        exec { 'update-java-alternatives':
47
+          unless   => '/bin/ls -l /etc/alternatives/java | /bin/grep 1.7.0-openjdk',
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',
49
+          require  => Anchor['jenkins::slave::update-java-alternatives']
50
+        }
62 51
       }
63 52
     }
64 53
     'Debian': {
65
-
66 54
       # install build-essential package group
67 55
       package { 'build-essential':
68 56
         ensure => present,
@@ -86,22 +74,11 @@ class jenkins::slave(
86 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 77
       exec { 'update-java-alternatives':
100 78
         unless   => '/bin/ls -l /etc/alternatives/java | /bin/grep java-7-openjdk-amd64',
101 79
         command  => '/usr/sbin/update-java-alternatives --set java-1.7.0-openjdk-amd64',
102 80
         require  => Anchor['jenkins::slave::update-java-alternatives']
103 81
       }
104
-
105 82
     }
106 83
     default: {
107 84
       fail("Unsupported osfamily: ${::osfamily} The 'jenkins' module only supports osfamily Debian or RedHat (slaves only).")

+ 2
- 0
modules/openstack_project/manifests/jenkins_params.pp View File

@@ -66,6 +66,8 @@ class openstack_project::jenkins_params {
66 66
         # install mysql-devel you get a conflict with
67 67
         # mariadb packages.
68 68
         $mysql_dev_package = 'community-mysql-devel'
69
+        $mysql_package = 'community-mysql'
70
+        $zookeeper_package = 'zookeeper'
69 71
         $cgroups_tools_package = 'libcgroup-tools'
70 72
         $cgconfig_require = [
71 73
           Package['cgroups'],

+ 28
- 0
modules/openstack_project/manifests/thick_slave.pp View File

@@ -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 121
   package { 'rake':
94 122
     ensure   => '10.1.1',
95 123
     provider => gem,

Loading…
Cancel
Save