Skip to content

Commit

Permalink
Added support for data-instance-type and capture-segment-replication-…
Browse files Browse the repository at this point in the history
…stat additional parameters

Signed-off-by: Rishabh Singh <[email protected]>
  • Loading branch information
rishabh6788 committed Aug 15, 2023
1 parent 75c4cd7 commit 62d09a2
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 24 deletions.
20 changes: 17 additions & 3 deletions jenkins/opensearch/benchmark-test.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib = library(identifier: 'jenkins@5.1.0', retriever: modernSCM([
lib = library(identifier: 'jenkins@5.5.0', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -194,6 +194,11 @@ pipeline {
description: 'Number of cluster ml nodes, empty value defaults to 0.',
trim: true
)
string(
name: 'DATA_INSTANCE_TYPE',
description: 'EC2 instance type for data node, empty defaults to r5.xlarge.',
trim: true
)
string(
name: 'DATA_NODE_STORAGE',
description: 'Data node ebs block storage size, empty value defaults to 100Gb',
Expand Down Expand Up @@ -234,6 +239,11 @@ pipeline {
description: 'Enable opensearch-benchmark node-stats telemetry to capture system level metrics.',
defaultValue: false
)
booleanParam(
name: 'CAPTURE_SEGMENT_REPLICATION_STAT',
description: 'Enable opensearch-benchmark segment-replication-stats telemetry to capture metrics such as replication lag.',
defaultValue: false
)
}

stages {
Expand Down Expand Up @@ -295,13 +305,15 @@ pipeline {
clientNodeCount: CLIENT_NODE_COUNT,
ingestNodeCount: INGEST_NODE_COUNT,
mlNodeCount: ML_NODE_COUNT,
dataInstanceType: DATA_INSTANCE_TYPE,
userTag: USER_TAGS.isEmpty() ? "security-enabled:true" : "${USER_TAGS},security-enabled:true",
workloadParams: WORKLOAD_PARAMS,
additionalConfig: ADDITIONAL_CONFIG,
dataStorageSize: DATA_NODE_STORAGE,
mlStorageSize: ML_NODE_STORAGE,
jvmSysProps: JVM_SYS_PROPS,
captureNodeStat: CAPTURE_NODE_STAT
captureNodeStat: CAPTURE_NODE_STAT,
captureSegmentReplicationStat: CAPTURE_SEGMENT_REPLICATION_STAT
)
lib.jenkins.Messages.new(this).add(JOB_NAME,
lib.jenkins.Messages.new(this).get([JOB_NAME]) +
Expand Down Expand Up @@ -340,13 +352,15 @@ pipeline {
clientNodeCount: CLIENT_NODE_COUNT,
ingestNodeCount: INGEST_NODE_COUNT,
mlNodeCount: ML_NODE_COUNT,
dataInstanceType: DATA_INSTANCE_TYPE,
userTag: USER_TAGS.isEmpty() ? "security-enabled:false" : "${USER_TAGS},security-enabled:false",
workloadParams: WORKLOAD_PARAMS,
additionalConfig: ADDITIONAL_CONFIG,
dataStorageSize: DATA_NODE_STORAGE,
mlStorageSize: ML_NODE_STORAGE,
jvmSysProps: JVM_SYS_PROPS,
captureNodeStat: CAPTURE_NODE_STAT
captureNodeStat: CAPTURE_NODE_STAT,
captureSegmentReplicationStat: CAPTURE_SEGMENT_REPLICATION_STAT
)
lib.jenkins.Messages.new(this).add(JOB_NAME,
lib.jenkins.Messages.new(this).get([JOB_NAME]) +
Expand Down
6 changes: 4 additions & 2 deletions tests/jenkins/TestRunNonSecBenchmarkTestScript.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TestRunNonSecBenchmarkTestScript extends BuildPipelineTest{
void setUp() {
helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('4.3.0')
.defaultVersion('5.5.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -80,8 +80,10 @@ class TestRunNonSecBenchmarkTestScript extends BuildPipelineTest{
binding.setVariable('ML_NODE_COUNT', '')
binding.setVariable('DATA_NODE_STORAGE', '100')
binding.setVariable('ML_NODE_STORAGE', '')
binding.setVariable('DATA_INSTANCE_TYPE', 'r5-4xlarge')
binding.setVariable('JVM_SYS_PROPS', '')
binding.setVariable('CAPTURE_NODE_STAT', 'false')
binding.setVariable('CAPTURE_SEGMENT_REPLICATION_STAT', 'false')
binding.setVariable('JOB_NAME', 'benchmark-test')
binding.setVariable('BENCHMARK_TEST_CONFIG_LOCATION', 'test_config')
binding.setVariable('PUBLIC_ARTIFACT_URL', 'test://artifact.url')
Expand Down Expand Up @@ -132,7 +134,7 @@ class TestRunNonSecBenchmarkTestScript extends BuildPipelineTest{

assertThat(testScriptCommands.size(), equalTo(1))
assertThat(testScriptCommands, hasItem(
"./test.sh benchmark-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false --without-security --use-50-percent-heap --suffix 307 --manager-node-count 3 --data-node-count 3 --data-node-storage 100 ".toString()
"./test.sh benchmark-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false --without-security --use-50-percent-heap --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --data-node-storage 100 ".toString()
))
}

Expand Down
8 changes: 5 additions & 3 deletions tests/jenkins/TestRunSecureBenchmarkTestScript.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TestRunSecureBenchmarkTestScript extends BuildPipelineTest{
void setUp() {
helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('4.3.0')
.defaultVersion('5.5.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -80,8 +80,10 @@ class TestRunSecureBenchmarkTestScript extends BuildPipelineTest{
binding.setVariable('ML_NODE_COUNT', '')
binding.setVariable('DATA_NODE_STORAGE', '100')
binding.setVariable('ML_NODE_STORAGE', '')
binding.setVariable('DATA_INSTANCE_TYPE', '')
binding.setVariable('JVM_SYS_PROPS', '')
binding.setVariable('CAPTURE_NODE_STAT', 'false')
binding.setVariable('CAPTURE_SEGMENT_REPLICATION_STAT', 'true')
binding.setVariable('JOB_NAME', 'benchmark-test')
binding.setVariable('BENCHMARK_TEST_CONFIG_LOCATION', 'test_config')
binding.setVariable('PUBLIC_ARTIFACT_URL', 'test://artifact.url')
Expand Down Expand Up @@ -133,8 +135,8 @@ class TestRunSecureBenchmarkTestScript extends BuildPipelineTest{

assertThat(testScriptCommands.size(), equalTo(2))
assertThat(testScriptCommands, hasItems(
"./test.sh benchmark-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:true --use-50-percent-heap --enable-remote-store --suffix 307-secure --manager-node-count 3 --data-node-count 3 --data-node-storage 100 ".toString(),
"./test.sh benchmark-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false --without-security --use-50-percent-heap --enable-remote-store --suffix 307 --manager-node-count 3 --data-node-count 3 --data-node-storage 100 ".toString()
"./test.sh benchmark-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:true --use-50-percent-heap --enable-remote-store --capture-segment-replication-stat --suffix 307-secure --manager-node-count 3 --data-node-count 3 --data-node-storage 100 ".toString(),
"./test.sh benchmark-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false --without-security --use-50-percent-heap --enable-remote-store --capture-segment-replication-stat --suffix 307 --manager-node-count 3 --data-node-count 3 --data-node-storage 100 ".toString()
))
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
benchmark-test.run()
benchmark-test.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git})
benchmark-test.library({identifier=jenkins@5.1.0, retriever=null})
benchmark-test.library({identifier=jenkins@5.5.0, retriever=null})
benchmark-test.pipeline(groovy.lang.Closure)
benchmark-test.timeout({time=24, unit=HOURS})
benchmark-test.logRotator({daysToKeepStr=30})
Expand Down Expand Up @@ -132,7 +132,7 @@
benchmark-test.script(groovy.lang.Closure)
benchmark-test.downloadBuildManifest({url=test://artifact.url, path=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml})
downloadBuildManifest.legacySCM(groovy.lang.Closure)
downloadBuildManifest.library({identifier=jenkins@4.3.0, retriever=null})
downloadBuildManifest.library({identifier=jenkins@5.5.0, retriever=null})
downloadBuildManifest.sh(curl -sSL test://artifact.url --output tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml)
downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml})
BuildManifest.asBoolean()
Expand All @@ -151,16 +151,16 @@
benchmark-test.script(groovy.lang.Closure)
benchmark-test.downloadBuildManifest({url=test://artifact.url, path=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml})
downloadBuildManifest.legacySCM(groovy.lang.Closure)
downloadBuildManifest.library({identifier=jenkins@4.3.0, retriever=null})
downloadBuildManifest.library({identifier=jenkins@5.5.0, retriever=null})
downloadBuildManifest.sh(curl -sSL test://artifact.url --output tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml)
downloadBuildManifest.readYaml({file=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml})
BuildManifest.asBoolean()
benchmark-test.echo(BUNDLE_MANIFEST: tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml)
benchmark-test.echo(BUILD_ID: 1234)
benchmark-test.echo(Architecture: x64)
benchmark-test.runBenchmarkTestScript({bundleManifest=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml, workload=nyc-taxis, insecure=true, singleNode=false, minDistribution=false, use50PercentHeap=true, enableRemoteStore=false, suffix=307, managerNodeCount=3, dataNodeCount=3, clientNodeCount=, ingestNodeCount=, mlNodeCount=, userTag=run-type:test,security-enabled:false, workloadParams=, additionalConfig=, dataStorageSize=100, mlStorageSize=, jvmSysProps=, captureNodeStat=false})
benchmark-test.runBenchmarkTestScript({bundleManifest=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml, workload=nyc-taxis, insecure=true, singleNode=false, minDistribution=false, use50PercentHeap=true, enableRemoteStore=false, suffix=307, managerNodeCount=3, dataNodeCount=3, clientNodeCount=, ingestNodeCount=, mlNodeCount=, dataInstanceType=r5-4xlarge, userTag=run-type:test,security-enabled:false, workloadParams=, additionalConfig=, dataStorageSize=100, mlStorageSize=, jvmSysProps=, captureNodeStat=false, captureSegmentReplicationStat=false})
runBenchmarkTestScript.legacySCM(groovy.lang.Closure)
runBenchmarkTestScript.library({identifier=jenkins@4.3.0, retriever=null})
runBenchmarkTestScript.library({identifier=jenkins@5.5.0, retriever=null})
runBenchmarkTestScript.readYaml({file=tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml})
BuildManifest.asBoolean()
runBenchmarkTestScript.string({credentialsId=jenkins-aws-account-public, variable=AWS_ACCOUNT_PUBLIC})
Expand All @@ -177,7 +177,7 @@
BuildManifest.getArtifactBuildId()
BuildManifest.getArtifactArchitecture()
BuildManifest.getCommitId(OpenSearch)
runBenchmarkTestScript.sh(./test.sh benchmark-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false --without-security --use-50-percent-heap --suffix 307 --manager-node-count 3 --data-node-count 3 --data-node-storage 100 )
runBenchmarkTestScript.sh(./test.sh benchmark-test --bundle-manifest tests/jenkins/data/opensearch-1.3.0-non-security-bundle.yml --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag distribution-build-id:1236,arch:x64,os-commit-id:22408088f002a4fc8cdd3b2ed7438866c14c5069,run-type:test,security-enabled:false --without-security --use-50-percent-heap --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --data-node-storage 100 )
Messages.asBoolean()
Messages.asBoolean()
Messages.get([benchmark-test])
Expand Down
Loading

0 comments on commit 62d09a2

Please sign in to comment.