From 01c29a33a9155bae6e21fdc56724cb3ecef6df16 Mon Sep 17 00:00:00 2001 From: gold-kou Date: Tue, 15 Aug 2023 13:49:18 +0900 Subject: [PATCH 1/3] Upgrade gatling --- api/v1alpha1/zz_generated.deepcopy.go | 1 + gatling/Dockerfile | 12 +++--------- pkg/commands/commands.go | 7 +++++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index fd84f47..d80112b 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/gatling/Dockerfile b/gatling/Dockerfile index d6cc9d3..516a91d 100644 --- a/gatling/Dockerfile +++ b/gatling/Dockerfile @@ -1,24 +1,18 @@ -# This is modified based on the original file: -# https://github.com/denvazh/gatling/tree/master/3.2.1 -# # Gatling is a highly capable load testing tool. -# -# Documentation: https://gatling.io/docs/3.2/ -# Cheat sheet: https://gatling.io/docs/3.2/cheat-sheet/ -FROM openjdk:8-jdk-alpine +FROM openjdk:17-jdk-slim # working directory for gatling WORKDIR /opt # gating version -ENV GATLING_VERSION 3.2.1 +ENV GATLING_VERSION 3.9.5 # create directory for gatling install RUN mkdir -p gatling # install gatling -RUN apk add --update wget bash libc6-compat && \ +RUN apt-get update && apt install -y wget bash libc6-dev unzip && \ mkdir -p /tmp/downloads && \ wget -q -O /tmp/downloads/gatling-$GATLING_VERSION.zip \ https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip && \ diff --git a/pkg/commands/commands.go b/pkg/commands/commands.go index e91333b..4fc4dd3 100644 --- a/pkg/commands/commands.go +++ b/pkg/commands/commands.go @@ -66,7 +66,7 @@ fi if [ ! -d ${RESULTS_DIR_PATH} ]; then mkdir -p ${RESULTS_DIR_PATH} fi -gatling.sh -sf ${SIMULATIONS_DIR_PATH} -s %s -rsf ${RESOURCES_DIR_PATH} -rf ${RESULTS_DIR_PATH} %s +gatling.sh -sf ${SIMULATIONS_DIR_PATH} -s %s -rsf ${RESOURCES_DIR_PATH} -rf ${RESULTS_DIR_PATH} %s %s if [ $? -ne 0 ]; then RUN_STATUS_FILE="${RESULTS_DIR_PATH}/FAILED" @@ -79,6 +79,8 @@ touch ${RUN_STATUS_FILE} generateLocalReportOption = "" } + runModeOptionLocal := "-rm local" + return fmt.Sprintf(template, simulationsDirectoryPath, tempSimulationsDirectoryPath, @@ -86,7 +88,8 @@ touch ${RUN_STATUS_FILE} resultsDirectoryPath, startTime, simulationClass, - generateLocalReportOption) + generateLocalReportOption, + runModeOptionLocal) } func GetGatlingTransferResultCommand(resultsDirectoryPath string, provider string, region string, storagePath string) string { From 1bc64dfc92ab78a06dc5b93e57a4ba6fcd8b03a6 Mon Sep 17 00:00:00 2001 From: gold-kou Date: Thu, 28 Sep 2023 18:24:54 +0900 Subject: [PATCH 2/3] Fix Dockerfile --- gatling/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gatling/Dockerfile b/gatling/Dockerfile index 516a91d..54cccd7 100644 --- a/gatling/Dockerfile +++ b/gatling/Dockerfile @@ -1,6 +1,9 @@ +# This is modified based on the original file: +# https://github.com/denvazh/gatling/tree/master/3.2.1 +# # Gatling is a highly capable load testing tool. -FROM openjdk:17-jdk-slim +FROM openjdk:17-jdk-slim-bullseye # working directory for gatling WORKDIR /opt @@ -12,7 +15,7 @@ ENV GATLING_VERSION 3.9.5 RUN mkdir -p gatling # install gatling -RUN apt-get update && apt install -y wget bash libc6-dev unzip && \ +RUN apt-get update && apt-get upgrade -y && apt-get install -y wget libc6-dev unzip && \ mkdir -p /tmp/downloads && \ wget -q -O /tmp/downloads/gatling-$GATLING_VERSION.zip \ https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip && \ From da6bc34fb826bd9ba377cfcf1cc2e44324262fa4 Mon Sep 17 00:00:00 2001 From: gold-kou Date: Tue, 3 Oct 2023 13:31:40 +0900 Subject: [PATCH 3/3] Delete libc6-dev --- gatling/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gatling/Dockerfile b/gatling/Dockerfile index 54cccd7..f57fb50 100644 --- a/gatling/Dockerfile +++ b/gatling/Dockerfile @@ -15,7 +15,7 @@ ENV GATLING_VERSION 3.9.5 RUN mkdir -p gatling # install gatling -RUN apt-get update && apt-get upgrade -y && apt-get install -y wget libc6-dev unzip && \ +RUN apt-get update && apt-get upgrade -y && apt-get install -y wget unzip && \ mkdir -p /tmp/downloads && \ wget -q -O /tmp/downloads/gatling-$GATLING_VERSION.zip \ https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip && \