Skip to content

[WIP] add OLMv1 benchmark test steps #65072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ resources:
cpu: 100m
memory: 200Mi
tests:
- as: olmv1-benchmark-test
cron: 0 0,4 * * *
steps:
allow_skip_on_success: true
cluster_profile: gcp-qe
test:
- ref: olmv1-performance
workflow: cucushift-installer-rehearse-gcp-ipi
timeout: 3h0m0s
- as: netpol-24nodes
cron: 0 12 6,13,20,27 * *
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,16 @@ tests:
test:
- ref: openshift-extended-test-longduration
workflow: cucushift-installer-rehearse-aws-ipi
- as: olmv1-benchmark-test
cluster: build05
cron: 0 0,4 * * *
steps:
allow_skip_on_success: true
cluster_profile: gcp-qe
test:
- ref: olmv1-performance
workflow: cucushift-installer-rehearse-gcp-ipi
timeout: 3h0m0s
- as: aws-ipi-f14-stress-olm
cron: 34 22 1,15 * *
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4424,6 +4424,82 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build02
cron: 0 0,4 * * *
decorate: true
decoration_config:
skip_cloning: true
timeout: 3h0m0s
extra_refs:
- base_ref: main
org: openshift-eng
repo: ocp-qe-perfscale-ci
labels:
ci-operator.openshift.io/cloud: gcp
ci-operator.openshift.io/cloud-cluster-profile: gcp-qe
ci-operator.openshift.io/variant: aws-4.19-nightly-x86
ci.openshift.io/generator: prowgen
job-release: "4.19"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-eng-ocp-qe-perfscale-ci-main-aws-4.19-nightly-x86-olmv1-benchmark-test
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --target=olmv1-benchmark-test
- --variant=aws-4.19-nightly-x86
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build09
cron: '@yearly'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39332,6 +39332,90 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build05
cron: 0 0,4 * * *
decorate: true
decoration_config:
skip_cloning: true
timeout: 3h0m0s
extra_refs:
- base_ref: release-4.19
org: openshift
repo: openshift-tests-private
labels:
ci-operator.openshift.io/cloud: gcp
ci-operator.openshift.io/cloud-cluster-profile: gcp-qe
ci-operator.openshift.io/cluster: build05
ci-operator.openshift.io/variant: amd64-nightly
ci.openshift.io/generator: prowgen
job-release: "4.19"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-openshift-tests-private-release-4.19-amd64-nightly-olmv1-benchmark-test
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --oauth-token-path=/usr/local/github-credentials/oauth
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --target=olmv1-benchmark-test
- --variant=amd64-nightly
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /usr/local/github-credentials
name: github-credentials-openshift-ci-robot-private-git-cloner
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: github-credentials-openshift-ci-robot-private-git-cloner
secret:
secretName: github-credentials-openshift-ci-robot-private-git-cloner
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: vsphere02
cron: 32 17 5,19 * *
Expand Down
11 changes: 11 additions & 0 deletions ci-operator/step-registry/olmv1/performance/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
approvers:
- Xia-Zhao-rh
- kuiwang02
- bandrade
- jianzhangbjz
- anpingli
reviewers:
- Xia-Zhao-rh
- kuiwang02
- bandrade
- jianzhangbjz
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
#!/bin/bash
set -o errexit
set -o nounset
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is leading the script to crash due to unbound variables, fixed in cloud-bulldozer/e2e-benchmarking#772

set -o pipefail
set -x
# cat /etc/os-release
# oc config view
# oc projects
oc version
oc get co
oc get nodes
# python --version
pushd /tmp
# python -m virtualenv ./venv_qe
# source ./venv_qe/bin/activate

# connected to ES server
ES_SECRETS_PATH=${ES_SECRETS_PATH:-/secret}
ES_HOST=${ES_HOST:-"search-ocp-qe-perf-scale-test-elk-hcm7wtsqpxy7xogbu72bor4uve.us-east-1.es.amazonaws.com"}
ES_PASSWORD=$(cat "${ES_SECRETS_PATH}/password")
ES_USERNAME=$(cat "${ES_SECRETS_PATH}/username")
if [ -e "${ES_SECRETS_PATH}/host" ]; then
ES_HOST=$(cat "${ES_SECRETS_PATH}/host")
fi

LOG_LEVEL=${LOG_LEVEL:-debug}
KUBE_DIR=${KUBE_DIR:-/tmp}
KUBE_BURNER_VERSION=${KUBE_BURNER_VERSION:-1.6.8}
PERFORMANCE_PROFILE=${PERFORMANCE_PROFILE:-default}
CHURN=${CHURN:-true}
PPROF=${PPROF:-true}
ARCHIVE=${ARCHIVE:-true}
WORKLOAD=${WORKLOAD:-olm}
QPS=${QPS:-20}
BURST=${BURST:-20}
GC=${GC:-true}
EXTRA_FLAGS=${EXTRA_FLAGS:-}
UUID=${UUID:-$(uuidgen)}
ITERATIONS=${ITERATIONS:-30}
AIRFLOW_CTX_DAG_ID=${AIRFLOW_CTX_DAG_ID:-}
PROW_JOB_ID=${PROW_JOB_ID:-}
BUILD_ID=${BUILD_ID:-}
ADDITIONAL_PARAMS=${ADDITIONAL_PARAMS:-}
ES_SERVER=${ES_SERVER:-"https://$ES_USERNAME:$ES_PASSWORD@$ES_HOST"}
METRICS_ENDPOINT=${METRICS_ENDPOINT:-metrics-endpoint.yml}

