Skip to content

HYRAX-1964: Build images from bes base docker image (bes_core) instead of bes and libdap rpms#107

Open
hannahilea wants to merge 50 commits intomasterfrom
hr/HYRAX-1964-use-dockerized-bes
Open

HYRAX-1964: Build images from bes base docker image (bes_core) instead of bes and libdap rpms#107
hannahilea wants to merge 50 commits intomasterfrom
hr/HYRAX-1964-use-dockerized-bes

Conversation

@hannahilea
Copy link
Contributor

@hannahilea hannahilea commented Feb 23, 2026

Images to update (all for rhel8):

  • hyrax basic
  • besd
  • hyrax_ncwms
  • ngap

Before merge:

  • test el8 on SIT

Note: does NOT update the rhel9 builds to build from this bes_core base image. That work will need to happen in another branch.

@hannahilea hannahilea marked this pull request as ready for review February 26, 2026 15:53
Copy link
Collaborator

@ndp-opendap ndp-opendap left a comment

Choose a reason for hiding this comment

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

Really the only substantive thing is the bit where the bes user_name gets set to root. YMMV - I think the BES will throw a rod at start up if we do that.

# -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:='"$USER"':' \
Copy link
Collaborator

Choose a reason for hiding this comment

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

I notice here that the USER on line 53 is set to root. But the BES should never run as root. The system needs a user for the BES to run s that is not root.

Copy link
Contributor Author

@hannahilea hannahilea Mar 3, 2026

Choose a reason for hiding this comment

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

I think that I already handled this at the bes_core image layer, where we create a new user + user group

https://github.com/OPENDAP/bes/blob/793740a991f057312806cff80afc15b69f568fc9/Dockerfile#L6
https://github.com/OPENDAP/bes/blob/793740a991f057312806cff80afc15b69f568fc9/Dockerfile#L13

and set that as the owner of the BES and bes daemon:

https://github.com/OPENDAP/bes/blob/793740a991f057312806cff80afc15b69f568fc9/Dockerfile#L52

If that isn't sufficient (or isn't what you mean), let's talk about it more!

I should probably have used a different variable name than USER at the bes_core level. Here at the hyrax-docker level I just renamed the USER variable to BES_USER to attempt to make clear what user we're referring to in various places (ENV BES_USER ${USER:-"bes_user"}).

@hannahilea
Copy link
Contributor Author

Okay. I tested this change on SIT with hyrax500, and it seemed to be behaving normally (no errors, same response times as usual).

Are there any special things we should be looking for on SIT, before deeming this good to go and merging? @ndp-opendap, probably a question for you.

Otherwise I think this is ready to merge, pending any further discussion around the user id that ndp commented on above.

@hannahilea
Copy link
Contributor Author

...to prevent temporarily breaking el9 builds on master, we may want to consider reviewing and merging #120 into this branch before merging this branch down.

@hannahilea
Copy link
Contributor Author

OPeNDAP-CICD_hr_dockerization_changes

