-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[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
jianzhangbjz
wants to merge
2
commits into
openshift:master
Choose a base branch
from
jianzhangbjz:benchmark
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+407
−0
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
131 changes: 131 additions & 0 deletions
131
ci-operator/step-registry/olmv1/performance/olmv1-performance-commands.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
#!/bin/bash | ||
set -o errexit | ||
set -o nounset | ||
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}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" |
18 changes: 18 additions & 0 deletions
18
ci-operator/step-registry/olmv1/performance/olmv1-performance-ref.metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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