From ec30d420e984f42cf41baf1cdfb55ee8c59f231b Mon Sep 17 00:00:00 2001 From: jason plumb <75337021+breedx-splk@users.noreply.github.com> Date: Mon, 19 Jul 2021 17:42:26 -0700 Subject: [PATCH] Skeleton for overhead testing subproject. (#3554) * Skeleton for overhead testing subproject. * clone into base image instead of submodule * remove submodules file (even though it was empty) * use multi-stage dockerfile to simplify image * strip ssh and add CMD * use the JRE base for the final stage --- testing-overhead/.dockerignore | 5 ++++ testing-overhead/Dockerfile-petclinic-base | 19 +++++++++++++++ testing-overhead/README.md | 27 ++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 testing-overhead/.dockerignore create mode 100644 testing-overhead/Dockerfile-petclinic-base create mode 100644 testing-overhead/README.md diff --git a/testing-overhead/.dockerignore b/testing-overhead/.dockerignore new file mode 100644 index 000000000000..22ba70f55bb4 --- /dev/null +++ b/testing-overhead/.dockerignore @@ -0,0 +1,5 @@ +*.hprof +*.jfr +*.class +logs/ +.idea/ diff --git a/testing-overhead/Dockerfile-petclinic-base b/testing-overhead/Dockerfile-petclinic-base new file mode 100644 index 000000000000..6b00aaf70d5f --- /dev/null +++ b/testing-overhead/Dockerfile-petclinic-base @@ -0,0 +1,19 @@ +FROM adoptopenjdk:11-jdk as app-build + +# This is the base image that will contain a built version of the spring-petclinic-rest +# application. Installing the dependencies and maven compiling the application is time +# consuming, so we do it in a base image to save time nightly. + +RUN apt update && apt install -y git +WORKDIR /app +RUN git clone http://github.com/spring-petclinic/spring-petclinic-rest.git +WORKDIR /app/spring-petclinic-rest +RUN ./mvnw package -Dmaven.test.skip=true +RUN cp target/spring-petclinic-rest*.jar /app/spring-petclinic-rest.jar + +FROM adoptopenjdk:11-jre + +COPY --from=app-build /app/spring-petclinic-rest.jar /app/spring-petclinic-rest.jar +WORKDIR /app +EXPOSE 9966 +CMD ["java", "-jar", "spring-petclinic-rest.jar"] diff --git a/testing-overhead/README.md b/testing-overhead/README.md new file mode 100644 index 000000000000..69228d2dfe7c --- /dev/null +++ b/testing-overhead/README.md @@ -0,0 +1,27 @@ + +# Overhead tests + +This is a work in progress. + +This directory will contain tools and utilities +that help us to measure the performance overhead introduced by +the agent and to measure how this overhead changes over time. + +## Contents + +tbd + +## Config + +tbd + +## Setup and Usage + +Once we have an established base image published for `spring-petclinic-rest`, this step +can be avoided by most users. For now, there is just a spring petclinic base image. + +``` +$ docker build -f Dockerfile-petclinic-base . +``` + +Remaining usage TBD. \ No newline at end of file