Skip to content

Commit 831bf5b

Browse files
authored
Merge pull request #230 from gockle/main
Release v3.3.6 - Remove Taurus blazemeter image and use AmazonLinux base image
2 parents 723d856 + cdaeef3 commit 831bf5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2764
-1659
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88

9+
## [3.3.6] - 2025-04-16
10+
11+
### Security
12+
13+
- Change Dockerfile base image reference from blazemeter/taurus:1.16.38 to amazonlinux:2023-minimal to resolve vulnerabilities.
14+
- Update aws-cdk-lib to 2.189.0 to fix [CVE](https://github.com/aws/aws-cdk/security/advisories/GHSA-qq4x-c6h6-rfxh)
15+
16+
### Changes
17+
18+
- Updating lambda runtimes to use node-20
19+
920
## [3.3.5] - 2025-03-17
1021

1122
### Security

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ To make changes to the solution, download or clone this repository, update the s
5959

6060
### Prerequisites
6161

62-
- Node.js 16.x or later
62+
- Node.js 18.x or later
6363
- S3 bucket that includes the AWS region as a suffix in the name. For example, `my-bucket-us-east-1`. The bucket and CloudFormation stack must be in the same region. The solution's CloudFormation template will expect the source code to be located in a bucket matching that name.
6464

6565
### Running unit tests for customization
@@ -91,7 +91,7 @@ export BUCKET_NAME=$BUCKET_PREFIX-$REGION # full bucket name where the code will
9191
export SOLUTION_NAME=my-solution-name
9292
export VERSION=my-version # version number for the customized code
9393
export PUBLIC_ECR_REGISTRY=public.ecr.aws/aws-solutions # replace with the container registry and image if you want to use a different container image
94-
export PUBLIC_ECR_TAG=v3.2.5 # replace with the container image tag if you want to use a different container image
94+
export PUBLIC_ECR_TAG=v3.3.5 # replace with the container image tag if you want to use a different container image
9595
```
9696

9797
- Build the distributable.

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ If you discover a potential security issue in this project,
88
please notify AWS/Amazon Security via our
99
[vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/)
1010
or directly via email to [AWS Security](mailto:aws-security@amazon.com).
11-
Please do *not* create a public GitHub issue in this project.
11+
Please do *not* create a public GitHub issue in this project.

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.5
1+
3.3.6

architecture.png

885 KB
Loading
Lines changed: 21 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
FROM blazemeter/taurus:1.16.38
2-
# taurus includes python and pip
3-
RUN /usr/bin/python3 -m pip install --upgrade pip
4-
RUN pip install --no-cache-dir awscli
5-
RUN apt-get -y install --no-install-recommends xmlstarlet bc procps jq
1+
FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal
62

7-
# Removing selenium and gatling from our image as they are not supported in DLT
8-
RUN rm -rf /root/.bzt/selenium-taurus
9-
RUN rm -rf /root/.bzt/gatling-taurus
3+
RUN dnf update -y && \
4+
dnf install -y python3.11 python3.11-pip java-21-amazon-corretto bc procps jq findutils unzip && \
5+
dnf clean all
6+
7+
ENV PIP_INSTALL="pip3.11 install --no-cache-dir"
8+
9+
10+
# install bzt
11+
RUN $PIP_INSTALL --upgrade bzt awscli setuptools==70.0.0
1012

11-
RUN apt-get update && apt-get upgrade -y
12-
# Taurus working directory = /bzt-configs
13+
# install bzt tools
14+
RUN bzt -install-tools -o modules.install-checker.exclude=selenium,gatling,tsung,siege,ab,k6,external-results-loader,locust,junit,testng,rspec,mocha,nunit,xunit,wdio
15+
RUN rm -rf /root/.bzt/selenium-taurus
16+
RUN mkdir /bzt-configs /tmp/artifacts
1317
ADD ./load-test.sh /bzt-configs/
1418
ADD ./*.jar /bzt-configs/
1519
ADD ./*.py /bzt-configs/
@@ -18,51 +22,13 @@ RUN chmod 755 /bzt-configs/load-test.sh
1822
RUN chmod 755 /bzt-configs/ecslistener.py
1923
RUN chmod 755 /bzt-configs/ecscontroller.py
2024
RUN chmod 755 /bzt-configs/jar_updater.py
21-
RUN python3 /bzt-configs/jar_updater.py
22-
23-
# Remove K6 as it is not supported in DLT by default
24-
RUN apt remove -y k6
25-
26-
RUN /bin/bash -c "source /etc/profile.d/rbenv.sh && rbenv uninstall --force $(cat /usr/local/rbenv/version)"
27-
RUN rm -rf /usr/local/rbenv
28-
29-
# Replacing urllib3 with more stable Versions to resolve vulnerabilities
30-
RUN pip install urllib3==2.2.2
31-
RUN rm -rf /root/.bzt/python-packages/3.10.12/urllib3*
32-
RUN cp -r /usr/local/lib/python3.10/dist-packages/urllib3* /root/.bzt/python-packages/3.10.12/
33-
34-
# Replacing Werkzeug with more stable version to resolve vulnerabilities
35-
RUN pip install Werkzeug==3.0.6
36-
RUN rm -rf /root/.bzt/python-packages/3.10.12/werkzeug*
37-
RUN cp -r /usr/local/lib/python3.10/dist-packages/werkzeug* /root/.bzt/python-packages/3.10.12/
38-
39-
# Replacing cryptography with more stable version to resolve vulnerabilities
40-
RUN pip install cryptography==43.0.1
41-
RUN rm -rf /root/.bzt/python-packages/3.10.12/cryptography*
42-
RUN cp -r /usr/local/lib/python3.10/dist-packages/cryptography* /root/.bzt/python-packages/3.10.12/
43-
44-
# Replacing setuptools with more stable version to resolve vulnerabilities
45-
RUN pip install setuptools==65.5.1
46-
RUN rm -rf /root/.bzt/python-packages/3.10.12/setuptools*
47-
RUN cp -r /usr/local/lib/python3.10/dist-packages/setuptools* /root/.bzt/python-packages/3.10.12/
48-
49-
# Removing dotnet dependencies as NUnit and Xunit is not supported in DLT
50-
RUN rm -rf /usr/share/dotnet
51-
52-
# Replacing aiohttp with more stable version to resolve CVE-2024-23334
53-
RUN rm -rf /usr/local/lib/python3.10/dist-packages/aiohttp*
54-
RUN pip install --upgrade aiohttp
55-
56-
# Replacing idna and Flask_Cors with more stable version to resolve CVE-2024-3651 and CVE-2024-6221
57-
RUN pip install --upgrade idna Flask_Cors==5.0.0
58-
RUN rm -rf /root/.bzt/python-packages/3.10.12/idna* /root/.bzt/python-packages/3.10.12/Flask_Cors*
59-
RUN cp -r /usr/local/lib/python3.10/dist-packages/idna* /usr/local/lib/python3.10/dist-packages/Flask_Cors* /root/.bzt/python-packages/3.10.12/
25+
RUN python3.11 /bzt-configs/jar_updater.py
6026

61-
# Bumping the version of NPM to remove possible vulnerabilities
62-
RUN npm install -g npm
27+
# Remove jar files from /tmp
28+
RUN rm -rf /tmp/jmeter-plugins-manager-1.7*
6329

64-
# Remove unused poetry.lock file to resolve multiple CVEs
65-
RUN rm -f /root/.bzt/python-packages/3.10.12/poetry.lock
30+
# Add settings file to capture the output logs from bzt cli
31+
RUN mkdir -p /etc/bzt.d && echo '{"settings": {"artifacts-dir": "/tmp/artifacts"}}' > /etc/bzt.d/90-artifacts-dir.json
6632

67-
WORKDIR /bzt-configs/
68-
ENTRYPOINT ["./load-test.sh"]
33+
WORKDIR /bzt-configs
34+
ENTRYPOINT ["./load-test.sh"]

deployment/ecr/distributed-load-testing-on-aws-load-tester/jar_updater.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"commons-net": "commons-net/commons-net/3.9.0/commons-net-3.9.0.jar",
3636
"tika-core": "org/apache/tika/tika-core/1.28.4/tika-core-1.28.4.jar",
3737
"json-path": "com/jayway/jsonpath/json-path/2.9.0/json-path-2.9.0.jar",
38-
"dnsjava": "dnsjava/dnsjava/3.6.1/dnsjava-3.6.1.jar"
38+
"dnsjava": "dnsjava/dnsjava/3.6.1/dnsjava-3.6.1.jar",
39+
"xstream":"com/thoughtworks/xstream/xstream/1.4.21/xstream-1.4.21.jar"
3940
}
4041
JMETER_VERSION = "5.5"
4142
JMETER_PLUGINS_MANAGER_VERSION = "1.10"

deployment/ecr/distributed-load-testing-on-aws-load-tester/load-test.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ fi
9090

9191
#Download python script
9292
if [ -z "$IPNETWORK" ]; then
93-
python3 -u $SCRIPT $TIMEOUT &
93+
python3.11 -u $SCRIPT $TIMEOUT &
9494
pypid=$!
9595
wait $pypid
9696
pypid=0
9797
else
9898
aws s3 cp s3://$S3_BUCKET/Container_IPs/${TEST_ID}_IPHOSTS_${AWS_REGION}.txt ./ --region $MAIN_STACK_REGION
9999
export IPHOSTS=$(cat ${TEST_ID}_IPHOSTS_${AWS_REGION}.txt)
100-
python3 -u $SCRIPT $IPNETWORK $IPHOSTS
100+
python3.11 -u $SCRIPT $IPNETWORK $IPHOSTS
101101
fi
102102

103103
echo "Running test"
@@ -164,17 +164,18 @@ if [ -f /tmp/artifacts/results.xml ]; then
164164
CURRENT_TIME_EPOCH=$(date +%s)
165165
ECS_DURATION=$((CURRENT_TIME_EPOCH - START_TIME_EPOCH))
166166

167-
xmlstarlet ed -P -L -s "/FinalStatus" -t elem -n "TaskId" -v "$TASK_ID" /tmp/artifacts/results.xml
168-
xmlstarlet ed -P -L -s "/FinalStatus" -t elem -n "TaskCPU" -v "$Task_CPU" /tmp/artifacts/results.xml
169-
xmlstarlet ed -P -L -s "/FinalStatus" -t elem -n "TaskMemory" -v "$Task_Memory" /tmp/artifacts/results.xml
170-
xmlstarlet ed -P -L -s "/FinalStatus" -t elem -n "ECSDuration" -v "$ECS_DURATION" /tmp/artifacts/results.xml
167+
168+
sed -i.bak 's/<\/FinalStatus>/<TaskId>'"$TASK_ID"'<\/TaskId><\/FinalStatus>/' /tmp/artifacts/results.xml
169+
sed -i 's/<\/FinalStatus>/<TaskCPU>'"$Task_CPU"'<\/TaskCPU><\/FinalStatus>/' /tmp/artifacts/results.xml
170+
sed -i 's/<\/FinalStatus>/<TaskMemory>'"$Task_Memory"'<\/TaskMemory><\/FinalStatus>/' /tmp/artifacts/results.xml
171+
sed -i 's/<\/FinalStatus>/<ECSDuration>'"$ECS_DURATION"'<\/ECSDuration><\/FinalStatus>/' /tmp/artifacts/results.xml
171172

172173
echo "Validating Test Duration"
173-
TEST_DURATION=`xmlstarlet sel -t -v "/FinalStatus/TestDuration" /tmp/artifacts/results.xml`
174+
TEST_DURATION=$(grep -E '<TestDuration>[0-9]+.[0-9]+</TestDuration>' /tmp/artifacts/results.xml | sed -e 's/<TestDuration>//' | sed -e 's/<\/TestDuration>//')
174175

175176
if (( $(echo "$TEST_DURATION > $CALCULATED_DURATION" | bc -l) )); then
176177
echo "Updating test duration: $CALCULATED_DURATION s"
177-
xmlstarlet ed -L -u /FinalStatus/TestDuration -v $CALCULATED_DURATION /tmp/artifacts/results.xml
178+
sed -i.bak.td 's/<TestDuration>[0-9]*\.[0-9]*<\/TestDuration>/<TestDuration>'"$CALCULATED_DURATION"'<\/TestDuration>/' /tmp/artifacts/results.xml
178179
fi
179180

180181
if [ "$TEST_TYPE" == "simple" ]; then
@@ -191,4 +192,4 @@ if [ -f /tmp/artifacts/results.xml ]; then
191192

192193
else
193194
echo "An error occurred while the test was running."
194-
fi
195+
fi

source/api-services/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/api-services/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "api-services",
3-
"version": "3.3.5",
3+
"version": "3.3.6",
44
"description": "REST API micro services",
55
"repository": {
66
"type": "git",

source/console/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/console/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "distributed-load-testing-on-aws-ui",
3-
"version": "3.3.5",
3+
"version": "3.3.6",
44
"private": true,
55
"license": "Apache-2.0",
66
"author": {

source/custom-resource/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/custom-resource/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "custom-resource",
3-
"version": "3.3.5",
3+
"version": "3.3.6",
44
"description": "cfn custom resources for distributed load testing on AWS workflow",
55
"repository": {
66
"type": "git",

source/infrastructure/lib/back-end/test-task-lambdas.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class TestRunnerLambdasConstruct extends Construct {
120120
handler: "index.handler",
121121
role: lambdaResultsRole,
122122
code: Code.fromBucket(props.sourceCodeBucket, `${props.sourceCodePrefix}/results-parser.zip`),
123-
runtime: Runtime.NODEJS_18_X,
123+
runtime: Runtime.NODEJS_20_X,
124124
timeout: Duration.seconds(120),
125125
environment: {
126126
HISTORY_TABLE: props.historyTable.tableName,
@@ -230,7 +230,7 @@ export class TestRunnerLambdasConstruct extends Construct {
230230
VERSION: props.solutionVersion,
231231
MAIN_STACK_REGION: props.mainStackRegion,
232232
},
233-
runtime: Runtime.NODEJS_18_X,
233+
runtime: Runtime.NODEJS_20_X,
234234
timeout: Duration.seconds(900),
235235
});
236236

@@ -299,7 +299,7 @@ export class TestRunnerLambdasConstruct extends Construct {
299299
handler: "index.handler",
300300
role: taskCancelerRole,
301301
code: Code.fromBucket(props.sourceCodeBucket, `${props.sourceCodePrefix}/task-canceler.zip`),
302-
runtime: Runtime.NODEJS_18_X,
302+
runtime: Runtime.NODEJS_20_X,
303303
timeout: Duration.seconds(300),
304304
environment: {
305305
METRIC_URL: props.metricsUrl,
@@ -380,7 +380,7 @@ export class TestRunnerLambdasConstruct extends Construct {
380380
handler: "index.handler",
381381
role: taskStatusCheckerRole,
382382
code: Code.fromBucket(props.sourceCodeBucket, `${props.sourceCodePrefix}/task-status-checker.zip`),
383-
runtime: Runtime.NODEJS_18_X,
383+
runtime: Runtime.NODEJS_20_X,
384384
timeout: Duration.seconds(180),
385385
environment: {
386386
SCENARIOS_TABLE: props.scenariosTable.tableName,

source/infrastructure/lib/custom-resources/custom-resources-infra.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class CustomResourceInfraConstruct extends Construct {
105105
handler: "index.handler",
106106
role: customResourceRole,
107107
code: Code.fromBucket(sourceBucket, `${props.sourceCodePrefix}/${props.stackType}-custom-resource.zip`),
108-
runtime: Runtime.NODEJS_18_X,
108+
runtime: Runtime.NODEJS_20_X,
109109
timeout: Duration.seconds(120),
110110
environment: {
111111
METRIC_URL: props.metricsUrl,

source/infrastructure/lib/front-end/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export class DLTAPI extends Construct {
194194
const dltApiServicesLambda = new LambdaFunction(this, "DLTAPIServicesLambdaNew", {
195195
description: "API microservices for creating, updating, listing and deleting test scenarios",
196196
code: Code.fromBucket(props.sourceCodeBucket, `${props.sourceCodePrefix}/api-services.zip`),
197-
runtime: Runtime.NODEJS_18_X,
197+
runtime: Runtime.NODEJS_20_X,
198198
handler: "index.handler",
199199
timeout: Duration.seconds(120),
200200
environment: {

source/infrastructure/lib/testing-resources/real-time-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class RealTimeDataConstruct extends Construct {
5959
handler: "index.handler",
6060
role: realTimeDataPublisherRole,
6161
code: Code.fromBucket(props.sourceCodeBucket, `${props.sourceCodePrefix}/real-time-data-publisher.zip`),
62-
runtime: Runtime.NODEJS_18_X,
62+
runtime: Runtime.NODEJS_20_X,
6363
timeout: Duration.seconds(180),
6464
environment: {
6565
MAIN_REGION: props.mainRegion,

0 commit comments

Comments
 (0)