Skip to content

Pull-through cache reports redice cache MISSes #274

@dkliban

Description

@dkliban

The following instructions are to be executed in the oci-env container.

  1. Install Java 11

dnf install -y java-11-openjdk-devel

  1. Install maven from source

cd /opt sudo wget https://downloads.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz

sudo tar -xvzf apache-maven-3.9.6-bin.tar.gz sudo mv apache-maven-3.9.6 /opt/maven

vi /etc/profile.d/maven.sh

export M2_HOME=/opt/maven
export MAVEN_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}

chmod +x /etc/profile.d/maven.sh

source /etc/profile.d/maven.sh

  1. Confirm Maven is installed and using Java 11

mvn -v

Apache Maven 3.9.6
Java version: 11.0.xx, vendor: Red Hat
Java home: /usr/lib/jvm/java-11-openjdk-…
  1. Setup a pull-through cache repository in Pulp

Follow all the instructions here: https://pulpproject.org/pulp_maven/docs/user/guides/create-cache/

  1. Modify /etc/init/pulpcore-content to include cache HIT/MISS in the access log

--access-logformat '%a %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" cache:"%{X-PULP-CACHE}o" artifact_size:"%{X-PULP-ARTIFACT-SIZE}o" rh_org_id:"%{X-RH-ORG-ID}o"' \

  1. Clone https://github.com/Commonjava/galley

  2. Build galley from the root of the project

mvn install -DskipTests

  1. Clean up the maven cache

rm -rf ~/.m2/repository/

  1. Build galley again

mvn install -DskipTests

  1. Notice in the access log that some .jar files have a cache MISS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions