bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ofle...@apache.org
Subject bigtop git commit: BIGTOP-2633: Switch to Java 1.8 because of SSL problems
Date Fri, 16 Dec 2016 13:09:36 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master a90c971f0 -> 2c3055be3


BIGTOP-2633: Switch to Java 1.8 because of SSL problems


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/2c3055be
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/2c3055be
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/2c3055be

Branch: refs/heads/master
Commit: 2c3055be37049b7a1ffcd7027a82c7499b246ab7
Parents: a90c971
Author: Olaf Flebbe <of@oflebbe.de>
Authored: Thu Dec 15 21:47:12 2016 +0100
Committer: Olaf Flebbe <of@oflebbe.de>
Committed: Fri Dec 16 14:08:18 2016 +0100

----------------------------------------------------------------------
 bigtop_toolchain/manifests/env.pp            |  3 +-
 bigtop_toolchain/manifests/jdk.pp            | 46 +++++++++++++++--------
 bigtop_toolchain/manifests/packages.pp       | 12 ++----
 docker/bigtop-slaves/debian-8/Dockerfile     |  3 +-
 docker/bigtop-slaves/ubuntu-14.04/Dockerfile |  2 +-
 docker/bigtop-slaves/ubuntu-16.04/Dockerfile |  2 +-
 6 files changed, 40 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/2c3055be/bigtop_toolchain/manifests/env.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/env.pp b/bigtop_toolchain/manifests/env.pp
