-
Notifications
You must be signed in to change notification settings - Fork 30
HDDS-14229. Create slim ozone-runner image #51
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,67 +14,22 @@ | |
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| FROM golang:1.17.8-buster AS go | ||
| RUN go install github.com/rexray/gocsi/csc@latest | ||
|
|
||
| FROM rockylinux:9.3 | ||
| RUN set -eux ; \ | ||
| dnf install -y \ | ||
| bzip2 \ | ||
| diffutils \ | ||
| findutils \ | ||
| fuse \ | ||
| jq \ | ||
| krb5-workstation \ | ||
| libxcrypt-compat \ | ||
| lsof \ | ||
| ncurses \ | ||
| net-tools \ | ||
| nmap-ncat \ | ||
| openssl \ | ||
| procps \ | ||
| python3 python3-pip \ | ||
| snappy \ | ||
| sudo \ | ||
| unzip \ | ||
| zlib \ | ||
| && dnf clean all \ | ||
| && ln -sf /usr/bin/python3 /usr/bin/python | ||
| RUN sudo python3 -m pip install --upgrade pip | ||
|
|
||
| # CSI / k8s / fuse / goofys dependency | ||
| COPY --from=go /go/bin/csc /usr/bin/csc | ||
| # S3 FUSE support - mountpoint-s3 | ||
| ARG MOUNTPOINT_S3_VERSION=1.19.0 | ||
| RUN set -eux ; \ | ||
| ARCH="$(arch)"; \ | ||
| case "${ARCH}" in \ | ||
| x86_64) arch='x86_64' ;; \ | ||
| aarch64) arch='arm64' ;; \ | ||
| *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ | ||
| esac; \ | ||
| curl -L "https://s3.amazonaws.com/mountpoint-s3-release/${MOUNTPOINT_S3_VERSION}/${arch}/mount-s3-${MOUNTPOINT_S3_VERSION}-${arch}.rpm" -o mount-s3.rpm ; \ | ||
| dnf install -y mount-s3.rpm ; \ | ||
| rm -f mount-s3.rpm | ||
| && dnf clean all | ||
|
|
||
| # Install rclone for smoketest | ||
| ARG RCLONE_VERSION=1.69.3 | ||
| RUN set -eux ; \ | ||
| ARCH="$(arch)" ; \ | ||
| case "${ARCH}" in \ | ||
| x86_64) arch='amd64' ;; \ | ||
| aarch64) arch='arm64' ;; \ | ||
| *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ | ||
| esac; \ | ||
| curl -L -o /tmp/package.rpm "https://downloads.rclone.org/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-linux-${arch}.rpm"; \ | ||
| dnf install -y /tmp/package.rpm; \ | ||
| rm -f /tmp/package.rpm | ||
|
|
||
|
|
||
| #For executing inline smoketest | ||
| RUN set -eux ; \ | ||
| pip3 install awscli==1.38.15 robotframework==6.1.1 boto3==1.37.15 ; \ | ||
| rm -r ~/.cache/pip | ||
|
|
||
| #dumb init for proper init handling | ||
| RUN set -eux ; \ | ||
|
|
@@ -95,30 +50,6 @@ RUN set -eux ; \ | |
| chmod +x dumb-init ; \ | ||
| mv dumb-init /usr/local/bin/dumb-init | ||
|
|
||
| #byteman test for development | ||
| ARG BYTEMAN_VERSION=4.0.25 | ||
| ENV BYTEMAN_HOME=/opt/byteman | ||
| RUN cd /tmp && \ | ||
| curl -L -o byteman.zip https://downloads.jboss.org/byteman/${BYTEMAN_VERSION}/byteman-download-${BYTEMAN_VERSION}-bin.zip && \ | ||
| unzip -j -d byteman byteman.zip && \ | ||
| sudo mkdir -p ${BYTEMAN_HOME}/lib && \ | ||
| sudo mv byteman/byteman.jar byteman/byteman-submit.jar ${BYTEMAN_HOME}/lib/ && \ | ||
| sudo mv byteman/bmsubmit.sh /usr/local/bin/bmsubmit && \ | ||
| sudo chmod +x /usr/local/bin/bmsubmit && \ | ||
| sudo rm -rf byteman.zip byteman && \ | ||
| sudo chmod -R a+rX ${BYTEMAN_HOME} && \ | ||
| sudo ln -s ${BYTEMAN_HOME}/lib/byteman.jar /opt/byteman.jar | ||
|
|
||
| #async profiler for development profiling | ||
| RUN set -eux ; \ | ||
| ARCH="$(arch)" ; \ | ||
| case "${ARCH}" in \ | ||
| x86_64) url='https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.9/async-profiler-2.9-linux-x64.tar.gz' ;; \ | ||
| aarch64) url='https://github.com/jvm-profiling-tools/async-profiler/releases/download/v2.9/async-profiler-2.9-linux-arm64.tar.gz' ;; \ | ||
| *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ | ||
| esac; \ | ||
| curl -L ${url} | tar xvz ; \ | ||
| mv async-profiler-* /opt/profiler | ||
|
|
||
| # Hadoop native libary (Hadoop 3.4.1 doesn't have aarch64 binary) | ||
| RUN set -eux ; \ | ||
|
|
@@ -136,32 +67,14 @@ RUN set -eux ; \ | |
| rm -f hadoop-${hadoop_version}.tar.gz | ||
|
|
||
| # OpenJDK 21 | ||
| RUN set -eux ; \ | ||
| ARCH="$(arch)"; \ | ||
| case "${ARCH}" in \ | ||
| x86_64) \ | ||
| url='https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz'; \ | ||
| sha256='a2def047a73941e01a73739f92755f86b895811afb1f91243db214cff5bdac3f'; \ | ||
| ;; \ | ||
| aarch64) \ | ||
| url='https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-aarch64_bin.tar.gz'; \ | ||
| sha256='08db1392a48d4eb5ea5315cf8f18b89dbaf36cda663ba882cf03c704c9257ec2'; \ | ||
| ;; \ | ||
| *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;; \ | ||
| esac && \ | ||
| curl -L ${url} -o openjdk.tar.gz && \ | ||
| echo "${sha256} *openjdk.tar.gz" | sha256sum -c - && \ | ||
| tar xzvf openjdk.tar.gz -C /usr/local && \ | ||
| rm -f openjdk.tar.gz | ||
| RUN dnf install -y java-21-openjdk-headless && dnf clean all | ||
|
|
||
| ENV JAVA_HOME=/usr/local/jdk-21.0.2 | ||
| # compatibility with Ozone 1.4.0 and earlier compose env. | ||
| RUN mkdir -p /usr/lib/jvm && ln -s $JAVA_HOME /usr/lib/jvm/jre | ||
| ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk | ||
|
||
|
|
||
| ENV PATH=/opt/hadoop/libexec:$PATH:$JAVA_HOME/bin:/opt/hadoop/bin | ||
|
|
||
| RUN id=1000; \ | ||
| for u in hadoop om dn scm s3g recon testuser testuser2 httpfs; do \ | ||
| for u in hadoop om dn scm s3g recon httpfs; do \ | ||
| groupadd --gid $id $u \ | ||
| && useradd --uid $id $u --gid $id --home /opt/$u \ | ||
| && mkdir /opt/$u \ | ||
|
|
@@ -188,4 +101,4 @@ COPY --chmod=755 entrypoint.sh /usr/local/bin/entrypoint.sh | |
| WORKDIR /opt/hadoop | ||
| USER hadoop | ||
|
|
||
| ENTRYPOINT ["/usr/local/bin/dumb-init", "--", "entrypoint.sh"] | ||
| ENTRYPOINT ["/usr/local/bin/dumb-init", "--", "entrypoint.sh"] | ||
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This no longer needs to be a separate step. Please add
java-21-openjdk-headlessat:ozone-docker-runner/Dockerfile
Lines 21 to 22 in d9b35b9