cp /go/src/github.com/openshift/openshift-tests-private/test/extended/operators/benchmark/metrics-endpoint.yml ${KUBE_DIR}

KUBE_BURNER_URL="https://github.com/kube-burner/kube-burner-ocp/releases/download/v${KUBE_BURNER_VERSION}/kube-burner-ocp-V${KUBE_BURNER_VERSION}-linux-x86_64.tar.gz"
curl --fail --retry 8 --retry-all-errors -sS -L "${KUBE_BURNER_URL}" | tar -xzC "${KUBE_DIR}/" kube-burner-ocp

# git clone https://github.com/kube-burner/kube-burner-ocp.git --branch main --depth 1
# pushd kube-burner-ocp
# make build
# ./bin/amd64/kube-burner-ocp olm -h

# REPO_URL="https://github.com/cloud-bulldozer/e2e-benchmarking";
# LATEST_TAG=$(curl -s "https://api.github.com/repos/cloud-bulldozer/e2e-benchmarking/releases/latest" | jq -r '.tag_name');
# TAG_OPTION="--branch $(if [ "$E2E_VERSION" == "default" ]; then echo "$LATEST_TAG"; else echo "$E2E_VERSION"; fi)";
# git clone $REPO_URL $TAG_OPTION --depth 1
# pushd e2e-benchmarking/workloads/kube-burner-ocp-wrapper
# export WORKLOAD=olm

# echo "Indexing Management cluster stats"
# METADATA=$(cat << EOF
# {
# "uuid": "${UUID}",
# "workload": "${WORKLOAD}",
# "mgmtClusterName": "${MC_NAME}",
# "hostedClusterName": "${HC_NAME}",
# "timestamp": "$(date +%s%3N)"
# }
# EOF
# )

if [[ "${ENABLE_LOCAL_INDEX}" == "true" ]]; then
EXTRA_FLAGS+=" --local-indexing"
fi
EXTRA_FLAGS+=" --gc-metrics=true --profile-type=${PROFILE_TYPE}"

cmd="${KUBE_DIR}/kube-burner-ocp ${WORKLOAD} --log-level=${LOG_LEVEL} --qps=${QPS} --burst=${BURST} --gc=${GC} --uuid ${UUID} --iterations=${ITERATIONS} --metrics-endpoint=${METRICS_ENDPOINT}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The run.sh script in e2e-benchmarking already takes care of download the right version of kube-burner

cmd+=" ${EXTRA_FLAGS}"

# # If ES_SERVER is specified
if [[ -n ${ES_SERVER} ]]; then
# curl -k -sS -X POST -H "Content-type: application/json" ${ES_SERVER}/ripsaw-kube-burner/_doc -d "${METADATA}" -o /dev/null
cmd+=" --es-server=${ES_SERVER} --es-index=ripsaw-kube-burner"
fi
# If PERFORMANCE_PROFILE is specified
if [[ -n ${PERFORMANCE_PROFILE} && ${WORKLOAD} =~ "rds-core" ]]; then
cmd+=" --perf-profile=${PERFORMANCE_PROFILE}"
fi

# Enable pprof collection
if $PPROF; then
cmd+=" --pprof"
fi

# Capture the exit code of the run, but don't exit the script if it fails.
set +e
echo $cmd
JOB_START=${JOB_START:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")};
$cmd
exit_code=$?
JOB_END=${JOB_END:-$(date -u +"%Y-%m-%dT%H:%M:%SZ")};
if [ $exit_code -eq 0 ]; then
JOB_STATUS="success"
else
JOB_STATUS="failure"
fi

# curl -L -o index.sh https://raw.githubusercontent.com/cloud-bulldozer/e2e-benchmarking/refs/heads/master/utils/index.sh
# head -n 10 index.sh
git clone https://github.com/cloud-bulldozer/e2e-benchmarking --branch master --depth 1
export JOB_START JOB_END JOB_STATUS UUID WORKLOAD ES_SERVER AIRFLOW_CTX_DAG_ID PROW_JOB_ID BUILD_ID ADDITIONAL_PARAMS
export ocp_virt_version="" ocp_virt_tuning_policy=""
source e2e-benchmarking/utils/index.sh || true

rm -f ${SHARED_DIR}/index.json
folder_name=$(ls -t -d /tmp/*/ | head -1)
jq ".iterations = $ITERATIONS" $folder_name/index_data.json >> ${SHARED_DIR}/index_data.json

cp "${SHARED_DIR}"/index_data.json "${SHARED_DIR}"/${WORKLOAD}-index_data.json
cp "${SHARED_DIR}"/${WORKLOAD}-index_data.json "${ARTIFACT_DIR}"/${WORKLOAD}-index_data.json

if [[ "${ENABLE_LOCAL_INDEX}" == "true" ]]; then
metrics_folder_name=$(find . -maxdepth 1 -type d -name 'collected-metric*' | head -n 1)
cp -r "${metrics_folder_name}" "${ARTIFACT_DIR}/"
fi

echo "OLMv1 benchmark test finised"
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"path": "olmv1/performance/olmv1-performance-ref.yaml",
"owners": {
"approvers": [
"Xia-Zhao-rh",
"kuiwang02",
"bandrade",
"jianzhangbjz",
"anpingli"
],
"reviewers": [
"Xia-Zhao-rh",
"kuiwang02",
"bandrade",
"jianzhangbjz"
]
}
}
Loading