Skip to content

Remove cached libraries for Tomcat from resources/ngap/lib #294

Description

@ndp-opendap

Since the el9 builds in Docker use gradle to get all of the things for the redisson session manager there are no related dependencies (I think) in the olfs/resources/ngap/lib. So, in the OLFS, the el9 branch needs to be examined along with the master branch.

Branch: master (aka el8)

On the master branch of the OLFS in olfs/resources/ngap/lib we currently have:

commons-codec-1.13.jar
commons-io-2.7.jar
elasticache-java-cluster-client-1.1.2.jar
httpclient-4.5.13.jar
junit-4.13.1.jar
kryo-4.0.2.jar
kryo-serializers-0.45.jar
memcached-session-manager-2.3.2.jar
memcached-session-manager-tc9-2.3.2.jar
minlog-1.3.0.jar
msm-kryo-serializer-2.3.2.jar
objenesis-3.2.jar
redisson-3.22.0.jar
redisson-all-3.22.0.jar
redisson-tomcat-9-3.22.0.jar
reflectasm-1.11.9.jar

On master, our build.xml files copies all but a handful of this into the ngap WAR file's WEB-INF/lib directory:

<fileset dir="${ngapResources.dir}/lib">
    <!-- We exclude these because they get placed into
    $CATALINA_HOM/lib when the Docker containers are built.-->
    <exclude name="elasticache-java-cluster-client-1.1.2.jar"/>
    <exclude name="memcached-session-manager-2.3.2.jar"/>
    <exclude name="memcached-session-manager-tc9-2.3.2.jar"/>
    <exclude name="redisson-all-3.22.0.jar"/>
    <exclude name="redisson-tomcat-9-3.22.0.jar"/>
</fileset>

And then in the hyrax-docker's el8-builds/ngap/Dockerfile we copy in just the elasticache and memcached

    && echo "Copying elasticache client" \
    && cp olfs/resources/ngap/lib/elasticache-java-cluster-client-1.1.2.jar ${CATALINA_HOME}/lib \
    && echo "Copying memcached Session Manager" \
    && cp olfs/resources/ngap/lib/memcached-session-manager-2.3.2.jar ${CATALINA_HOME}/lib \
    && echo "Copying memcached Session Manager TC9" \
    && cp olfs/resources/ngap/lib/memcached-session-manager-tc9-2.3.2.jar ${CATALINA_HOME}/lib \

The redisson libraries can clearly be removed from the master branch, and probably others.

Branch: el9

On the el9 branch of the OLFS in olfs/resources/ngap/lib we currently have:

commons-codec-1.13.jar
commons-io-2.7.jar
elasticache-java-cluster-client-1.1.2.jar
fst-2.57.jar
httpclient-4.5.13.jar
junit-4.13.1.jar
kryo-4.0.2.jar
kryo-serializers-0.45.jar
minlog-1.3.0.jar
msm-kryo-serializer-2.3.2.jar
objenesis-3.2.jar
redisson-all-3.50.0.jar
redisson-tomcat-11-3.50.0.jar
reflectasm-1.11.9.jar

On el9, our build.xml files copies all but a handful of this into the ngap WAR file's WEB-INF/lib directory:

<fileset dir="${ngapResources.dir}/lib">

    <!-- We exclude these because they get placed into
    $CATALINA_HOME/lib when the Docker containers are built.-->
    <exclude name="elasticache-java-cluster-client-1.1.2.jar"/>
    <exclude name="memcached-session-manager-2.3.2.jar"/>
    <exclude name="memcached-session-manager-tc9-2.3.2.jar"/>
    <exclude name="redisson-all-3.50.0.jar"/>
    <exclude name="redisson-tomcat-11-3.50.0.jar"/>
    <exclude name="fst-2.57.jar"/>
</fileset>

In hyrax-docker we use gradle to acquire the redisson and other dependencies for the top level CATALINA_HOME/lib directory:

dependencies {
    // This pulls the Redisson Tomcat 11 integration and all its dependencies
    // 'latest.release' ensures you always get the most recent version
    dependencyLibrariesDownload "org.redisson:redisson-tomcat-11:latest.release"

    // Also include redisson-all if you need the full bundle,
    dependencyLibrariesDownload "org.redisson:redisson:latest.release"

    // The Jackson libraries
    dependencyLibrariesDownload "com.fasterxml.jackson.core:jackson-core:2.+"
    dependencyLibrariesDownload "com.fasterxml.jackson.core:jackson-annotations:2.+"
    dependencyLibrariesDownload "com.fasterxml.jackson.core:jackson-databind:2.+"

    // The Amazon ElasticCache Cluster Client
    dependencyLibrariesDownload 'com.amazonaws:elasticache-java-cluster-client:1.+'
}

And then we copy those into the ngap docker image in the associated Dockerfile:

RUN echo "Copying all redisson and elasticache-cluster-client libs" >&2
COPY lib/*  "$CATALINA_HOME/lib/"

The memcached and elasticache libs can be removed from the el9 branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions