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 8abed3b BIGTOP-3288. Update support distros in the Docker build
scripts for v1.5.0 (#579)
8abed3b is described below
commit 8abed3b1bf197f26af1af1771b683a9073430515
Author: Kengo Seki <[email protected]>
AuthorDate: Fri Jan 24 15:00:12 2020 +0900
BIGTOP-3288. Update support distros in the Docker build scripts for v1.5.0
(#579)
---
bigtop_toolchain/bin/puppetize.sh | 11 +++++++++--
docker/bigtop-slaves/Dockerfile.template | 4 +++-
docker/bigtop-slaves/build.sh | 15 ++++++++++++---
3 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/bigtop_toolchain/bin/puppetize.sh
b/bigtop_toolchain/bin/puppetize.sh
index 2422719..d6bb097 100755
--- a/bigtop_toolchain/bin/puppetize.sh
+++ b/bigtop_toolchain/bin/puppetize.sh
@@ -24,7 +24,11 @@ case ${ID}-${VERSION_ID} in
fedora-31)
dnf -y install yum-utils
dnf -y check-update
- dnf -y install hostname findutils curl sudo unzip wget puppet
puppetlabs-stdlib procps-ng
+ dnf -y install hostname findutils curl sudo unzip wget puppet procps-ng
+ # On Fedora 31, the puppetlabs-stdlib package provided by the distro
installs the module
+ # into /usr/share/puppet/modules, but it's not recognized as the
default module path.
+ # 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)
apt-get update
@@ -46,8 +50,11 @@ case ${ID}-${VERSION_ID} in
centos-8* | rhel-8*)
rpm -Uvh https://yum.puppet.com/puppet5-release-el-8.noarch.rpm
dnf -y check-update
- dnf -y install puppet-agent
+ dnf -y install hostname curl sudo unzip wget puppet-agent
'dnf-command(config-manager)'
/opt/puppetlabs/bin/puppet module install puppetlabs-stdlib
+ # Enabling the PowerTools and EPEL repositories via Puppet doesn't
seem to work in some cases.
+ # As a workaround for that, enable the former here in advance of
running the Puppet manifests.
+ dnf config-manager --set-enabled PowerTools
;;
*)
echo "Unsupported OS ${ID}-${VERSION_ID}."
diff --git a/docker/bigtop-slaves/Dockerfile.template
b/docker/bigtop-slaves/Dockerfile.template
index ece6ca5..6ff03ce 100644
--- a/docker/bigtop-slaves/Dockerfile.template
+++ b/docker/bigtop-slaves/Dockerfile.template
@@ -19,6 +19,8 @@ MAINTAINER [email protected]
COPY bigtop_toolchain PUPPET_MODULES
-RUN UPDATE_SOURCE && puppet apply -e "include bigtop_toolchain::installer" ||
if [ $? -ne 2 ]; then exit 1; fi
+RUN if [ -f ~/.bash_profile ]; then . ~/.bash_profile; fi && \
+ UPDATE_SOURCE && \
+ puppet apply -e "include bigtop_toolchain::installer" || if [ $? -ne 2 ];
then exit 1; fi
COPY . /tmp/bigtop
RUN cd /tmp/bigtop && ./gradlew && cd && rm -rf /tmp/*
diff --git a/docker/bigtop-slaves/build.sh b/docker/bigtop-slaves/build.sh
index 4a4e17d..f8af8f3 100755
--- a/docker/bigtop-slaves/build.sh
+++ b/docker/bigtop-slaves/build.sh
@@ -41,7 +41,11 @@ fi
# setup puppet/modules path and update cmds
case ${OS} in
ubuntu)
- PUPPET_MODULES="/etc/puppet/modules/bigtop_toolchain"
+ if [ "${VERSION}" > "16.04" ]; then
+ PUPPET_MODULES="/usr/share/puppet/modules/bigtop_toolchain"
+ else
+ PUPPET_MODULES="/etc/puppet/modules/bigtop_toolchain"
+ fi
UPDATE_SOURCE="apt-get clean \&\& apt-get update"
;;
debian)
@@ -53,8 +57,13 @@ case ${OS} in
UPDATE_SOURCE="dnf clean all \&\& dnf updateinfo"
;;
centos)
- PUPPET_MODULES="/etc/puppet/modules/bigtop_toolchain"
- UPDATE_SOURCE="yum clean all \&\& yum updateinfo"
+ if [ "${VERSION}" -gt "7" ]; then
+
PUPPET_MODULES="/etc/puppetlabs/code/environments/production/modules/bigtop_toolchain"
+ UPDATE_SOURCE="dnf clean all \&\& dnf updateinfo"
+ else
+ PUPPET_MODULES="/etc/puppet/modules/bigtop_toolchain"
+ UPDATE_SOURCE="yum clean all \&\& yum updateinfo"
+ fi
;;
opensuse)
PUPPET_MODULES="/etc/puppet/modules/bigtop_toolchain"