-
Notifications
You must be signed in to change notification settings - Fork 280
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add changes to benchmarks to securely pass Cluster endpoint details (#…
…4621) Signed-off-by: Divya Madala <[email protected]>
- Loading branch information
Showing
12 changed files
with
86 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
* compatible open source license. | ||
*/ | ||
|
||
lib = library(identifier: '[email protected].1', retriever: modernSCM([ | ||
lib = library(identifier: '[email protected].3', retriever: modernSCM([ | ||
|
||
$class: 'GitSCMSource', | ||
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', | ||
|
@@ -21,20 +21,29 @@ pipeline { | |
} | ||
environment { | ||
AGENT_LABEL = 'Jenkins-Agent-AL2023-X64-M52xlarge-Benchmark-Test' | ||
JOB_NAME = 'benchmark-test' | ||
} | ||
parameters { | ||
string( | ||
password( | ||
name: 'CLUSTER_ENDPOINT', | ||
description: 'Provide an endpoint to a cluster for running benchmark tests against it.', | ||
trim: true | ||
) | ||
booleanParam( | ||
name: 'SECURITY_ENABLED', | ||
description: 'Mention if the cluster is secured or insecured.', | ||
defaultValue: false, | ||
) | ||
password( | ||
name: 'USERNAME', | ||
description: 'Enter username for the cluster endpoint', | ||
defaultValue: '' | ||
) | ||
password( | ||
name: 'PASSWORD', | ||
description: 'Enter password for the cluster endpoint', | ||
defaultValue: '' | ||
) | ||
string( | ||
|
||
name: 'TEST_WORKLOAD', | ||
description: 'The workload name from OpenSearch Benchmark Workloads.', | ||
defaultValue: 'nyc_taxis', | ||
|
@@ -108,6 +117,8 @@ parameters { | |
runBenchmarkTestScript( | ||
endpoint: CLUSTER_ENDPOINT, | ||
insecure: !(params.SECURITY_ENABLED), | ||
username: USERNAME, | ||
password: PASSWORD, | ||
workload: TEST_WORKLOAD, | ||
userTag: USER_TAGS.isEmpty() ? "security-enabled:${SECURITY_ENABLED}" : "${USER_TAGS},security-enabled:${SECURITY_ENABLED}", | ||
workloadParams: WORKLOAD_PARAMS, | ||
|
This file contains 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 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 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 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 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 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 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 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
benchmark-test-endpoint.run() | ||
benchmark-test-endpoint.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) | ||
benchmark-test-endpoint.library({[email protected].1, retriever=null}) | ||
benchmark-test-endpoint.library({[email protected].3, retriever=null}) | ||
benchmark-test-endpoint.pipeline(groovy.lang.Closure) | ||
benchmark-test-endpoint.timeout({time=24, unit=HOURS}) | ||
benchmark-test-endpoint.logRotator({daysToKeepStr=30}) | ||
|
@@ -15,9 +15,9 @@ | |
benchmark-test-endpoint.echo(Executing on agent [label:Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host]) | ||
benchmark-test-endpoint.script(groovy.lang.Closure) | ||
benchmark-test-endpoint.echo(security-enabled: true) | ||
benchmark-test-endpoint.runBenchmarkTestScript({endpoint=opensearch-ABCxdfdfhyfk.com, insecure=false, workload=nyc-taxis, userTag=run-type:test,security-enabled:true, workloadParams=, testProcedure=append-no-conflicts, excludeTasks=, includeTasks=, captureNodeStat=false, captureSegmentReplicationStat=false, telemetryParams={"telemetry_setting":"value"}}) | ||
benchmark-test-endpoint.runBenchmarkTestScript({endpoint=opensearch-ABCxdfdfhyfk.com, insecure=false, username=, password=, workload=nyc-taxis, userTag=run-type:test,security-enabled:true, workloadParams=, testProcedure=append-no-conflicts, excludeTasks=, includeTasks=, captureNodeStat=false, captureSegmentReplicationStat=false, telemetryParams={"telemetry_setting":"value"}}) | ||
runBenchmarkTestScript.legacySCM(groovy.lang.Closure) | ||
runBenchmarkTestScript.library({[email protected].1, retriever=null}) | ||
runBenchmarkTestScript.library({[email protected].3, retriever=null}) | ||
runBenchmarkTestScript.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) | ||
runBenchmarkTestScript.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) | ||
runBenchmarkTestScript.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME], groovy.lang.Closure) | ||
|
@@ -28,6 +28,6 @@ | |
runBenchmarkTestScript.withCredentials([DATASTORE_USER, DATASTORE_PASSWORD], groovy.lang.Closure) | ||
runBenchmarkTestScript.readFile({file=/tmp/workspace/benchmark.ini}) | ||
runBenchmarkTestScript.writeFile({file=/tmp/workspace/benchmark.ini, text=}) | ||
runBenchmarkTestScript.sh(./test.sh benchmark-test --cluster-endpoint opensearch-ABCxdfdfhyfk.com --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:true --test-procedure append-no-conflicts --telemetry-params '{"telemetry_setting":"value"}') | ||
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test --cluster-endpoint opensearch-ABCxdfdfhyfk.com --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:true --test-procedure append-no-conflicts --telemetry-params '{"telemetry_setting":"value"}') | ||
benchmark-test-endpoint.postCleanup() | ||
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true}) |
This file contains 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
benchmark-test-endpoint.run() | ||
benchmark-test-endpoint.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git}) | ||
benchmark-test-endpoint.library({[email protected].1, retriever=null}) | ||
benchmark-test-endpoint.library({[email protected].3, retriever=null}) | ||
benchmark-test-endpoint.pipeline(groovy.lang.Closure) | ||
benchmark-test-endpoint.timeout({time=24, unit=HOURS}) | ||
benchmark-test-endpoint.logRotator({daysToKeepStr=30}) | ||
|
@@ -15,9 +15,9 @@ | |
benchmark-test-endpoint.echo(Executing on agent [label:Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host]) | ||
benchmark-test-endpoint.script(groovy.lang.Closure) | ||
benchmark-test-endpoint.echo(security-enabled: true) | ||
benchmark-test-endpoint.runBenchmarkTestScript({endpoint=opensearch-ABCxdfdfhyfk.com, insecure=false, workload=nyc-taxis, userTag=run-type:test,security-enabled:true, workloadParams=, testProcedure=append-no-conflicts, excludeTasks=, includeTasks=, captureNodeStat=false, captureSegmentReplicationStat=false, telemetryParams={"telemetry_setting":"value"}}) | ||
benchmark-test-endpoint.runBenchmarkTestScript({endpoint=opensearch-ABCxdfdfhyfk.com, insecure=false, username=, password=, workload=nyc-taxis, userTag=run-type:test,security-enabled:true, workloadParams=, testProcedure=append-no-conflicts, excludeTasks=, includeTasks=, captureNodeStat=false, captureSegmentReplicationStat=false, telemetryParams={"telemetry_setting":"value"}}) | ||
runBenchmarkTestScript.legacySCM(groovy.lang.Closure) | ||
runBenchmarkTestScript.library({[email protected].1, retriever=null}) | ||
runBenchmarkTestScript.library({[email protected].3, retriever=null}) | ||
runBenchmarkTestScript.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC}) | ||
runBenchmarkTestScript.string({credentialsId=jenkins-artifact-bucket-name, variable=ARTIFACT_BUCKET_NAME}) | ||
runBenchmarkTestScript.withCredentials([AWS_ACCOUNT_PUBLIC, ARTIFACT_BUCKET_NAME], groovy.lang.Closure) | ||
|
@@ -28,6 +28,6 @@ | |
runBenchmarkTestScript.withCredentials([DATASTORE_USER, DATASTORE_PASSWORD], groovy.lang.Closure) | ||
runBenchmarkTestScript.readFile({file=/tmp/workspace/benchmark.ini}) | ||
runBenchmarkTestScript.writeFile({file=/tmp/workspace/benchmark.ini, text=}) | ||
runBenchmarkTestScript.sh(./test.sh benchmark-test --cluster-endpoint opensearch-ABCxdfdfhyfk.com --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:true --test-procedure append-no-conflicts --telemetry-params '{"telemetry_setting":"value"}') | ||
runBenchmarkTestScript.sh(set +x && ./test.sh benchmark-test --cluster-endpoint opensearch-ABCxdfdfhyfk.com --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:true --test-procedure append-no-conflicts --telemetry-params '{"telemetry_setting":"value"}') | ||
benchmark-test-endpoint.postCleanup() | ||
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true}) |
Oops, something went wrong.