Skip to content

TODO list for hyrax:ngap on el9 #161

@ndp-opendap

Description

@ndp-opendap

TODO list for hyrax:ngap on el9

Overview

After a successful SIT deployment I started this issue by collecting the TODO remarks from our hyrax-docker/el9-builds directory. After discussing them with @jgallagher59701 I decided to reorganize this ticket into three categories:

  • Staying Current (Making sure we are always using the latest dependencies)
  • Docker Image Size Reduction
  • MISC - File Hack for NGAP Deployment (That one stray issue)

I think the job here is to:

  • Review/discuss/triage this collection of issues as identified by section
  • Create a ticket for each of the sections that are deemed worthy of treatment, and link that ticket to this one.
  • Work the resulting tickets.

I have labeled things that I think would shake out as tickets.


Staying Current: Installing the latest dependencies during the build

In our el9 ngap build there are two dependency libraries that we install from our own caches:

  • Apache APR (from RPM)
  • Redisson Session Manager libraries and related dependencies.

These are, in effect, frozen on the version bundle that we cached, and there is not currently an automated way to track and update them. For our Tomcat installation we determine the latest release of the specified major version and we download and install that.

I think we should be doing the same for these dependencies.

Apache APR RPMs (Ticket 165)

This package is a dependency for the Tomcat Native APR, and is currently installed from RPM files we have cached in our S3 bucket. I assert that we need to add code (probably to our hyrax-docker repo) so that each build acquires the "latest" version from Apache and then build and/or install it afresh every time we build a docker container.

Related TODOs from el9-builds/ngap/Dockerfile

  • 127 # @todo Do we need this Apache APR RPM?
  • 128 # @todo Is this duplicating the compile Tomcat Native APR??

Related TODOs from el9-builds/ngap/build-el9

W.r.t. installing the Apache APR RPMs

  • 693 # @todo Why are we getting the Apache APR (Apache Portable Runtime) from the OPeNDAP S3 bucket? Shouldn't we be getting "latest" from Apache? Fix.

Related TODOs from el9-builds/ngap/build-hyrax-ngap.sh

  • 55 # @todo Why are we getting Apache RPMs from OPeNDAP's build bucket? Why not lastest APR from Apache??

Redisson Session Manager Java Libraries (Ticket 166)

These are currently being retrieved by the hyrax-docker build from the OLFS GitHub repository by cloning the OLFS repo and copying the jar files from their location in that repository.
This package is pivotal to our session management going forward. Again, I assert that we should modify the hyrax-docker build code so that we get the "latest" version from Redis (or wherever it is we get this package) to be installed in our hyrax:ngap docker build.

Current files:

  • redisson-all-3.50.0.jar
  • redisson-tomcat-11-3.50.0.jar

Discussion

These Redisson libraries are not used by the OLFS directly and are only installed into the Tomcat deployment at the time we build the docker container. Because they are not used directly by the OLFS we might consider:

  • Removing these libraries from the OLFS project repository
  • Writing a wee build.gradle file that we could run from our .travis.yml job to find and pull the latest Redisson libraries and place them locally so the ngap Dockerfile build can just copy them into the correct place.

Related TODOs from el9-builds/ngap/Dockerfile

  • 426 # @todo Figure out a better (less static) way to get these Redisson and related libraries.
  • 427 # @todo Like maybe prefetch the "latest" Redisson stuff from wherever these were acquired and copy them in.

Managing/minimizing the size of the resulting Docker image.

Our current NGAP build is quite large:
opendap/hyrax:ngap-1.17.1-1211-el9: 3.69 GB (disk usage) (1.29 GB compressed on docker hub)

How does image size affect our situation? (Ticket)

  • What are the size constraints on the opendap/besd used in the Cumulus task?
  • Does the Cumulus deployment of the opendap/besd run in a lambda function? If so what are the size constraints of that deployment?
  • How does the size of the NGAP hyrax image affect the memory resources available to our docker deployments in NGAP?

Installing the Tomcat Native APR (Ticket)

The Tomcat Native APR is needed for SSL and is claimed to improve Tomcat performance.

Currently, in the Dockerfile build we:

  • Aquire the "latest" Tomcat-11 distribution.
  • Unpack Tomcat-11
  • Locate the Tomcat Native APR library bundle within said distribution.
  • Use installed developer tools to compile and install the software.

This requires the docker image to have a developers tool suite for compiling/linking C/C++ source code. If we could do this outside of the docker container and bring the results in using COPY we would not have to have all the developer tools in the image.

Related TODOs from el9-builds/ngap/Dockerfile

  • 48 # @todo Build the Tomcat Native APR outside of this Dockerfile and bring in the compiled result.
  • 209 # @todo Remove this install stage when we stop compiling on in this build. (Installing Developer tools to enable Tomcat Native APR build.)
  • 334 # @todo Building the Tomcat Native-APR library should be done elsewhere and copied in, if possible

How much cURL do we need (test this) (Ticket)

In the past we have always needed a full cURL suite because we were compiling code that needed those things. If curl-minimal is adequate as a runtime resource for use we should it (so. much. smaller.)

Related TODOs from el9-builds/ngap/Dockerfile

  • 166 # @todo Can we live with curl-minimal? If so, drop this install stage.

MISC - File Hack for NGAP Deployment (Ticket)

This final TODO might be worth a look and a fix to harmonize the file names between these disparate parts of the build/deployment.

Related TODOs from el9-builds/ngap/entrypoint.sh

  • 290 # @todo THis seems like a crappy hack, we should just change the source file in BitBucket to be correct

The Hack:

  echo "$BES_SITE_CONF" | sed -e "s+BES.LogName=stdout+BES.LogName=$BES_LOG_FILE+g" > "$BES_SITE_CONF_FILE"

Metadata

Metadata

Assignees

Labels

ready-to-testRead for testing. This may mean creating a test-deploy branch.

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions