Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Change centos to RockyLinux-8 #3773

Merged
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 bazel_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#
# cd docker
# ./build-artifacts.sh ubuntu20.04 0.12.0 .
# ./build-artifacts.sh centos8 0.12.0 .
# ./build-artifacts.sh rocky8 0.12.0 .
#
import os
import re
Expand Down
3 changes: 2 additions & 1 deletion docker/compile/Dockerfile.centos7
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ FROM centos:centos7

# This is passed to the heron build command via the --config flag
ENV TARGET_PLATFORM linux
ENV LC_ALL en_US.utf8

RUN yum -y upgrade && yum -y install centos-release-scl-rh
RUN yum -y install \
Expand All @@ -32,6 +31,7 @@ RUN yum -y install \
devtoolset-8-gcc \
devtoolset-8-gcc-c++ \
git \
glibc-langpack-en \
kernel-devel \
libtool \
make \
Expand All @@ -46,6 +46,7 @@ RUN yum -y install \
java-11-openjdk \
java-11-openjdk-devel

ENV LC_ALL en_US.utf8
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk

ENV bazelVersion 4.2.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
# specific language governing permissions and limitations
# under the License.

FROM centos:centos8
FROM rockylinux:8.5

# This is passed to the heron build command via the --config flag
ENV TARGET_PLATFORM linux

ENV LC_ALL en_US.utf8

RUN yum -y upgrade
RUN yum -y install \
ant \
Expand All @@ -33,6 +31,7 @@ RUN yum -y install \
gcc \
gcc-c++ \
git \
glibc-langpack-en \
kernel-devel \
libtool \
make \
Expand All @@ -44,10 +43,11 @@ RUN yum -y install \
which \
tree \
java-11-openjdk \
java-11-openjdk-devel
java-11-openjdk-devel

RUN update-alternatives --set python /usr/bin/python3.9

ENV LC_ALL en_US.utf8
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk

ENV bazelVersion 4.2.2
Expand Down
66 changes: 66 additions & 0 deletions docker/dist/Dockerfile.dist.rocky8
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# 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.

#syntax=docker/dockerfile:1.2
FROM rockylinux:8.5

RUN yum -y install epel-release \
&& yum -y install \
curl \
java-11-openjdk-headless \
supervisor \
nmap-ncat \
rh-python38-python \
rh-python38-python-devel \
unzip \
which \
glibc-langpack-en \
&& yum clean all

ENV LC_ALL en_US.utf8
ENV JAVA_HOME /usr/

RUN /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3 /usr/bin/python \
&& /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3 /usr/bin/python3 \
&& /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3.8 /usr/bin/python3.8

# run Heron installer
RUN --mount=type=bind,source=artifacts,target=/tmp/heron /tmp/heron/heron-install.sh \
&& rm -f /usr/local/heron/dist/heron-core.tar.gz

WORKDIR /heron

RUN ln -s /usr/local/heron/dist/heron-core /heron \
&& mkdir -p /heron/heron-tools \
&& ln -s /usr/local/heron/bin /heron/heron-tools \
&& ln -s /usr/local/heron/conf /heron/heron-tools \
&& ln -s /usr/local/heron/dist /heron/heron-tools \
&& ln -s /usr/local/heron/lib /heron/heron-tools \
&& ln -s /usr/local/heron/release.yaml /heron/heron-tools \
&& ln -s /usr/local/heron/examples /heron \
&& ln -s /usr/local/heron/release.yaml /heron

ENV HERON_HOME /heron/heron-core/
RUN export HERON_HOME

# install Zookeeper
ARG ZK_DIST=zookeeper-3.5.8

RUN --mount=type=bind,source=dist,target=/opt/heron-docker/ sh /opt/heron-docker/scripts/install-zookeeper.sh $ZK_DIST