hannahilea and others added 7 commits March 6, 2026 10:15
…Ms (#120)

* Update el-9 shared and besd build

* update el9 hyrax

* udpate el9 ngap

* clean up

* update helper functions

* update .travis.yml to run CI on branch

* i suppose equals signs are important

* OLFS: Triggering hyrax-docker image production for el8.
Build Version Matrix:
TARGET_OS: el8
libdap4-3.21.1-390 2026-03-04T03:14:01+0000
bes-3.21.1-1096 2026-03-04T23:14:34+0000
olfs-1.18.15-726 2026-03-04T23:29:26+0000
hyrax-1.17.1-726 2026-03-04T23:29:26+0000

* OLFS: Triggering hyrax-docker image production for el9.
Build Version Matrix:
TARGET_OS: el9
TOMCAT_MAJOR_VERSION: 11
libdap4-3.21.1-390 2026-03-04T03:14:01+0000
bes-3.21.1-1096 2026-03-04T23:14:34+0000
olfs-1.18.15-727 2026-03-05T00:05:12+0000
hyrax-1.17.1-727 2026-03-05T00:05:12+0000

* OLFS: Triggering hyrax-docker image production for el8.
Build Version Matrix:
TARGET_OS: el8
libdap4-3.21.1-390 2026-03-04T03:14:01+0000
bes-3.21.1-1096 2026-03-04T23:14:34+0000
olfs-1.18.15-730 2026-03-05T17:35:18+0000
hyrax-1.17.1-730 2026-03-05T17:35:18+0000

* OLFS: Triggering hyrax-docker image production for el8.
Build Version Matrix:
TARGET_OS: el8
libdap4-3.21.1-390 2026-03-04T03:14:01+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

* OLFS: Triggering hyrax-docker image production for el9.
Build Version Matrix:
TARGET_OS: el9
TOMCAT_MAJOR_VERSION: 11
libdap4-3.21.1-390 2026-03-04T03:14:01+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

* install chkconfig for el9

* fix spelling bork

* rearrange

* update chkconfig install

* tweaks from code review

---------

Co-authored-by: Hannah Robertson <1076701+hannahilea@users.noreply.github.com>
Co-authored-by: The-Robot-Travis <npotter@opendap.org>
@hannahilea
Copy link
Contributor Author

Current sizes, calculated via running the below script [1] on my EC2 instance:

  • el-8:
IMAGE                                            ID             DISK USAGE   CONTENT SIZE
opendap/besd:3.21.1-1106-el8                     f8f59d31fe0b       2.08GB          640MB
opendap/besd:3.21.1-1106-el8-test-deploy         d9fe4bd6fdf7          3GB          680MB
opendap/hyrax:1.17.1-733-el8                     6771d27ee72f       2.77GB          784MB
opendap/hyrax:1.17.1-733-el8-test-deploy         23f0ea0dea3b       4.11GB         1.03GB
opendap/hyrax:ngap-1.17.1-733-el8                86bbfa0f328a       3.34GB          973MB
opendap/hyrax:ngap-1.17.1-733-el8-test-deploy    568b3e6a8357        4.4GB          1.1GB
opendap/hyrax_ncwms:1.17.1-733-el8               b8f9d36afcd9       2.87GB          828MB
opendap/hyrax_ncwms:1.17.1-733-el8-test-deploy   e3bf7330b51a       4.21GB         1.07GB
  • el-9
IMAGE                                            ID             DISK USAGE   CONTENT SIZE
opendap/besd:3.21.1-1106-el9                     dc8483052bfe        946MB          283MB
opendap/besd:3.21.1-1106-el9-test-deploy         bd6d66033214       2.37GB          529MB
opendap/hyrax:1.17.1-734-el9                     a0133a832494       2.51GB          734MB
opendap/hyrax:1.17.1-734-el9-test-deploy         87270ba2d549       3.85GB          961MB
opendap/hyrax:ngap-1.17.1-734-el9                58b957a0be19       3.35GB          952MB
opendap/hyrax:ngap-1.17.1-734-el9-test-deploy    1393689b13ad        4.8GB         1.23GB
opendap/hyrax_ncwms:1.17.1-734-el9               0121f9a1f1e0       2.51GB          734MB
opendap/hyrax_ncwms:1.17.1-734-el9-test-deploy   891d58666771       3.85GB          961MB

[1] I first cleaned out all images on my machine (docker system prune -a). I ended up only doing two of the pull_images_for_tag at a time, with a clean in between, because my machine ran out of space when pulling them all down together.

#!/bin/sh
set -e

function pull_images_for_tag(){
    local prefix=$1
    local tag=$2
    local besd_tag=$3
    echo "$prefix: Pulling images with version tag '$tag'"

    docker pull opendap/hyrax:${tag}
    docker pull opendap/besd:${besd_tag}
    docker pull opendap/hyrax:ngap-${tag}
    docker pull opendap/hyrax_ncwms:${tag}
}

docker image ls

# Build 3133: https://app.travis-ci.com/github/OPENDAP/hyrax-docker/builds/277628480
pull_images_for_tag "Master-el8" "1.17.1-733-el8" "3.21.1-1106-el8"

# Build 3136: https://app.travis-ci.com/github/OPENDAP/hyrax-docker/builds/277629035
pull_images_for_tag "New-el8" "1.17.1-733-el8-test-deploy" "3.21.1-1106-el8-test-deploy"

# Build 3134: https://app.travis-ci.com/github/OPENDAP/hyrax-docker/builds/277628568
pull_images_for_tag "Master-el9" "1.17.1-734-el9" "3.21.1-1106-el9"

# Build 3137: https://app.travis-ci.com/github/OPENDAP/hyrax-docker/builds/277629062
pull_images_for_tag "New-el9" "1.17.1-734-el9-test-deploy" "3.21.1-1106-el9-test-deploy"

docker image ls

@hannahilea
Copy link
Contributor Author

I was having a hard time interpreting the table, so I turned it into a couple charts.

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants