Skip to content
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
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ branches:
- master
- main
- /^(.*-test-deploy)$/
- hr/HYRAX-1964-use-dockerized-bes
Copy link
Copy Markdown
Contributor Author

@hannahilea hannahilea Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • TODO before merge: remove this addition (+ 2 more lower down)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...am going to wait and remove them in #107, so we can continue to see them pass for this branch!


notifications:
email:
Expand Down Expand Up @@ -68,9 +69,9 @@ install:

stages:
- name: BUILD_AND_TEST
if: branch = master OR branch = main OR branch =~ ^(.*-test-deploy)$
if: branch = master OR branch = main OR branch =~ ^(.*-test-deploy)$ OR branch = "hr/HYRAX-1964-use-dockerized-bes"
- name: BUILD
if: branch = master OR branch = main OR branch =~ ^(.*-test-deploy)$
if: branch = master OR branch = main OR branch =~ ^(.*-test-deploy)$ OR branch = "hr/HYRAX-1964-use-dockerized-bes"
- name: TEST_DEPLOYED_IMAGE
if: ((branch = master or branch = main) and (type != pull_request)) or (branch =~ ^(.*-test-deploy)$)
- name: disabled
Expand Down
6 changes: 3 additions & 3 deletions el8-build-recipe
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TARGET_OS: el8
TOMCAT_MAJOR_VERSION: 9
libdap4-3.21.1-390 2026-03-04T03:14:01+0000
bes-3.21.1-1093 2026-03-04T13:22:30+0000
olfs-1.18.15-718 2026-03-04T13:35:59+0000
hyrax-1.17.1-718 2026-03-04T13:35:59+0000
bes-3.21.1-1101 2026-03-05T17:25:18+0000
olfs-1.18.15-731 2026-03-05T17:37:19+0000
hyrax-1.17.1-731 2026-03-05T17:37:19+0000
8 changes: 4 additions & 4 deletions el8-builds/besd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN if [ -z "$BES_CORE_IMAGE_TAG" ]; then \
fi

# User defined and created in the `bes_core` image
ENV BES_USER ${USER:-"bes_user"}
ENV BES_USER="${USER:-"bes_user"}"

ARG RELEASE_DATE
ENV RELEASE_DATE ${RELEASE_DATE:-"unknown"}
Expand Down Expand Up @@ -81,8 +81,8 @@ RUN cp ${PREFIX}/etc/rc.d/init.d/besd /etc/rc.d/init.d/besd \
&& chkconfig --add besd \
&& ldconfig \
&& chkconfig --list | grep besd \
&& echo "whoami: "`whoami` \
&& echo "besdaemon is here: "`which besdaemon`
&& echo "whoami: $(whoami)" \
&& echo "besdaemon is here: $(which besdaemon)"

# Adapted from bes/spec.all_static.in in RPM creation.
# The four *.pem substitutions may be unnecessary, as those *.pem files may be
Expand All @@ -103,7 +103,7 @@ RUN sed -i.dist \
&& touch "/var/log/bes/bes.log" \
&& sudo chown -R $BES_USER:$BES_USER "/var/log/bes/"

