This is an automated email from the ASF dual-hosted git repository.

sekikn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new cd8903a  BIGTOP-3343. Add Debian 10 and Ubuntu 18.04 support to the 
Docker provisioner. (#634)
cd8903a is described below

commit cd8903aab346aa38f83cb1a2177bf8a56fc8d1c4
Author: Kengo Seki <[email protected]>
AuthorDate: Tue Jul 7 23:46:35 2020 +0900

    BIGTOP-3343. Add Debian 10 and Ubuntu 18.04 support to the Docker 
provisioner. (#634)
---
 bigtop-deploy/puppet/manifests/bigtop_repo.pp      | 20 ++++++++++++++++--
 bigtop-deploy/puppet/manifests/jdk.pp              | 23 +++++----------------
 .../src/common/bigtop-utils/bigtop-detect-javahome |  1 +
 bigtop_toolchain/bin/puppetize.sh                  | 12 +++++++++--
 provisioner/docker/config_debian-10.yaml           | 24 ++++++++++++++++++++++
 provisioner/docker/config_ubuntu-18.04.yaml        | 24 ++++++++++++++++++++++
 6 files changed, 82 insertions(+), 22 deletions(-)

diff --git a/bigtop-deploy/puppet/manifests/bigtop_repo.pp 
b/bigtop-deploy/puppet/manifests/bigtop_repo.pp
index 44250f3..9b7e45c 100644
--- a/bigtop-deploy/puppet/manifests/bigtop_repo.pp
+++ b/bigtop-deploy/puppet/manifests/bigtop_repo.pp
@@ -67,6 +67,14 @@ class bigtop_repo {
         }
       }
 
+      # BIGTOP-3343. This is a JDK-related stuff, so it should be in jdk.pp 
ordinarily.
+      # But it looks like that this definition must be here to avoid cyclic 
resource dependencies.
+      if ($operatingsystem == 'Debian' and 0 <= 
versioncmp($operatingsystemrelease, "10")) {
+        apt::source { 'adoptopenjdk':
+          location => 'https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/',
+        }
+      }
+
       # It seems that calling update explicitely isn't needed because as far I 
can see
       # it is getting called automatically. Perhaps this was needed for older 
versions?
       exec { 'bigtop-apt-update':
@@ -75,15 +83,23 @@ class bigtop_repo {
 
       if ($bigtop_repo_gpg_check) {
         apt::conf { "remove_disable_keys":
-          content => "APT::Get::AllowUnauthenticated 1;",
+          content => "APT::Get::AllowUnauthenticated 
1;\nAcquire::AllowInsecureRepositories \"true\";",
           ensure  => absent
         }
         apt::key { "add_key":
           id => hiera("bigtop::bigtop_repo_apt_key"),
         }
+
+        # BIGTOP-3343. This is a JDK-related stuff, but it's here for the same 
reason described above.
+        if ($operatingsystem == 'Debian' and 0 <= 
versioncmp($operatingsystemrelease, "10")) {
+          apt::key { "add_adoptopenjdk_key":
+            id => "8ED17AF5D7E675EB3EE3BCE98AC3B29174885C03",
+            source => 
"https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public";,
+          }
+        }
       } else {
         apt::conf { "disable_keys":
-          content => "APT::Get::AllowUnauthenticated 1;",
+          content => "APT::Get::AllowUnauthenticated 
1;\nAcquire::AllowInsecureRepositories \"true\";",
           ensure  => present
         }
       }
diff --git a/bigtop-deploy/puppet/manifests/jdk.pp 
b/bigtop-deploy/puppet/manifests/jdk.pp
index b52a93f..8813821 100644
--- a/bigtop-deploy/puppet/manifests/jdk.pp
+++ b/bigtop-deploy/puppet/manifests/jdk.pp
@@ -19,27 +19,14 @@ class jdk {
   case $::operatingsystem {
     /Debian/: {
       require apt
-      unless $operatingsystemmajrelease > "8" {
-         # we pin openjdk-8-* and ca-certificates-java to backports
-         require apt::backports
 
-         Exec['bigtop-apt-update'] ->
-         apt::pin { 'backports_jdk':
-            packages => 'openjdk-8-*',
-            priority => 500,
-            release  => 'jessie-backports',
-         } ->
-         apt::pin { 'backports_ca':
-            packages => 'ca-certificates-java',
-            priority => 500,
-            release  => 'jessie-backports',
-         } ->
-         exec {'own_update':
-            command => '/usr/bin/apt-get update'
-         } -> Package['jdk']
+      if versioncmp($operatingsystemrelease, "10") < 0 {
+        $jdk_pkg_name = 'openjdk-8-jdk'
+      } else {
+        $jdk_pkg_name = 'adoptopenjdk-8-hotspot'
       }
       package { 'jdk':
-        name => 'openjdk-8-jdk',
+        name => $jdk_pkg_name,
         ensure => present,
         noop => $jdk_preinstalled,
       }
diff --git a/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome 
b/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome
index 769b4c9..ff41cfe 100644
--- a/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome
+++ b/bigtop-packages/src/common/bigtop-utils/bigtop-detect-javahome
@@ -36,6 +36,7 @@ OPENJAVA8_HOME_CANDIDATES=(
     '/usr/lib/jvm/java-1.8.0-openjdk-ppc64el'
     '/usr/lib/jvm/java-1.8.0-openjdk'
     '/usr/lib64/jvm/java-1.8.0-openjdk-1.8.0'
+    '/usr/lib/jvm/adoptopenjdk-8-hotspot'
 )
 
 MISCJAVA_HOME_CANDIDATES=(
diff --git a/bigtop_toolchain/bin/puppetize.sh 
b/bigtop_toolchain/bin/puppetize.sh
index b048a3a..90b1e29 100755
--- a/bigtop_toolchain/bin/puppetize.sh
+++ b/bigtop_toolchain/bin/puppetize.sh
@@ -30,14 +30,22 @@ case ${ID}-${VERSION_ID} in
         # So we install that module in the same way as CentOS 7.
         puppet module install puppetlabs-stdlib --version 4.12.0
         ;;
-    ubuntu-16.04 | ubuntu-18.04)
+    ubuntu-16.04)
         apt-get update
         apt-get -y install wget curl sudo unzip puppet 
software-properties-common puppet-module-puppetlabs-apt 
puppet-module-puppetlabs-stdlib
         ;;
-    debian-9* | debian-10*)
+    ubuntu-18.04)
+        apt-get update
+        apt-get -y install wget curl sudo unzip puppet 
software-properties-common puppet-module-puppetlabs-apt 
puppet-module-puppetlabs-stdlib systemd-sysv
+        ;;
+    debian-9*)
         apt-get update
         apt-get -y install wget curl sudo unzip puppet 
puppet-module-puppetlabs-apt puppet-module-puppetlabs-stdlib systemd-sysv
         ;;
+    debian-10*)
+        apt-get update
+        apt-get -y install wget curl sudo unzip puppet 
puppet-module-puppetlabs-apt puppet-module-puppetlabs-stdlib systemd-sysv gnupg
+        ;;
     centos-7*)
         rpm -ivh 
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
         yum updateinfo
diff --git a/provisioner/docker/config_debian-10.yaml 
b/provisioner/docker/config_debian-10.yaml
new file mode 100644
index 0000000..86e4f2c
--- /dev/null
+++ b/provisioner/docker/config_debian-10.yaml
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+docker:
+        memory_limit: "4g"
+        image: "bigtop/puppet:trunk-debian-10"
+
+repo: "http://repos.bigtop.apache.org/releases/1.5.0/debian/10/$(ARCH)"
+distro: debian
+components: [hdfs, yarn, mapreduce]
+enable_local_repo: false
+smoke_test_components: [hdfs, yarn, mapreduce]
diff --git a/provisioner/docker/config_ubuntu-18.04.yaml 
b/provisioner/docker/config_ubuntu-18.04.yaml
new file mode 100644
index 0000000..fbbdd9e
--- /dev/null
+++ b/provisioner/docker/config_ubuntu-18.04.yaml
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+docker:
+        memory_limit: "4g"
+        image:  "bigtop/puppet:trunk-ubuntu-18.04"
+
+repo: "http://repos.bigtop.apache.org/releases/1.5.0/ubuntu/18.04/$(ARCH)"
+distro: debian
+components: [hdfs, yarn, mapreduce]
+enable_local_repo: false
+smoke_test_components: [hdfs, yarn, mapreduce]

Reply via email to