index d8cbed7..f842ed4 100644
--- a/bigtop_toolchain/manifests/env.pp
+++ b/bigtop_toolchain/manifests/env.pp
@@ -15,8 +15,7 @@
 
 class bigtop_toolchain::env {
   case "$::operatingsystem $::operatingsystemrelease" {
-    /(Fedora) 25/: { $java_version = '1.8.0' }
-    default: { $java_version = '1.7.0' }
+    default: { $java_version = '1.8.0' }
     }
   $java = "java-${java_version}"
   case $architecture {

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2c3055be/bigtop_toolchain/manifests/jdk.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/jdk.pp b/bigtop_toolchain/manifests/jdk.pp
index e2cb2e7..afbef23 100644
--- a/bigtop_toolchain/manifests/jdk.pp
+++ b/bigtop_toolchain/manifests/jdk.pp
@@ -14,37 +14,52 @@
 # limitations under the License.
 
 class bigtop_toolchain::jdk {
-  case $operatingsystem {
+  case $::operatingsystem {
     /Debian/: {
-      include apt
-      include apt::backports
+      require apt
+      require apt::backports
 
       package { 'openjdk-7-jdk' :
-        ensure => present
+        ensure => present,
       }
+
       package { 'openjdk-8-jdk' :
         ensure => present,
       }
 
-      Apt::Source['backports'] -> Exec['apt-update']
+      exec { '/usr/sbin/update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac':
+        require => Package['openjdk-7-jdk', 'openjdk-8-jdk']
+      }
+      exec { '/usr/sbin/update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java':
+        require => Package['openjdk-7-jdk', 'openjdk-8-jdk']
+      }
     }
     /Ubuntu/: {
       include apt
-      
+
       package { 'openjdk-7-jdk' :
-        ensure => present
+        ensure  => present,
+        # needed for 16.04
+        require => [ Apt::Ppa[ 'http://ppa.launchpad.net/openjdk-r/ppa/ubuntu'], Class['apt::update']
]
       }
       package { 'openjdk-8-jdk' :
-        ensure => present,
+        ensure  => present,
+        # needed for 14.04 
+        require => [ Apt::Ppa[ 'http://ppa.launchpad.net/openjdk-r/ppa/ubuntu'], Class['apt::update']
]
       }
 
       apt::key { 'openjdk-ppa':
-        id => 'eb9b1d8886f44e2a',
-	server  => 'keyserver.ubuntu.com'
+        id     => 'eb9b1d8886f44e2a',
+        server => 'keyserver.ubuntu.com'
       }  ->
       apt::ppa { 'http://ppa.launchpad.net/openjdk-r/ppa/ubuntu':  }
-      
-      Apt::Ppa['http://ppa.launchpad.net/openjdk-r/ppa/ubuntu'] -> Exec['apt-update']
+
+      exec { '/usr/bin/update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac':
+        require => Package['openjdk-7-jdk', 'openjdk-8-jdk']
+      }
+      exec { '/usr/bin/update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java':
+        require => Package['openjdk-7-jdk', 'openjdk-8-jdk']
+      }
     }
     /(CentOS|Amazon)/: {
       package { 'java-1.7.0-openjdk-devel' :
@@ -53,11 +68,12 @@ class bigtop_toolchain::jdk {
       package { 'java-1.8.0-openjdk-devel' :
         ensure => present
       }
+      # java 1.8 
     }
     /Fedora/: {
-      if 0 + $operatingsystemrelease < 21 {
-         package { 'java-1.7.0-openjdk-devel' :
-           ensure => present
+      if 0 + $::operatingsystemrelease < 21 {
+        package { 'java-1.7.0-openjdk-devel' :
+          ensure => present
         }
       }
       package { 'java-1.8.0-openjdk-devel' :

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2c3055be/bigtop_toolchain/manifests/packages.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/packages.pp b/bigtop_toolchain/manifests/packages.pp
index 84ccdc9..d2602b2 100644
--- a/bigtop_toolchain/manifests/packages.pp
+++ b/bigtop_toolchain/manifests/packages.pp
@@ -209,17 +209,13 @@ class bigtop_toolchain::packages {
         "flex",
         "python-dev"
       ]
-      file { "/etc/apt/apt.conf.d/retries":
-        content => "Aquire::Retries \"5\";
-"
-      } -> exec { "apt-update":
-        command => "/usr/bin/apt-get update"
-      }
-      Exec["apt-update"] -> Package <| |>
+      file { '/etc/apt/apt.conf.d/01retries':
+        content => 'Aquire::Retries "5";'
+      } -> Package <| |>
     }
   }
   package { $pkgs:
-    ensure => installed,
+    ensure => installed
   }
 
   # Some bigtop packages use `/usr/lib/rpm/redhat` tools

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2c3055be/docker/bigtop-slaves/debian-8/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/bigtop-slaves/debian-8/Dockerfile b/docker/bigtop-slaves/debian-8/Dockerfile
index 0022c51..8c4d0ee 100644
--- a/docker/bigtop-slaves/debian-8/Dockerfile
+++ b/docker/bigtop-slaves/debian-8/Dockerfile
@@ -17,6 +17,7 @@ MAINTAINER oflebbe@apache.org
 
 COPY bigtop_toolchain /etc/puppet/modules/bigtop_toolchain
 
-RUN puppet apply -e "include bigtop_toolchain::installer"
+RUN  apt-get clean && apt-get update && puppet apply -e "include bigtop_toolchain::installer"
+
 COPY . /tmp/bigtop
 RUN cd /tmp/bigtop && ./gradlew && cd && rm -rf /tmp/bigtop

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2c3055be/docker/bigtop-slaves/ubuntu-14.04/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/bigtop-slaves/ubuntu-14.04/Dockerfile b/docker/bigtop-slaves/ubuntu-14.04/Dockerfile
index 17132c0..0155142 100644
--- a/docker/bigtop-slaves/ubuntu-14.04/Dockerfile
+++ b/docker/bigtop-slaves/ubuntu-14.04/Dockerfile
@@ -17,6 +17,6 @@ MAINTAINER oflebbe@apache.org
 
 COPY bigtop_toolchain /etc/puppet/modules/bigtop_toolchain
 
-RUN puppet apply -e "include bigtop_toolchain::installer"
+RUN apt-get clean && apt-get update && puppet apply -e "include bigtop_toolchain::installer"
 COPY . /tmp/bigtop
 RUN cd /tmp/bigtop && ./gradlew && cd && rm -rf /tmp/bigtop

http://git-wip-us.apache.org/repos/asf/bigtop/blob/2c3055be/docker/bigtop-slaves/ubuntu-16.04/Dockerfile
----------------------------------------------------------------------
diff --git a/docker/bigtop-slaves/ubuntu-16.04/Dockerfile b/docker/bigtop-slaves/ubuntu-16.04/Dockerfile
index 08d1a96..74abcc5 100644
--- a/docker/bigtop-slaves/ubuntu-16.04/Dockerfile
+++ b/docker/bigtop-slaves/ubuntu-16.04/Dockerfile
@@ -17,6 +17,6 @@ MAINTAINER Amir Sanjar
 
 COPY bigtop_toolchain /etc/puppet/modules/bigtop_toolchain
 
-RUN puppet apply -e "include bigtop_toolchain::installer"
+RUN  apt-get clean && apt-get update && puppet apply -e "include bigtop_toolchain::installer"
 COPY . /tmp/bigtop
 RUN cd /tmp/bigtop && ./gradlew && cd && rm -rf /tmp/bigtop


Mime
View raw message