This is an automated email from the ASF dual-hosted git repository. guyuqi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bigtop.git
commit 1e752638a1e8eb6a49ff43786c7cc69c3b2c07c8 Author: MacChen01 <[email protected]> AuthorDate: Fri Jul 14 10:30:37 2023 +0800 BIGTOP-3883: add smoke test for openeuler (#1131) (cherry picked from commit c77033014ae9a3ab2efb7df65d737355f6cc0d7f) --- bigtop-deploy/puppet/manifests/jdk.pp | 2 +- .../puppet/modules/nfs/manifests/client/params.pp | 2 +- bigtop_toolchain/bin/puppetize.sh | 6 ++--- provisioner/docker/config_openeuler-22.03.yaml | 24 +++++++++++++++++ provisioner/docker/docker-hadoop.sh | 2 +- provisioner/utils/setup-env-centos.sh | 30 +++++++++++++++++----- 6 files changed, 52 insertions(+), 14 deletions(-) diff --git a/bigtop-deploy/puppet/manifests/jdk.pp b/bigtop-deploy/puppet/manifests/jdk.pp index 36800eb0c..9ac94c813 100644 --- a/bigtop-deploy/puppet/manifests/jdk.pp +++ b/bigtop-deploy/puppet/manifests/jdk.pp @@ -41,7 +41,7 @@ class jdk { noop => $jdk_preinstalled, } } - /(CentOS|Amazon|Fedora|RedHat|Rocky)/: { + /(CentOS|Amazon|Fedora|RedHat|Rocky|openEuler)/: { package { 'jdk': name => 'java-1.8.0-openjdk-devel', ensure => present, diff --git a/bigtop-deploy/puppet/modules/nfs/manifests/client/params.pp b/bigtop-deploy/puppet/modules/nfs/manifests/client/params.pp index ff32c72fd..11036424e 100644 --- a/bigtop-deploy/puppet/modules/nfs/manifests/client/params.pp +++ b/bigtop-deploy/puppet/modules/nfs/manifests/client/params.pp @@ -15,7 +15,7 @@ class nfs::client::params { case "$::operatingsystem $::operatingsystemrelease" { - /(CentOS|RedHat) 6/: { + /(CentOS|RedHat|openEuler) 6/: { $package_names = [ "rpcbind", "nfs-utils" ] $portmap_service = "rpcbind" $idmapd_service = "rpcidmapd" diff --git a/bigtop_toolchain/bin/puppetize.sh b/bigtop_toolchain/bin/puppetize.sh index 9b495ecbe..3fcf64ba4 100755 --- a/bigtop_toolchain/bin/puppetize.sh +++ b/bigtop_toolchain/bin/puppetize.sh @@ -71,16 +71,14 @@ case ${ID}-${VERSION_ID} in dnf config-manager --set-enabled codeready-builder-for-rhel-8-rhui-rpms ;; openEuler-*) - yum -y install hostname curl sudo unzip wget ruby vim patch systemd-devel rng-tools + yum -y install hostname curl sudo unzip wget ruby vim patch systemd-devel rng-tools findutils # openEuler ruby version is 3.X,so use puppet-7.22.0. gem install puppet -v 7.22.0 gem install xmlrpc gem install sync - gem install puppetmodule-stdlib + puppet module install puppetlabs-stdlib --version 4.12.0 #openEuler dnf defaulted is not use module,so comment module in puppet-7.22.0 sed -i "91c execute([command(:dnf), 'install', '-d', '0', '-e', self.class.error_level, '-y', args])" /usr/local/share/gems/gems/puppet-7.22.0/lib/puppet/provider/package/dnfmodule.rb - mkdir -p /etc/puppetlabs/code/modules/stdlib - cp -r /usr/local/share/gems/gems/puppetmodule-stdlib-4.0.2/* /etc/puppetlabs/code/modules/stdlib/ ;; *) echo "Unsupported OS ${ID}-${VERSION_ID}." diff --git a/provisioner/docker/config_openeuler-22.03.yaml b/provisioner/docker/config_openeuler-22.03.yaml new file mode 100644 index 000000000..6745442b7 --- /dev/null +++ b/provisioner/docker/config_openeuler-22.03.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/slaves:trunk-openeuler-22.03" + +repo: "http://repios.bigtop.apache.org/releases/3.2.0/openEuler/22.03/$basearch" +distro: centos +components: [hdfs ,yarn ,mapreduce] +enable_local_repo: false +smoke_test_components: [hdfs, yarn, mapreduce] diff --git a/provisioner/docker/docker-hadoop.sh b/provisioner/docker/docker-hadoop.sh index 0ba0133e3..f235ac9ae 100755 --- a/provisioner/docker/docker-hadoop.sh +++ b/provisioner/docker/docker-hadoop.sh @@ -388,7 +388,7 @@ while [ $# -gt 0 ]; do image_name=$2 # Determine distro to bootstrap provisioning environment case "${image_name}" in - *-centos-*|*-fedora-*|*-opensuse-*|*-rockylinux-*) + *-centos-*|*-fedora-*|*-opensuse-*|*-rockylinux-*|*-openeuler-*) distro=centos ;; *-debian-*|*-ubuntu-*) diff --git a/provisioner/utils/setup-env-centos.sh b/provisioner/utils/setup-env-centos.sh index 3d097a543..9822410e9 100755 --- a/provisioner/utils/setup-env-centos.sh +++ b/provisioner/utils/setup-env-centos.sh @@ -21,9 +21,21 @@ enable_local_repo=${1:-false} # revert back to localhost.localdomain sed -ie 's#HOSTNAME=.*$#HOSTNAME='`hostname -f`'#' /etc/sysconfig/network +if [ -f /etc/os-release ]; then + . /etc/os-release +fi + # Setup rng-tools to improve virtual machine entropy performance. # The poor entropy performance will cause kerberos provisioning failed. -yum -y install rng-tools yum-priorities + +# BIGTOP-3883: +# yum-utils, yum-priorities and yum-config-manager are NOT available in openEuler 22.03 +if [ "${ID}" = "openEuler" ];then + dnf install rng-tools 'dnf-command(config-manager)' -y +else + yum -y install rng-tools yum-priorities +fi + if [ -x /usr/bin/systemctl ] ; then sed -i 's@ExecStart=/sbin/rngd -f@ExecStart=/sbin/rngd -f -r /dev/urandom@' /usr/lib/systemd/system/rngd.service systemctl daemon-reload @@ -35,13 +47,12 @@ fi if [ $enable_local_repo == "true" ]; then echo "Enabling local yum." - yum -y install yum-utils - - if [ -f /etc/os-release ]; then - . /etc/os-release + if [ "${ID}" != "openEuler" ];then + yum -y install yum-utils fi + case ${ID} in - fedora) + fedora | openEuler) sed -i 's/gpgcheck=1/gpgcheck=0/g' /etc/dnf/dnf.conf ;; centos) @@ -49,7 +60,12 @@ if [ $enable_local_repo == "true" ]; then ;; esac - sudo yum-config-manager --add-repo file:///bigtop-home/output + if [ "${ID}" = "openEuler" ];then + sudo dnf config-manager --add-repo file:///bigtop-home/output + else + sudo yum-config-manager --add-repo file:///bigtop-home/output + fi + sudo echo "gpgcheck=0" >> /etc/yum.repos.d/bigtop-home_output.repo sudo echo "priority=9" >> /etc/yum.repos.d/bigtop-home_output.repo else
