Skip to content

Commit 7ad9162

Browse files
committed
add OLMv1 benchmark test steps
Signed-off-by: Jian Zhang <[email protected]>
1 parent 2a557ab commit 7ad9162

File tree

6 files changed

+287
-0
lines changed

6 files changed

+287
-0
lines changed

ci-operator/config/openshift-eng/ocp-qe-perfscale-ci/openshift-eng-ocp-qe-perfscale-ci-main__aws-4.19-nightly-x86.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ resources:
1515
cpu: 100m
1616
memory: 200Mi
1717
tests:
18+
- as: olmv1-benchmark-test
19+
cron: 0 0,4 * * *
20+
steps:
21+
allow_skip_on_success: true
22+
cluster_profile: gcp-qe
23+
test:
24+
- ref: olmv1-performance
25+
workflow: cucushift-installer-rehearse-gcp-ipi
26+
timeout: 3h0m0s
1827
- as: netpol-24nodes
1928
cron: 0 12 6,13,20,27 * *
2029
steps:

ci-operator/jobs/openshift-eng/ocp-qe-perfscale-ci/openshift-eng-ocp-qe-perfscale-ci-main-periodics.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4080,6 +4080,82 @@ periodics:
40804080
- name: result-aggregator
40814081
secret:
40824082
secretName: result-aggregator
4083+
- agent: kubernetes
4084+
cluster: build02
4085+
cron: 0 0,4 * * *
4086+
decorate: true
4087+
decoration_config:
4088+
skip_cloning: true
4089+
timeout: 3h0m0s
4090+
extra_refs:
4091+
- base_ref: main
4092+
org: openshift-eng
4093+
repo: ocp-qe-perfscale-ci
4094+
labels:
4095+
ci-operator.openshift.io/cloud: gcp
4096+
ci-operator.openshift.io/cloud-cluster-profile: gcp-qe
4097+
ci-operator.openshift.io/variant: aws-4.19-nightly-x86
4098+
ci.openshift.io/generator: prowgen
4099+
job-release: "4.19"
4100+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
4101+
name: periodic-ci-openshift-eng-ocp-qe-perfscale-ci-main-aws-4.19-nightly-x86-olmv1-benchmark-test
4102+
spec:
4103+
containers:
4104+
- args:
4105+
- --gcs-upload-secret=/secrets/gcs/service-account.json
4106+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
4107+
- --lease-server-credentials-file=/etc/boskos/credentials
4108+
- --report-credentials-file=/etc/report/credentials
4109+
- --secret-dir=/secrets/ci-pull-credentials
4110+
- --target=olmv1-benchmark-test
4111+
- --variant=aws-4.19-nightly-x86
4112+
command:
4113+
- ci-operator
4114+
image: ci-operator:latest
4115+
imagePullPolicy: Always
4116+
name: ""
4117+
resources:
4118+
requests:
4119+
cpu: 10m
4120+
volumeMounts:
4121+
- mountPath: /etc/boskos
4122+
name: boskos
4123+
readOnly: true
4124+
- mountPath: /secrets/ci-pull-credentials
4125+
name: ci-pull-credentials
4126+
readOnly: true
4127+
- mountPath: /secrets/gcs
4128+
name: gcs-credentials
4129+
readOnly: true
4130+
- mountPath: /secrets/manifest-tool
4131+
name: manifest-tool-local-pusher
4132+
readOnly: true
4133+
- mountPath: /etc/pull-secret
4134+
name: pull-secret
4135+
readOnly: true
4136+
- mountPath: /etc/report
4137+
name: result-aggregator
4138+
readOnly: true
4139+
serviceAccountName: ci-operator
4140+
volumes:
4141+
- name: boskos
4142+
secret:
4143+
items:
4144+
- key: credentials
4145+
path: credentials
4146+
secretName: boskos-credentials
4147+
- name: ci-pull-credentials
4148+
secret:
4149+
secretName: ci-pull-credentials
4150+
- name: manifest-tool-local-pusher
4151+
secret:
4152+
secretName: manifest-tool-local-pusher
4153+
- name: pull-secret
4154+
secret:
4155+
secretName: registry-pull-credentials
4156+
- name: result-aggregator
4157+
secret:
4158+
secretName: result-aggregator
40834159
- agent: kubernetes
40844160
cluster: build07
40854161
cron: '@yearly'
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
approvers:
2+
- Xia-Zhao-rh
3+
- kuiwang02
4+
- bandrade
5+
- jianzhangbjz
6+
- anpingli
7+
reviewers:
8+
- Xia-Zhao-rh
9+
- kuiwang02
10+
- bandrade
11+
- jianzhangbjz
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
#!/bin/bash
2+
set -o errexit
3+
set -o nounset
4+
set -o pipefail
5+
set -x
6+
# cat /etc/os-release
7+
# oc config view
8+
# oc projects
9+
oc version
10+
oc get co
11+
oc get nodes
12+
python --version
13+
pushd /tmp
14+
python -m virtualenv ./venv_qe
15+
source ./venv_qe/bin/activate
16+
17+
# connected to ES server
18+
ES_SECRETS_PATH=${ES_SECRETS_PATH:-/secret}
19+
ES_HOST=${ES_HOST:-"search-ocp-qe-perf-scale-test-elk-hcm7wtsqpxy7xogbu72bor4uve.us-east-1.es.amazonaws.com"}
20+
ES_PASSWORD=$(cat "${ES_SECRETS_PATH}/password")
21+
ES_USERNAME=$(cat "${ES_SECRETS_PATH}/username")
22+
if [ -e "${ES_SECRETS_PATH}/host" ]; then
23+
ES_HOST=$(cat "${ES_SECRETS_PATH}/host")
24+
fi
25+
26+
# # download kube-burner-ocp
27+
# KUBE_BURNER_VERSION=1.6.8
28+
29+
git clone https://github.com/kube-burner/kube-burner-ocp.git --branch main --depth 1
30+
pushd kube-burner-ocp
31+
make build
32+
./bin/amd64/kube-burner-ocp olm -h
33+
34+
# REPO_URL="https://github.com/cloud-bulldozer/e2e-benchmarking";
35+
# LATEST_TAG=$(curl -s "https://api.github.com/repos/cloud-bulldozer/e2e-benchmarking/releases/latest" | jq -r '.tag_name');
36+
# TAG_OPTION="--branch $(if [ "$E2E_VERSION" == "default" ]; then echo "$LATEST_TAG"; else echo "$E2E_VERSION"; fi)";
37+
# git clone $REPO_URL $TAG_OPTION --depth 1
38+
# pushd e2e-benchmarking/workloads/kube-burner-ocp-wrapper
39+
# export WORKLOAD=olm
40+
41+
export ITERATIONS=30
42+
export ES_SERVER="https://$ES_USERNAME:$ES_PASSWORD@$ES_HOST"
43+
44+
if [[ "${ENABLE_LOCAL_INDEX}" == "true" ]]; then
45+
EXTRA_FLAGS+=" --local-indexing"
46+
fi
47+
EXTRA_FLAGS+=" --gc-metrics=true --profile-type=${PROFILE_TYPE}"
48+
49+
export EXTRA_FLAGS
50+
export ADDITIONAL_PARAMS
51+
52+
export WORKLOAD=olm LOG_LEVEL=debug
53+
54+
cmd="./bin/amd64/kube-burner-ocp ${WORKLOAD} --log-level=${LOG_LEVEL} --qps=${QPS} --burst=${BURST} --gc=${GC} --uuid ${UUID} --iterations=${ITERATIONS}"
55+
56+
# If ES_SERVER is specified
57+
if [[ -n ${ES_SERVER} ]]; then
58+
curl -k -sS -X POST -H "Content-type: application/json" ${ES_SERVER}/ripsaw-kube-burner/_doc -d "${METADATA}" -o /dev/null
59+
cmd+=" --es-server=${ES_SERVER} --es-index=ripsaw-kube-burner"
60+
fi
61+
# If PERFORMANCE_PROFILE is specified
62+
if [[ -n ${PERFORMANCE_PROFILE} && ${WORKLOAD} =~ "rds-core" ]]; then
63+
cmd+=" --perf-profile=${PERFORMANCE_PROFILE}"
64+
fi
65+
66+
# Enable pprof collection
67+
if $PPROF; then
68+
cmd+=" --pprof"
69+
fi
70+
71+
# Capture the exit code of the run, but don't exit the script if it fails.
72+
set +e
73+
74+
echo $cmd
75+
JOB_START=${JOB_START:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")};
76+
$cmd
77+
exit_code=$?
78+
JOB_END=${JOB_END:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")};
79+
if [ $exit_code -eq 0 ]; then
80+
JOB_STATUS="success"
81+
else
82+
JOB_STATUS="failure"
83+
fi
84+
85+
wget http://github.com/cloud-bulldozer/e2e-benchmarking/blob/master/utils/index.sh
86+
export JOB_START="$JOB_START" JOB_END="$JOB_END" JOB_STATUS="$JOB_STATUS" UUID="$UUID" WORKLOAD="$WORKLOAD" ES_SERVER="$ES_SERVER"
87+
source index.sh || true
88+
89+
90+
rm -f ${SHARED_DIR}/index.json
91+
92+
folder_name=$(ls -t -d /tmp/*/ | head -1)
93+
jq ".iterations = $ITERATIONS" $folder_name/index_data.json >> ${SHARED_DIR}/index_data.json
94+
95+
cp "${SHARED_DIR}"/index_data.json "${SHARED_DIR}"/${WORKLOAD}-index_data.json
96+
cp "${SHARED_DIR}"/${WORKLOAD}-index_data.json "${ARTIFACT_DIR}"/${WORKLOAD}-index_data.json
97+
98+
99+
if [[ "${ENABLE_LOCAL_INDEX}" == "true" ]]; then
100+
metrics_folder_name=$(find . -maxdepth 1 -type d -name 'collected-metric*' | head -n 1)
101+
cp -r "${metrics_folder_name}" "${ARTIFACT_DIR}/"
102+
fi
103+
104+
echo "OLMv1 benchmark test finised"
105+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"path": "olmv1/performance/olmv1-performance-ref.yaml",
3+
"owners": {
4+
"approvers": [
5+
"Xia-Zhao-rh",
6+
"kuiwang02",
7+
"bandrade",
8+
"jianzhangbjz",
9+
"anpingli"
10+
],
11+
"reviewers": [
12+
"Xia-Zhao-rh",
13+
"kuiwang02",
14+
"bandrade",
15+
"jianzhangbjz"
16+
]
17+
}
18+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
ref:
2+
as: olmv1-performance
3+
cli: latest
4+
from_image:
5+
name: ocp-qe-perfscale-ci
6+
namespace: ci
7+
tag: latest
8+
resources:
9+
requests:
10+
cpu: 500m
11+
memory: 1Gi
12+
timeout: 30m
13+
grace_period: 15m0s
14+
env:
15+
- name: E2E_VERSION
16+
default: "v2.3.5"
17+
documentation: |-
18+
Override the e2e version
19+
- name: CHURN
20+
default: "false"
21+
documentation: |-
22+
Default is false, which means the workload with delete and recreate a set number of namespaces
23+
# - name: EXTRA_FLAGS
24+
# default: "--churn-duration=20m --timeout=5h"
25+
# documentation: |-
26+
# Default is Churn Duration for 20 minutes
27+
- name: PROFILE_TYPE
28+
default: "both"
29+
documentation: |-
30+
Kube-burner indexing profile type
31+
- name: GC
32+
default: "true"
33+
documentation: |-
34+
Default is true, which means clean up the pod/resource that kube-burner ocp created, you can set it to false to keep the resource
35+
- name: ITERATION_MULTIPLIER_ENV
36+
default: "9"
37+
documentation: |-
38+
The number of iterations per worker nodes to create
39+
- name: ENABLE_LOCAL_INDEX
40+
default: "false"
41+
documentation: |-
42+
Trigger to enable local indexing
43+
- name: ES_SECRETS_PATH
44+
default: ""
45+
documentation: |-
46+
Override elasticsearch secrets path.
47+
- name: ADDITIONAL_PARAMS
48+
default: '{}'
49+
documentation: |-
50+
JSON value to upload additonal metadata to the fingerprint
51+
- name: PPROF
52+
default: "true"
53+
commands: olmv1-performance-commands.sh
54+
credentials:
55+
- namespace: test-credentials
56+
name: ocp-perfscale-prod-es-creds
57+
mount_path: /prod-secret
58+
- namespace: test-credentials # this entry injects the custom credential
59+
name: ocp-qe-perfscale-es
60+
mount_path: /secret
61+
- namespace: test-credentials
62+
name: stackrox-perfscale-elasticsearch
63+
mount_path: /secret_stackrox
64+
- namespace: test-credentials
65+
name: ocp-perfscale-horreum-poc
66+
mount_path: /horreum-secret
67+
documentation: |-
68+
Run olmv1 benchmark test.

0 commit comments

Comments
 (0)