RUN echo "besdaemon is here: "`which besdaemon`
RUN echo "besdaemon is here: $(which besdaemon)"

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
1 change: 1 addition & 0 deletions el8-builds/build-el8
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ function build_hyrax_docker() {
--build-arg LIBDAP_VERSION \
--build-arg BES_VERSION \
--build-arg OLFS_VERSION \
--build-arg BES_CORE_IMAGE_TAG \
--tag "${BUILD_VERSION_TAG}" \
--tag "${SNAPSHOT_IMAGE_TAG}" \
${docker_name}
Expand Down
6 changes: 3 additions & 3 deletions el8-builds/hyrax/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN if test -n "$BES_CORE_IMAGE_TAG"; then \
fi

# User defined and created in the `bes_core` image
ENV BES_USER ${USER:-"bes_user"}
ENV BES_USER="${USER:-"bes_user"}"

ENV ARCH="x86_64"
ENV java_version="java-17-openjdk"
Expand Down Expand Up @@ -186,8 +186,8 @@ RUN cp ${PREFIX}/etc/rc.d/init.d/besd /etc/rc.d/init.d/besd \
&& chkconfig --add besd \
&& ldconfig \
&& chkconfig --list | grep besd \
&& echo "whoami: "`whoami` \
&& echo "besdaemon is here: "`which besdaemon`
&& echo "whoami: $(whoami)" \
&& echo "besdaemon is here: $(which besdaemon)"

# Adapted from bes/spec.all_static.in in RPM creation.
# The four *.pem substitutions may be unnecessary, as those *.pem files may be
Expand Down
6 changes: 3 additions & 3 deletions el8-builds/ngap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN if [ -z "$BES_CORE_IMAGE_TAG" ]; then \
fi

# User defined and created in the `bes_core` image
ENV BES_USER ${USER:-"bes_user"}
ENV BES_USER="${USER:-"bes_user"}"

ENV ARCH="x86_64"
ENV java_version="java-17-openjdk"
Expand Down Expand Up @@ -167,8 +167,8 @@ RUN cp ${PREFIX}/etc/rc.d/init.d/besd /etc/rc.d/init.d/besd \
&& chkconfig --add besd \
&& ldconfig \
&& chkconfig --list | grep besd \
&& echo "whoami: "`whoami` \
&& echo "besdaemon is here: "`which besdaemon`
&& echo "whoami: $(whoami)" \
&& echo "besdaemon is here: $(which besdaemon)"

# Adapted from bes/spec.all_static.in in RPM creation.
# The four *.pem substitutions may be unnecessary, as those *.pem files may be
Expand Down
3 changes: 2 additions & 1 deletion el8-builds/ngap/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ if [[ "$LOG_KEY_PREFIX" != *"-" ]]; then
fi

# Set in docker image.
# BES_USER initially defined upstream in docker image base `bes_core` as $USER
# BES_USER initially defined upstream in docker image base `bes_core` as $USER,
# updated to $BES_USER in ngap/Dockerfile
export PREFIX=${PREFIX:-"/root/install"}
export BES_USER=${BES_USER:-"bes_user"}

Expand Down
6 changes: 3 additions & 3 deletions el9-build-recipe
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TARGET_OS: el9
TOMCAT_MAJOR_VERSION: 11
libdap4-3.21.1-390 2026-03-04T03:14:01+0000
bes-3.21.1-1093 2026-03-04T13:22:30+0000
olfs-1.18.15-719 2026-03-04T13:48:11+0000
hyrax-1.17.1-719 2026-03-04T13:48:11+0000
bes-3.21.1-1101 2026-03-05T17:25:18+0000
olfs-1.18.15-732 2026-03-05T18:13:42+0000
hyrax-1.17.1-732 2026-03-05T18:13:42+0000
116 changes: 66 additions & 50 deletions el9-builds/besd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@
#
# Set one or more individual labels
#
FROM rockylinux:9
ARG BES_CORE_IMAGE_TAG
FROM ${BES_CORE_IMAGE_TAG:-"rockylinux:9"}

ARG BES_CORE_IMAGE_TAG
RUN if [ -z "$BES_CORE_IMAGE_TAG" ]; then \
echo "Error: Non-empty BES_CORE_IMAGE_TAG must be specified. Exiting."; \
exit 1; \
fi

# User defined and created in the `bes_core` image
ENV BES_USER="${USER:-"bes_user"}"

ENV HR="###############################################################################################################"
ENV HR2="-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --"
ENV TARGET_OS="el9"
Expand All @@ -25,7 +36,7 @@ RUN echo "# BEGIN - besd docker build"
# rocky9 comes with python 3.9 by default, and replacing it seems problematic at best.
RUN echo "# Python Version: $(python3 --version)"

ENV dnf_runtime_packages="which unzip procps bc"
ENV dnf_runtime_packages="which unzip procps bc chkconfig"
RUN echo "# dnf_runtime_packages: $dnf_runtime_packages"

ENV dnf_developer_tools_packages="emacs vim awscli jq gdb valgrind"
Expand All @@ -35,24 +46,26 @@ ARG RELEASE_DATE
ENV RELEASE_DATE="${RELEASE_DATE:-$(date +%s)}"
RUN echo "RELEASE_DATE: $RELEASE_DATE"

# Fail if requested LIBDAP_VERSION or BES_VERSION do not match installations in base image
ARG LIBDAP_VERSION
ENV LIBDAP_VERSION=${LIBDAP_VERSION:-"snapshot-$TARGET_OS"}
RUN echo "LIBDAP_VERSION: $LIBDAP_VERSION"

ARG LIBDAP_RPM
ENV LIBDAP_RPM=${LIBDAP_RPM:-"libdap-$LIBDAP_VERSION.$TARGET_OS.x86_64.rpm"}
RUN echo "LIBDAP_RPM: $LIBDAP_RPM"
COPY "$LIBDAP_RPM" "/$LIBDAP_RPM"
RUN LIBDAP_VERSION_FOUND=$(cat libdap_VERSION); \
if [ "${LIBDAP_VERSION_FOUND}" == "${LIBDAP_VERSION:-missing}" ]; then \
echo "LIBDAP_VERSION: ${LIBDAP_VERSION}"; \
else \
echo "Error: Expected LIBDAP_VERSION `${LIBDAP_VERSION}`, found version `${LIBDAP_VERSION_FOUND}`. Exiting."; \
exit 1; \
fi

ARG BES_VERSION
ENV BES_VERSION=${BES_VERSION:-"snapshot-$TARGET_OS"}
RUN echo "BES_VERSION: $BES_VERSION"

ARG BES_RPM
ENV BES_RPM=${BES_RPM:-"bes-$BES_VERSION.static.$TARGET_OS.x86_64.rpm"}
RUN echo "BES_RPM: $BES_RPM"
COPY "$BES_RPM" "/$BES_RPM"

RUN BES_VERSION_FOUND=$(cat bes_VERSION); \
if [ "${BES_VERSION_FOUND}" == "${BES_VERSION:-missing}" ]; then \
echo "BES_VERSION: ${BES_VERSION}"; \
else \
echo "Error: Expected BES_VERSION \"${BES_VERSION}\", found version \"${BES_VERSION_FOUND}\". Exiting."; \
exit 1; \
fi

LABEL vendor="OPeNDAP Incorporated"
LABEL org.opendap.besdaemon.version="$BES_VERSION"
Expand All @@ -61,6 +74,7 @@ LABEL org.opendap.hyrax.version.is-production="false"
LABEL org.opencontainers.image.authors="support@opendap.org"

USER root
WORKDIR /

######################################################################
# Update the OS and create a handy executable shell scipt to simplify
Expand All @@ -71,38 +85,45 @@ RUN set -e \
&& dnf install -y $dnf_runtime_packages \
&& echo "#!/bin/bash" > /install-dev-tools \
&& echo "dnf install -y $dnf_developer_tools_packages" > /install-dev-tools \
&& chmod 755 /install-dev-tools
&& chmod 755 /install-dev-tools \
&& dnf clean all

################################################################
# Install the libdap rpm
# - - - - - - - - - - - - - - - - - - - - -
RUN set -e \
&& echo "$HR" >&2 \
&& echo "# Installing the libdap rpm: $LIBDAP_RPM" >&2 \
&& ls -l ./libdap* \
&& dnf -y install ./libdap-*.rpm \
&& echo "# The 'dnf install' command exited with status: $?" >&2 \
&& rm -f "./$LIBDAP_RPM" \
&& dnf clean all \
&& echo "# libdap4 is installed." >&2 \
&& echo "$HR" >&2

################################################################
# Install the the BES
# besd, besdaemon, beslistener, besctl, besstandalone, bescmdline
# - - - - - - - - - - - - - - - - - - - - -
RUN set -e \
&& echo "$HR" >&2 \
&& echo "# Installing the BES rpm: $BES_RPM" >&2 \
&& ls -l ./bes* \
&& dnf -y install ./bes-*.rpm \
&& echo "# The 'dnf install' command exited with status: $?" >&2 \
&& rm -f "./$BES_RPM" \
&& dnf clean all \
&& echo "# besdaemon is here: $(which besdaemon)" >&2 \
&& echo "# besdaemon -v: '$(besdaemon -v)'" >&2 \
&& echo "$HR" >&2
######################################################################

# Set up BES
#
# BES is already installed on the base image, but
# we need to do some additional configuration (to match what was
# previously handled by bes RPM installation)

# Add besd service to start at boot
RUN cp ${PREFIX}/etc/rc.d/init.d/besd /etc/rc.d/init.d/besd \
&& chkconfig --add besd \
&& ldconfig \
&& chkconfig --list | grep besd \
&& echo "whoami: $(whoami)" \
&& echo "besdaemon is here: $(which besdaemon)"

# Adapted from bes/spec.all_static.in in RPM creation.
# The four *.pem substitutions may be unnecessary, as those *.pem files may be
# vestigial substitutions for a build process past.
RUN sed -i.dist \
-e 's:=.*/bes.log:=/var/log/bes/bes.log:' \
-e 's:=.*/lib/bes:='"$PREFIX"'/lib/bes:' \
-e 's:=.*/share/bes:='"$PREFIX"'/share/bes:' \
-e 's:=.*/share/hyrax:='"$PREFIX"'/share/hyrax:' \
-e 's:=/full/path/to/serverside/certificate/file.pem:=/etc/pki/bes/cacerts/file.pem:' \
-e 's:=/full/path/to/serverside/key/file.pem:=/etc/pki/bes/public/file.pem:' \
-e 's:=/full/path/to/clientside/certificate/file.pem:=/etc/pki/bes/cacerts/file.pem:' \
-e 's:=/full/path/to/clientside/key/file.pem:=/etc/pki/bes/public/file.pem:' \
-e 's:=user_name:='"$BES_USER"':' \
-e 's:=group_name:='"$BES_USER"':' \
$PREFIX/etc/bes/bes.conf \
&& mkdir -p "/var/log/bes/" \
&& touch "/var/log/bes/bes.log" \
&& sudo chown -R $BES_USER:$BES_USER "/var/log/bes/"

RUN echo "besdaemon is here: $(which besdaemon)"

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand All @@ -111,10 +132,5 @@ ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 10022
EXPOSE 11002

# can't use USER with entrypoint that needs root
# use gosu or, as done, enable bes user write so the entrypoint doe snot need root
RUN chown -R bes /etc/bes
USER root

CMD ["-"]

10 changes: 5 additions & 5 deletions el9-builds/besd/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ fi
#
if [ "$SERVER_HELP_EMAIL" != "not_set" ]; then
loggy "Setting Admin Contact To: $SERVER_HELP_EMAIL"
sed -i "s/admin.email.address@your.domain.name/$SERVER_HELP_EMAIL/" /etc/bes/bes.conf
sed -i "s/admin.email.address@your.domain.name/$SERVER_HELP_EMAIL/" $PREFIX/etc/bes/bes.conf
fi
if [ "$FOLLOW_SYMLINKS" != "not_set" ]; then
loggy "Setting BES FollowSymLinks to YES."
sed -i "s/^BES.Catalog.catalog.FollowSymLinks=No/BES.Catalog.catalog.FollowSymLinks=Yes/" /etc/bes/bes.conf
sed -i "s/^BES.Catalog.catalog.FollowSymLinks=No/BES.Catalog.catalog.FollowSymLinks=Yes/" $PREFIX/etc/bes/bes.conf
fi

#-------------------------------------------------------------------------------
Expand All @@ -128,16 +128,16 @@ bes_gid="$(id -g bes)"
echo "bes_gid: $bes_gid"

# Start the BES daemon process
# /usr/bin/besdaemon -i /usr -c /etc/bes/bes.conf -r /var/run/bes.pid
# /usr/bin/besdaemon -i /usr -c $PREFIX/etc/bes/bes.conf -r /var/run/bes.pid
loggy "Calling 'besctl start'"
/usr/bin/besctl start
$PREFIX/usr/bin/besctl start
status=$?
if [ $status -ne 0 ]; then
loggy "ERROR: Failed to start BES: $status"
exit $status
fi

besd_pid="$(ps aux | grep /usr/bin/besdaemon | grep -v grep | awk '{print $2;}' - )"
besd_pid="$(ps aux | grep $PREFIX/usr/bin/besdaemon | grep -v grep | awk '{print $2;}' - )"
loggy "The besdaemon is UP! pid: $besd_pid"
start_time=
start_time="$(date "+%s")"
Expand Down
Loading