Ottomata has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/364496 )

Change subject: Use openjdk-8 for analytics and statistics servers if it is 
available
......................................................................

Use openjdk-8 for analytics and statistics servers if it is available

Change-Id: I5ba6961e695a0dd5be21d2be9d34cf1c5c5863d4
---
M modules/role/manifests/analytics_cluster/java.pp
M modules/statistics/manifests/packages.pp
M modules/statistics/manifests/wmde.pp
3 files changed, 24 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/364496/1

diff --git a/modules/role/manifests/analytics_cluster/java.pp 
b/modules/role/manifests/analytics_cluster/java.pp
index 16b600f..b538e7d 100644
--- a/modules/role/manifests/analytics_cluster/java.pp
+++ b/modules/role/manifests/analytics_cluster/java.pp
@@ -1,14 +1,18 @@
 # == Class role::analytics_cluster::java
 # Installs the version of Java used for Analytics Cluster.
 class role::analytics_cluster::java {
-    require_package('openjdk-7-jdk')
-
-    # This packages conflicts with the hadoop-fuse-dfs
-    # and with impalad in that two libjvm.so files get added
-    # to LD_LIBRARY_PATH.  We dont't need this
-    # package anyway, so ensure it is absent.
-    package { 'icedtea-7-jre-jamvm':
-        ensure => 'absent',
+    if os_version('debian >= stretch') {
+        require_package('openjdk-8-jdk')
+    }
+    else {
+        require_package('openjdk-7-jdk')
+        # This packages conflicts with the hadoop-fuse-dfs
+        # and with impalad in that two libjvm.so files get added
+        # to LD_LIBRARY_PATH.  We dont't need this
+        # package anyway, so ensure it is absent.
+        package { 'icedtea-7-jre-jamvm':
+            ensure => 'absent',
+        }
     }
 
     # Make sure file.encoding is UTF-8 for all java processes.
diff --git a/modules/statistics/manifests/packages.pp 
b/modules/statistics/manifests/packages.pp
index 39248ca..53bf595 100644
--- a/modules/statistics/manifests/packages.pp
+++ b/modules/statistics/manifests/packages.pp
@@ -34,7 +34,6 @@
         'libmaxminddb-dev',
         'build-essential', # Requested by halfak to install SciPy
         'nodejs',
-        'openjdk-7-jdk',
         'openjdk-8-jdk',
         'g++-4.8',         # Requested by bearloga (Mikhail) to ensure that 
there is a compiler with C++11 support that can compile R package 'Boom'; see 
T147682 and http://stackoverflow.com/a/36034866/1091835 for more info
         # GNU Scientific Library (GSL) requested by bearloga (Mikhail)
@@ -44,6 +43,11 @@
         'pandoc'           # Requested by bearloga (Mikhail); necessary for 
using RMarkdown and performing format conversions
     ])
 
+    # If available, isntall openjdk-7-jdk
+    if os_version('debian <= jessie') || os_version('ubuntu >= trusty') {
+        require_package('openjdk-7-jdk')
+    }
+
     # Python packages
     require_package ([
         'python-geoip',
diff --git a/modules/statistics/manifests/wmde.pp 
b/modules/statistics/manifests/wmde.pp
index 795f4bd..d3029a0 100644
--- a/modules/statistics/manifests/wmde.pp
+++ b/modules/statistics/manifests/wmde.pp
@@ -33,11 +33,17 @@
     $wmde_secrets = hiera('wmde_secrets')
 
     require_package(
-        'openjdk-7-jdk',
         'php5',
         'php5-cli',
     )
 
+    if os_version('debian >= stretch') {
+        require_package('openjdk-8-jdk')
+    }
+    else {
+        require_package('openjdk-7-jdk')
+    }
+
     include ::passwords::mysql::research
     # This file will render at
     # /etc/mysql/conf.d/research-wmde-client.cnf.

-- 
To view, visit https://gerrit.wikimedia.org/r/364496
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ba6961e695a0dd5be21d2be9d34cf1c5c5863d4
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <ao...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to