Skip to content
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

Ocm api load #616

Open
wants to merge 2 commits into
base: ocm-api-load
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
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ pipeline {
file(credentialsId: 'ocm-al-aws', variable: 'AWS_CREDS' ),
file(credentialsId: 'ocm-al-infra', variable: 'INFRA' ),
string(credentialsId: 'ocm-al-ocm-token', variable: 'OCM_TOKEN' ),
string(credentialsId: 'ocm-al-ocm-client-id', variable: 'OCM_CLIENT_ID' ),
string(credentialsId: 'ocm-al-ocm-client-secret', variable: 'OCM_CLIENT_SECRET' ),
string(credentialsId: 'ocm-al-prom-token', variable: 'PROM_TOKEN' ),
string(credentialsId: 'ocm-al-server-password', variable: 'ES_SERVER_PASS' ),
string(credentialsId: 'ocm-al-sshkey-token', variable: 'SSHKEY_TOKEN' ),
Expand Down
3 changes: 1 addition & 2 deletions scripts/run_ocm_api_load.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ run_ocm_api_load(){
echo $GATEWAY_URL
# Timeout runs ocm-load-test for the specified duration even if airflow killed this script (when user wants to stop benchmark execution). This helps in ocm-load-test to cleanup resources it created. 10 minutes extra timeout is set so that test can prepare results after running for the given duration.
# kill-after option needs sudo permissions
timeout --kill-after=60s --preserve-status $(((tduration + 20) * 60)) $TESTDIR/build/ocm-load-test --aws-region $AWS_DEFAULT_REGION --aws-account-id $AWS_ACCOUNT_ID --aws-access-key $AWS_OSDCCADMIN_KEY --aws-access-secret $AWS_OSDCCADMIN_SECRET --cooldown $COOLDOWN --duration $tduration --elastic-index ocm-load-metrics --elastic-insecure-skip-verify=true --elastic-server $ES_SERVER --gateway-url $GATEWAY_URL --ocm-token $OCM_TOKEN --ocm-token-url $OCM_TOKEN_URL --output-path $TESTDIR/results --rate $trate --test-id $UUID --test-names $tname $rampoptions || true
# $TESTDIR/build/ocm-load-test --aws-region $AWS_DEFAULT_REGION --aws-account-id $AWS_ACCOUNT_ID --aws-access-key $AWS_OSDCCADMIN_KEY --aws-access-secret $AWS_OSDCCADMIN_SECRET --cooldown $COOLDOWN --duration $tduration --elastic-index ocm-load-metrics --elastic-insecure-skip-verify=true --elastic-server $ES_SERVER --gateway-url $GATEWAY_URL --ocm-token $OCM_TOKEN --ocm-token-url $OCM_TOKEN_URL --output-path $TESTDIR/results --rate $trate --test-id $UUID --test-names $tname $rampoptions
timeout --kill-after=60s --preserve-status $(((tduration + 20) * 60)) $TESTDIR/build/ocm-load-test --aws-region $AWS_DEFAULT_REGION --aws-account-id $AWS_ACCOUNT_ID --aws-access-key $AWS_OSDCCADMIN_KEY --aws-access-secret $AWS_OSDCCADMIN_SECRET --cooldown $COOLDOWN --duration $tduration --elastic-index ocm-load-metrics --elastic-insecure-skip-verify=true --elastic-server $ES_SERVER --gateway-url $GATEWAY_URL --client-id $OCM_CLIENT_ID --client-secret $OCM_CLIENT_SECRET --ocm-token-url $OCM_TOKEN_URL --output-path $TESTDIR/results --rate $trate --test-id $UUID --test-names $tname $rampoptions || true
sleep $COOLDOWN
done
benchmark_rv=$?
Expand Down
3 changes: 3 additions & 0 deletions scripts/run_ocm_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ setup(){
export ES_SERVER_URL=${ES_SERVER_URL}
export ES_SERVER_USER=${ES_SERVER_USER}
export OCM_TOKEN=${OCM_TOKEN}
export OCM_CLIENT_ID=${OCM_CLIENT_ID}
export OCM_CLIENT_SECRET=${OCM_CLIENT_SECRET}
export PROM_TOKEN=${PROM_TOKEN}
export GATEWAY_URL=${GATEWAY_URL}
export BUILD_URL=${BUILD_URL}

# TESTDIR and UUID will be same for ocm-api-load operation. cleanup operation uses different TESTDIR to get unaffected by ocm-api-load operation failures. Cleanup still retrieves UUID and removes /tmp/${UUID} on ORCHESTRATION_HOST
export TESTDIR=$(uuidgen | head -c8)-$JENKINS_JOB_NUMBER-$(date '+%Y%m%d')
Expand Down