ADD dist/conf/zookeeper.conf /opt/zookeeper/conf/zookeeper.conf
ADD dist/conf/sandbox.conf /etc/supervisor/conf.d/
2 changes: 1 addition & 1 deletion docker/scripts/build-artifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ case $# in
echo " "
echo "Script to build heron artifacts for different platforms"
echo " "
echo "Platforms Supported: darwin, debian10, ubuntu20.04, centos8"
echo "Platforms Supported: darwin, debian10, ubuntu20.04, rocky8"
echo " "
echo "Example:"
echo " ./build-artifacts.sh ubuntu20.04 0.12.0 ."
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/build-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ case $# in
echo " "
echo "Usage: $0 <platform> <version_string> <output-directory>"
echo " "
echo "Platforms Supported: darwin, debian10, ubuntu20.04, centos8"
echo "Platforms Supported: darwin, debian10, ubuntu20.04, rocky8"
echo " "
echo "Example:"
echo " ./build-base.sh ubuntu20.04 0.12.0 ~/ubuntu"
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ case $# in
echo "Usage: $0 <platform> <version_string> <artifact-directory> [-s|--squash]"
echo " "
echo "Argument options:"
echo " <platform>: darwin, debian10, ubuntu20.04, centos8"
echo " <platform>: darwin, debian10, ubuntu20.04, rocky8"
echo " <version_string>: Version of Heron build, e.g. v0.17.5.1-rc"
echo " <artifact-directory>: Location of compiled Heron artifact"
echo " [-s|--squash]: Enables using Docker experimental feature --squash"
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/build-exec-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ case $# in
*)
echo "Usage: $0 <platform> <version_string> <output-directory> "
echo " "
echo "Platforms Supported: darwin, debian10, ubuntu20.04, centos8"
echo "Platforms Supported: darwin, debian10, ubuntu20.04, rocky8"
echo " "
echo "Example:"
echo " ./build-exec-docker.sh ubuntu20.04 0.12.0 ."
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/ci-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ case $# in
*)
echo "Usage: $0 <operation> <platform> <version_string> <tag-prefix> <input-output-directory> "
echo " "
echo "Platforms Supported: latest, ubuntu20.04, centos8, debian10"
echo "Platforms Supported: ubuntu20.04, rocky8, debian10"
echo " "
echo "Example:"
echo " $0 build ubuntu20.04 0.12.0 heron ."
Expand Down
2 changes: 2 additions & 0 deletions docker/scripts/compile-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ if [[ "$TARGET_PLATFORM" =~ "ubuntu" ]]; then
CONFIG_PLATFORM=linux_nostyle
elif [[ "$TARGET_PLATFORM" =~ "centos" ]]; then
CONFIG_PLATFORM=linux_nostyle
elif [[ "$TARGET_PLATFORM" =~ "rocky" ]]; then
CONFIG_PLATFORM=linux_nostyle
elif [[ "$TARGET_PLATFORM" =~ "debian" ]]; then
CONFIG_PLATFORM=linux_nostyle
elif [[ "$TARGET_PLATFORM" =~ "darwin" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/dev-env-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ case $# in
esac

# Default platform is ubuntu18.04. Other available platforms
# include centos8, debian10, ubuntu18.04
# include rocky8, debian10, ubuntu18.04
TARGET_PLATFORM=${2:-"ubuntu18.04"}
SCRATCH_DIR="$HOME/.heron-docker"
REPOSITORY="heron-dev"
Expand Down
2 changes: 2 additions & 0 deletions docker/scripts/test-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ if [[ "$TARGET_PLATFORM" =~ "ubuntu" ]]; then
CONFIG_PLATFORM=linux_nostyle
elif [[ "$TARGET_PLATFORM" =~ "centos" ]]; then
CONFIG_PLATFORM=linux_nostyle
elif [[ "$TARGET_PLATFORM" =~ "rocky" ]]; then
CONFIG_PLATFORM=linux_nostyle
elif [[ "$TARGET_PLATFORM" =~ "darwin" ]]; then
CONFIG_PLATFORM=darwin
elif [[ "$TARGET_PLATFORM" =~ "debian" ]]; then
Expand Down
4 changes: 2 additions & 2 deletions docker/scripts/test-unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ case $# in
echo " "
echo "Script to test heron artifacts for different platforms"
echo " "
echo "Platforms Supported: darwin, ubuntu18.04, centos8"
echo "Platforms Supported: darwin, ubuntu18.04, rocky8"
echo " "
echo "Example:"
echo " ./test-unittest.sh centos8 0.20.2"
echo " ./test-unittest.sh rocky8 0.20.2"
echo " "
echo "NOTE: If running on OSX, the output directory will need to "
echo " be under /Users so virtualbox has access to."
Expand Down
65 changes: 65 additions & 0 deletions docker/test/Dockerfile.rocky8
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 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.

FROM rockylinux:8.5

# This is passed to the heron build command via the --config flag
ENV TARGET_PLATFORM linux
ENV LC_ALL en_US.utf8

RUN yum -y upgrade
RUN yum -y install \
automake \
curl \
cmake \
openssl-devel \
file \
devtoolset-8-gcc \
devtoolset-8-gcc-c++ \
git \
kernel-devel \
libtool \
make \
patch \
ant \
rh-python38-python-devel \
zip \
unzip \
wget \
which \
tree \
java-11-openjdk-devel \
glibc-langpack-en

RUN /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3 /usr/bin/python3 \
&& /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3 /usr/bin/python \
&& /usr/bin/ln -sfT /opt/rh/rh-python38/root/usr/bin/python3.8 /usr/bin/python3.8 \
&& /usr/bin/ln -sfT /opt/rh/devtoolset-8/root/bin/gcc /usr/bin/gcc \
&& /usr/bin/ln -sfT /opt/rh/devtoolset-8/root/bin/g++ /usr/bin/g++ \
&& /usr/bin/ln -sfT /opt/rh/devtoolset-8/root/bin/cpp /usr/bin/cpp

ENV LC_ALL en_US.utf8
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk

ENV bazelVersion 4.2.2

RUN wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/$bazelVersion/bazel-$bazelVersion-installer-linux-x86_64.sh \
&& chmod +x /tmp/bazel.sh \
&& /tmp/bazel.sh

ADD bazelrc /root/.bazelrc
ADD scripts/test-platform.sh /test-platform.sh
4 changes: 2 additions & 2 deletions scripts/ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ set -o pipefail
# Install bazel (linux build) because CI hosts may not have it installed
bash scripts/ci/setup_bazel.sh linux

# Build v0.20.1-incubating packages for centos8 and put in artifacts folder
# Build v0.20.1-incubating packages for rocky8 and put in artifacts folder
HERON_BUILD_USER=release-agent
bash scripts/ci/build_release_packages.sh v0.20.1-incubating centos8 artifacts
bash scripts/ci/build_release_packages.sh v0.20.1-incubating rocky8 artifacts

```

Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/build_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Build docker image to be released
# parameters:
# 1. version tag, e.g. v0.20.1-incubating
# 2. build os, e.g. debian10, centos8
# 2. build os, e.g. debian10, rocky8
# 3. output dir

# Related environment variables
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/build_release_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Build packages to be released
# parameters:
# 1. version tag, e.g. v0.20.1-incubating
# 2. build os, e.g. darwin, centos8
# 2. build os, e.g. darwin, rocky8
# 3. output dir

# Related environment variables
Expand Down
2 changes: 1 addition & 1 deletion scripts/detect_os_type.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function platform {
*)
echo "WARNING: Your platform is not currently supported!" >&2
echo "Currently supported platforms are:" >&2
echo " darwin, ubuntu, and centos"
echo " darwin, ubuntu, rocky and centos"
exit 1
;;
esac
Expand Down
10 changes: 5 additions & 5 deletions website2/docs/compiling-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Script to build heron docker image for different platforms
Usage: ./docker/scripts/build-docker.sh <platform> <version_string> <artifact-directory> [-s|--squash]

Argument options:
<platform>: darwin, debian10, ubuntu20.04, centos8
<platform>: darwin, debian10, ubuntu20.04, rocky8
<version_string>: Version of Heron build, e.g. v0.17.5.1-rc
<artifact-directory>: Location of compiled Heron artifact
[-s|--squash]: Enables using Docker experimental feature --squash
Expand All @@ -82,8 +82,8 @@ The following arguments are required:
* `platform` --- Currently we are focused on supporting the `debian10` and `ubuntu20.04` platforms.
We also support building Heron locally on OSX. You can specify this as listing `darwin` as the platform.
All options are:
- `centos8`
- `darwin`
- `rocky8`
- `debian10`
- `ubuntu18.04`
- `ubuntu20.04`
Expand Down Expand Up @@ -172,7 +172,7 @@ platforms.

To add support for a new platform, add a new `Dockerfile` to that directory and
append the name of the platform to the name of the file. If you'd like to add
support for Debian 8, for example, add a file named `Dockerfile.debian8`. Once
support for Debian 8, for example, add a file named `Dockerfile.debian10`. Once
you've done that, follow the instructions in the [Docker
documentation](https://docs.docker.com/engine/articles/dockerfile_best-practices/).

Expand All @@ -184,15 +184,15 @@ following:
Here's an example:

```dockerfile
FROM centos:centos8
FROM rockylinux:8.5
```

### Step 2 --- A `TARGET_PLATFORM` environment variable using the [`ENV`](https://docs.docker.com/engine/reference/builder/#env) instruction.

Here's an example:

```dockerfile
ENV TARGET_PLATFORM centos
ENV TARGET_PLATFORM rocky
```

### Step 3 --- A general dependency installation script using a [`RUN`](https://docs.docker.com/engine/reference/builder/#run) instruction.
Expand Down
Loading