Skip to content

Commit 38ee7e8

Browse files
authored
update docker file image (Azure#31455)
* update docker file image * change to python3
1 parent 67384df commit 38ee7e8

File tree

4 files changed

+33
-35
lines changed

4 files changed

+33
-35
lines changed

sdk/eventhub/azure-eventhub/stress/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# internal users should provide MCR registry to build via 'docker build . --build-arg REGISTRY="mcr.microsoft.com/mirror/docker/library/"'
22
# public OSS users should simply leave this argument blank or ignore its presence entirely
3-
ARG REGISTRY="mcr.microsoft.com/mirror/docker/library/"
4-
FROM ${REGISTRY}python:3.8-slim-buster
3+
FROM mcr.microsoft.com/cbl-mariner/base/python:3.9
54
# RUN apt-get -y update && apt-get -y install git
65

76
WORKDIR /app

sdk/eventhub/azure-eventhub/stress/templates/testjob.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
{{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.python-eh-stress") -}}
2-
{{- define "stress.python-eh-stress" -}}
1+
{{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.python3-eh-stress") -}}
2+
{{- define "stress.python3-eh-stress" -}}
33
metadata:
44
labels:
5-
testName: "deploy-python-eh-stress"
5+
testName: "deploy-python3-eh-stress"
66
testInstance: "eventhub-{{ .Release.Name }}-{{ .Release.Revision }}"
77
spec:
88
containers:
9-
- name: python-eh-stress
9+
- name: python3-eh-stress
1010
image: {{ .Stress.imageTag }}
1111
imagePullPolicy: Always
1212
resources:
@@ -15,51 +15,51 @@ spec:
1515
cpu: "1"
1616

1717
{{ if eq .Stress.testTarget "event-async" }}
18-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_async --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_async.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
18+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_async --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_async.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
1919
{{- end -}}
2020

2121
{{ if eq .Stress.testTarget "event-sync" }}
22-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_sync --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_sync.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
22+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_sync --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_sync.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
2323
{{- end -}}
2424

2525
{{ if eq .Stress.testTarget "batch-async" }}
26-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_list_async --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_async.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable ']
26+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_list_async --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_async.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable ']
2727
{{- end -}}
2828

2929
{{ if eq .Stress.testTarget "batch-sync" }}
30-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_list_sync --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_sync.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable ']
30+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_list_sync --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_sync.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable ']
3131
{{- end -}}
3232

3333
{{ if eq .Stress.testTarget "bplistsync" }}
34-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_list_sync --duration 259200 --buffered_mode --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_sync.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
34+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_list_sync --duration 259200 --buffered_mode --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_sync.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
3535
{{- end -}}
3636

3737
{{ if eq .Stress.testTarget "bpasync" }}
38-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_async --duration 259200 --buffered_mode --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_async.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
38+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_async --duration 259200 --buffered_mode --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_async.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
3939
{{- end -}}
4040

4141
{{ if eq .Stress.testTarget "bplistasync" }}
42-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_list_async --duration 259200 --buffered_mode --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_async.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable ']
42+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_list_async --duration 259200 --buffered_mode --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_async.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable ']
4343
{{- end -}}
4444

4545
{{ if eq .Stress.testTarget "bpsync" }}
46-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_sync --duration 259200 --buffered_mode --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_sync.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
46+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_sync --duration 259200 --buffered_mode --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_sync.py --duration 259200 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
4747
{{- end -}}
4848

4949
{{ if eq .Stress.testTarget "syncwebsockets" }}
50-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_sync --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_sync.py --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
50+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_sync --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_sync.py --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
5151
{{- end -}}
5252

5353
{{ if eq .Stress.testTarget "asyncwebsockets" }}
54-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_async --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_async.py --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
54+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_async --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_async.py --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
5555
{{- end -}}
5656

5757
{{ if eq .Stress.testTarget "sync-batch-web" }}
58-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_list_sync --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_sync.py --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
58+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_list_sync --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_sync.py --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
5959
{{- end -}}
6060

6161
{{ if eq .Stress.testTarget "async-batch-web" }}
62-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python azure_eventhub_producer_stress.py -m stress_send_list_async --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python azure_eventhub_consumer_stress_async.py --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
62+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 azure_eventhub_producer_stress.py -m stress_send_list_async --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable & python3 azure_eventhub_consumer_stress_async.py --duration 259200 --transport_type 1 --log_filename $DEBUG_SHARE/output --pyamqp_logging_enable']
6363
{{- end -}}
6464

6565
{{- include "stress-test-addons.container-env" . | nindent 6 }}

sdk/servicebus/azure-servicebus/stress/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# internal users should provide MCR registry to build via 'docker build . --build-arg REGISTRY="mcr.microsoft.com/mirror/docker/library/"'
22
# public OSS users should simply leave this argument blank or ignore its presence entirely
3-
ARG REGISTRY="mcr.microsoft.com/mirror/docker/library/"
4-
FROM ${REGISTRY}python:3.8-slim-buster
3+
FROM mcr.microsoft.com/cbl-mariner/base/python:3.9
54
# Install if running off git branch
65
# RUN apt-get -y update && apt-get -y install git
76

sdk/servicebus/azure-servicebus/stress/templates/testjob.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
{{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.python-sb-stress") -}}
2-
{{- define "stress.python-sb-stress" -}}
1+
{{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.python3-sb-stress") -}}
2+
{{- define "stress.python3-sb-stress" -}}
33
metadata:
44
labels:
55
testName: "py-sb-stress"
66
testInstance: "sb-{{ .Release.Name }}-{{ .Release.Revision }}"
77
chaos: "{{ default false .Stress.chaos }}"
88
spec:
99
containers:
10-
- name: python-sb-stress
10+
- name: python3-sb-stress
1111
image: {{ .Stress.imageTag }}
1212
imagePullPolicy: Always
1313
resources:
@@ -16,51 +16,51 @@ spec:
1616
cpu: "1"
1717

1818
{{ if eq .Stress.testTarget "aqueuew" }}
19-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues.py --method send_receive --duration 300000 --logging-enable --transport']
19+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues.py --method send_receive --duration 300000 --logging-enable --transport']
2020
{{- end -}}
2121

2222
{{ if eq .Stress.testTarget "queuew" }}
23-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues.py --method send_receive --duration 300000 --logging-enable --transport']
23+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues.py --method send_receive --duration 300000 --logging-enable --transport']
2424
{{- end -}}
2525

2626
{{ if eq .Stress.testTarget "aqueuepullw" }}
27-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues_async.py --method send_pull_receive --duration 300000 --logging-enable --transport']
27+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues_async.py --method send_pull_receive --duration 300000 --logging-enable --transport']
2828
{{- end -}}
2929

3030
{{ if eq .Stress.testTarget "queuepullw" }}
31-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues.py --method send_pull_receive --duration 300000 --logging-enable --transport']
31+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues.py --method send_pull_receive --duration 300000 --logging-enable --transport']
3232
{{- end -}}
3333

3434
{{ if eq .Stress.testTarget "abatchw" }}
35-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues_async.py --method send_receive_batch --duration 300000 --logging-enable --transport']
35+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues_async.py --method send_receive_batch --duration 300000 --logging-enable --transport']
3636
{{- end -}}
3737

3838
{{ if eq .Stress.testTarget "batchw" }}
39-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues.py --method send_receive_batch --duration 300000 --logging-enable --transport']
39+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues.py --method send_receive_batch --duration 300000 --logging-enable --transport']
4040
{{- end -}}
4141

4242
{{ if eq .Stress.testTarget "aqueue" }}
43-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues_async.py --method send_receive --duration 300000 --logging-enable']
43+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues_async.py --method send_receive --duration 300000 --logging-enable']
4444
{{- end -}}
4545

4646
{{ if eq .Stress.testTarget "queue" }}
47-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues.py --method send_receive --duration 300000 --logging-enable']
47+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues.py --method send_receive --duration 300000 --logging-enable']
4848
{{- end -}}
4949

5050
{{ if eq .Stress.testTarget "aqueuepull" }}
51-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues_async.py --method send_pull_receive --duration 300000 --logging-enable']
51+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues_async.py --method send_pull_receive --duration 300000 --logging-enable']
5252
{{- end -}}
5353

5454
{{ if eq .Stress.testTarget "queuepull" }}
55-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues.py --method send_pull_receive --duration 300000 --logging-enable']
55+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues.py --method send_pull_receive --duration 300000 --logging-enable']
5656
{{- end -}}
5757

5858
{{ if eq .Stress.testTarget "abatch" }}
59-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues_async.py --method send_receive_batch --duration 300000 --logging-enable']
59+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues_async.py --method send_receive_batch --duration 300000 --logging-enable']
6060
{{- end -}}
6161

6262
{{ if eq .Stress.testTarget "batch" }}
63-
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python test_stress_queues.py --method send_receive_batch --duration 300000 --logging-enable ']
63+
command: ['bash', '-c', 'mkdir -p $DEBUG_SHARE && cat > $DEBUG_SHARE/output && python3 test_stress_queues.py --method send_receive_batch --duration 300000 --logging-enable ']
6464
{{- end -}}
6565

6666
{{ if eq .Stress.testTarget "amemray" }}

0 commit comments

Comments
 (0)