diff --git a/docker/Dockerfile-machmeter-jmeter-base b/docker/Dockerfile-machmeter-jmeter-base new file mode 100644 index 0000000..fe217f8 --- /dev/null +++ b/docker/Dockerfile-machmeter-jmeter-base @@ -0,0 +1,57 @@ +# Copyright 2024 Google LLC +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd + +FROM openjdk:14-slim + +ARG JMETER_VERSION=5.5 + +ARG MAVEN_VERSION=3.6.3 + +ARG USER_HOME_DIR="/root" + +ARG SHA=b4880fb7a3d81edd190a029440cdf17f308621af68475a4fe976296e71ff4a4b546dd6d8a58aaafba334d309cc11e638c52808a4b0e818fc0fd544226d952544 + +ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries + + +RUN apt-get clean && \ +apt-get update && \ +apt-get -qy install \ +wget \ +telnet \ +iputils-ping \ +curl \ +unzip + +RUN mkdir /jmeter \ +&& cd /jmeter/ \ +&& wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz \ +&& tar -xzf apache-jmeter-$JMETER_VERSION.tgz \ +&& rm apache-jmeter-$JMETER_VERSION.tgz + +RUN cd /jmeter/apache-jmeter-$JMETER_VERSION/ && wget -q -O /tmp/JMeterPlugins-Standard-1.4.0.zip https://jmeter-plugins.org/downloads/file/JMeterPlugins-Standard-1.4.0.zip && unzip -n /tmp/JMeterPlugins-Standard-1.4.0.zip && rm /tmp/JMeterPlugins-Standard-1.4.0.zip + +RUN wget -q -O /jmeter/apache-jmeter-$JMETER_VERSION/lib/ext/pepper-box-1.0.jar https://github.com/raladev/load/blob/master/JARs/pepper-box-1.0.jar?raw=true + +RUN cd /jmeter/apache-jmeter-$JMETER_VERSION/ && wget -q -O /tmp/bzm-parallel-0.7.zip https://jmeter-plugins.org/files/packages/bzm-parallel-0.7.zip && unzip -n /tmp/bzm-parallel-0.7.zip && rm /tmp/bzm-parallel-0.7.zip + +ENV JMETER_HOME /jmeter/apache-jmeter-$JMETER_VERSION/ + +ENV PATH $JMETER_HOME/bin:$PATH + + +RUN mkdir -p /usr/share/maven /usr/share/maven/ref \ + && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ + && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \ + && rm -f /tmp/apache-maven.tar.gz \ + && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn + +ENV MAVEN_HOME /usr/share/maven +ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" + +RUN mkdir -p /test/ && cd /test && mvn dependency:get -Dartifact=com.google.cloud:google-cloud-spanner-jdbc:RELEASE -Dmaven.repo.local=. +RUN cd /test && find . -name "*.jar" -exec mv '{}' . \; +RUN cp /test/guava-*.jar /jmeter/apache-jmeter-5.5/lib/ diff --git a/docker/Dockerfile-machmeter-jmeter-base-arm b/docker/Dockerfile-machmeter-jmeter-base-arm new file mode 100644 index 0000000..92b2018 --- /dev/null +++ b/docker/Dockerfile-machmeter-jmeter-base-arm @@ -0,0 +1,58 @@ +# Copyright 2024 Google LLC +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd + +# TODO: different version of openjdk to be used on ARM, check if it is possible to use the same image for both x86 and ARM +FROM openjdk:17-slim + +ARG JMETER_VERSION=5.5 + +ARG MAVEN_VERSION=3.6.3 + +ARG USER_HOME_DIR="/root" + +ARG SHA=b4880fb7a3d81edd190a029440cdf17f308621af68475a4fe976296e71ff4a4b546dd6d8a58aaafba334d309cc11e638c52808a4b0e818fc0fd544226d952544 + +ARG BASE_URL=https://apache.osuosl.org/maven/maven-3/${MAVEN_VERSION}/binaries + + +RUN apt-get clean && \ +apt-get update && \ +apt-get -qy install \ +wget \ +telnet \ +iputils-ping \ +curl \ +unzip + +RUN mkdir /jmeter \ +&& cd /jmeter/ \ +&& wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz \ +&& tar -xzf apache-jmeter-$JMETER_VERSION.tgz \ +&& rm apache-jmeter-$JMETER_VERSION.tgz + +RUN cd /jmeter/apache-jmeter-$JMETER_VERSION/ && wget -q -O /tmp/JMeterPlugins-Standard-1.4.0.zip https://jmeter-plugins.org/downloads/file/JMeterPlugins-Standard-1.4.0.zip && unzip -n /tmp/JMeterPlugins-Standard-1.4.0.zip && rm /tmp/JMeterPlugins-Standard-1.4.0.zip + +RUN wget -q -O /jmeter/apache-jmeter-$JMETER_VERSION/lib/ext/pepper-box-1.0.jar https://github.com/raladev/load/blob/master/JARs/pepper-box-1.0.jar?raw=true + +RUN cd /jmeter/apache-jmeter-$JMETER_VERSION/ && wget -q -O /tmp/bzm-parallel-0.7.zip https://jmeter-plugins.org/files/packages/bzm-parallel-0.7.zip && unzip -n /tmp/bzm-parallel-0.7.zip && rm /tmp/bzm-parallel-0.7.zip + +ENV JMETER_HOME /jmeter/apache-jmeter-$JMETER_VERSION/ + +ENV PATH $JMETER_HOME/bin:$PATH + + +RUN mkdir -p /usr/share/maven /usr/share/maven/ref \ + && curl -fsSL -o /tmp/apache-maven.tar.gz ${BASE_URL}/apache-maven-${MAVEN_VERSION}-bin.tar.gz \ + && tar -xzf /tmp/apache-maven.tar.gz -C /usr/share/maven --strip-components=1 \ + && rm -f /tmp/apache-maven.tar.gz \ + && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn + +ENV MAVEN_HOME /usr/share/maven +ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" + +RUN mkdir -p /test/ && cd /test && mvn dependency:get -Dartifact=com.google.cloud:google-cloud-spanner-jdbc:RELEASE -Dmaven.repo.local=. +RUN cd /test && find . -name "*.jar" -exec mv '{}' . \; +RUN cp /test/guava-*.jar /jmeter/apache-jmeter-5.5/lib/ diff --git a/docker/Dockerfile-machmeter-jmeter-master b/docker/Dockerfile-machmeter-jmeter-master new file mode 100644 index 0000000..533f6d2 --- /dev/null +++ b/docker/Dockerfile-machmeter-jmeter-master @@ -0,0 +1,8 @@ +# Copyright 2024 Google LLC +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd + +FROM gcr.io/cloud-spanner-emulator/machmeter-jmeter-base:latest +EXPOSE 60000 diff --git a/docker/Dockerfile-machmeter-jmeter-master-arm b/docker/Dockerfile-machmeter-jmeter-master-arm new file mode 100644 index 0000000..882e38d --- /dev/null +++ b/docker/Dockerfile-machmeter-jmeter-master-arm @@ -0,0 +1,8 @@ +# Copyright 2024 Google LLC +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd + +FROM gcr.io/cloud-spanner-emulator/machmeter-jmeter-base-arm:latest +EXPOSE 60000 diff --git a/docker/Dockerfile-machmeter-jmeter-slave b/docker/Dockerfile-machmeter-jmeter-slave new file mode 100644 index 0000000..ced858f --- /dev/null +++ b/docker/Dockerfile-machmeter-jmeter-slave @@ -0,0 +1,14 @@ +# Copyright 2024 Google LLC +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd + +FROM gcr.io/cloud-spanner-emulator/machmeter-jmeter-base:latest + +EXPOSE 1099 50000 + +ENTRYPOINT $JMETER_HOME/bin/jmeter-server \ +-Dserver.rmi.localport=50000 \ +-Dserver_port=1099 \ +-Jserver.rmi.ssl.disable=true diff --git a/docker/Dockerfile-machmeter-jmeter-slave-arm b/docker/Dockerfile-machmeter-jmeter-slave-arm new file mode 100644 index 0000000..c577176 --- /dev/null +++ b/docker/Dockerfile-machmeter-jmeter-slave-arm @@ -0,0 +1,14 @@ +# Copyright 2024 Google LLC +# +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file or at +# https://developers.google.com/open-source/licenses/bsd + +FROM gcr.io/cloud-spanner-emulator/machmeter-jmeter-base-arm:latest + +EXPOSE 1099 50000 + +ENTRYPOINT $JMETER_HOME/bin/jmeter-server \ +-Dserver.rmi.localport=50000 \ +-Dserver_port=1099 \ +-Jserver.rmi.ssl.disable=true