Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIGTOP-3356: Add CentOS 8 support to the Docker provisioner #640

Merged
merged 2 commits into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bigtop_toolchain/bin/puppetize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ case ${ID}-${VERSION_ID} in
rpm -Uvh https://yum.puppet.com/puppet5-release-el-8.noarch.rpm
dnf -y check-update
dnf -y install hostname curl sudo unzip wget puppet-agent 'dnf-command(config-manager)'
/opt/puppetlabs/bin/puppet module install puppetlabs-stdlib
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
Expand Down
6 changes: 6 additions & 0 deletions docker/bigtop-puppet/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,17 @@ else
ARCH=""
fi

ENV_PATH=""
if [ ${OS} = "centos" -a ${VERSION} -ge 8 ]; then
ENV_PATH='ENV PATH /opt/puppetlabs/bin:$PATH'
fi

cp ../../bigtop_toolchain/bin/puppetize.sh .
cat >Dockerfile <<EOF
FROM ${OS}:${VERSION}
MAINTAINER [email protected]
COPY puppetize.sh /tmp/puppetize.sh
${ENV_PATH}
RUN bash /tmp/puppetize.sh
EOF

Expand Down
24 changes: 24 additions & 0 deletions provisioner/docker/config_centos-8.yaml
Original file line number Diff line number Diff line change
@@ -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-centos-8"

repo: "http://repos.bigtop.apache.org/releases/1.5.0/centos/8/$basearch"
iwasakims marked this conversation as resolved.
Show resolved Hide resolved
distro: centos
components: [hdfs, yarn, mapreduce]
enable_local_repo: false
smoke_test_components: [hdfs, yarn, mapreduce]
1 change: 1 addition & 0 deletions provisioner/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ bigtop:
- ./config/hiera.yaml:/etc/puppet/hiera.yaml
- ./config/hieradata:/etc/puppet/hieradata
- ./config/hosts:/etc/hosts
- /sys/fs/cgroup:/sys/fs/cgroup:ro
2 changes: 1 addition & 1 deletion provisioner/docker/docker-hadoop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ bigtop-puppet() {
if docker exec $1 bash -c "puppet --version" | grep ^3 >/dev/null ; then
future="--parser future"
fi
docker exec $1 bash -c "puppet apply --detailed-exitcodes $future --modulepath=/bigtop-home/bigtop-deploy/puppet/modules:/etc/puppet/modules:/usr/share/puppet/modules /bigtop-home/bigtop-deploy/puppet/manifests"
docker exec $1 bash -c "puppet apply --detailed-exitcodes $future --hiera_config=/etc/puppet/hiera.yaml --modulepath=/bigtop-home/bigtop-deploy/puppet/modules:/etc/puppet/modules:/usr/share/puppet/modules:/etc/puppetlabs/code/environments/production/modules /bigtop-home/bigtop-deploy/puppet/manifests"
}

get-yaml-config() {
Expand Down