Skip to content

Commit

Permalink
Add support for instance based storge in nightly benchmark run
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <sngri@amazon.com>
  • Loading branch information
rishabh6788 committed Oct 9, 2024
1 parent 5b16eea commit 2399407
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 41 deletions.
9 changes: 8 additions & 1 deletion jenkins/opensearch/benchmark-pull-request.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: 'jenkins@6.8.2', retriever: modernSCM([
lib = library(identifier: 'jenkins@7.0.0', retriever: modernSCM([

$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
Expand Down Expand Up @@ -97,6 +97,11 @@ pipeline {
description: 'Data node ebs block storage size, empty value defaults to 100Gb',
trim: true
)
booleanParam(
defaultValue: false,
name: 'USE_INSTANCE_BASED_SSD_STORAGE',
description: 'Use instance based SSD storage instead of EBS for data nodes',
)
string(
name: 'ML_NODE_STORAGE',
description: 'ML node ebs block storage size, empty value defaults to 100Gb',
Expand Down Expand Up @@ -173,6 +178,7 @@ pipeline {
[key: 'DATA_INSTANCE_TYPE', value: '$.DATA_INSTANCE_TYPE'],
[key: 'DATA_NODE_STORAGE', value: '$.DATA_NODE_STORAGE'],
[key: 'ML_NODE_STORAGE', value: '$.ML_NODE_STORAGE'],
[key: 'USE_INSTANCE_BASED_SSD_STORAGE', value: '$.USE_INSTANCE_BASED_SSD_STORAGE'],
[key: 'JVM_SYS_PROPS', value: '$.JVM_SYS_PROPS'],
[key: 'ADDITIONAL_CONFIG', value: '$.ADDITIONAL_CONFIG'],
[key: 'USE_50_PERCENT_HEAP', value: '$.USE_50_PERCENT_HEAP'],
Expand Down Expand Up @@ -253,6 +259,7 @@ pipeline {
additionalConfig: ADDITIONAL_CONFIG,
dataStorageSize: DATA_NODE_STORAGE,
mlStorageSize: ML_NODE_STORAGE,
enableInstanceStorage: USE_INSTANCE_BASED_SSD_STORAGE,
jvmSysProps: JVM_SYS_PROPS,
userTag: USER_TAGS.isEmpty() ? "security-enabled:${SECURITY_ENABLED}" : "${USER_TAGS},security-enabled:${SECURITY_ENABLED}",
suffix: "${BUILD_NUMBER}",
Expand Down
9 changes: 8 additions & 1 deletion jenkins/opensearch/benchmark-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: 'jenkins@6.8.0', retriever: modernSCM([
lib = library(identifier: 'jenkins@7.0.0', retriever: modernSCM([

$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
Expand Down Expand Up @@ -239,6 +239,11 @@ pipeline {
description: 'Data node ebs block storage size, empty value defaults to 100Gb',
trim: true
)
booleanParam(
defaultValue: false,
name: 'USE_INSTANCE_BASED_SSD_STORAGE',
description: 'Use instance based SSD storage instead of EBS for data nodes',
)
string(
name: 'ML_NODE_STORAGE',
description: 'ML node ebs block storage size, empty value defaults to 100Gb',
Expand Down Expand Up @@ -387,6 +392,7 @@ pipeline {
includeTasks: INCLUDE_TASKS,
additionalConfig: ADDITIONAL_CONFIG,
dataStorageSize: DATA_NODE_STORAGE,
enableInstanceStorage: USE_INSTANCE_BASED_SSD_STORAGE,
mlStorageSize: ML_NODE_STORAGE,
jvmSysProps: JVM_SYS_PROPS,
captureNodeStat: CAPTURE_NODE_STAT,
Expand Down Expand Up @@ -447,6 +453,7 @@ pipeline {
includeTasks: INCLUDE_TASKS,
additionalConfig: ADDITIONAL_CONFIG,
dataStorageSize: DATA_NODE_STORAGE,
enableInstanceStorage: USE_INSTANCE_BASED_SSD_STORAGE,
mlStorageSize: ML_NODE_STORAGE,
jvmSysProps: JVM_SYS_PROPS,
captureNodeStat: CAPTURE_NODE_STAT,
Expand Down
5 changes: 3 additions & 2 deletions tests/jenkins/TestBenchmarkPullRequest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TestBenchmarkPullRequest extends BuildPipelineTest {

helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('6.8.2')
.defaultVersion('7.0.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -106,6 +106,7 @@ class TestBenchmarkPullRequest extends BuildPipelineTest {
binding.setVariable('pull_request', 1234)
binding.setVariable('baseline_cluster_config', 'test-cluster-config')
binding.setVariable('repository','opensearch-project/OpenSearch')
binding.setVariable('USE_INSTANCE_BASED_SSD_STORAGE', 'false')

helper.registerAllowedMethod("GenericTrigger", [Map], { println 'GenericTrigger called with params: ' + it })
helper.registerAllowedMethod("sh", [Map.class], { map ->
Expand Down Expand Up @@ -146,7 +147,7 @@ class TestBenchmarkPullRequest extends BuildPipelineTest {
}
assertThat(testScriptCommands.size(), equalTo(1))
assertThat(testScriptCommands, hasItems(
"set +x && ./test.sh benchmark-test execute-test --distribution-url https://artifacts.com/artifact.tar.gz --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:false --without-security --single-node --min-distribution --use-50-percent-heap --suffix 307 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --data-node-storage 100".toString()
"set +x && ./test.sh benchmark-test execute-test --distribution-url https://artifacts.com/artifact.tar.gz --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:false --without-security --single-node --min-distribution --use-50-percent-heap --suffix 307 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --data-node-storage 100".toString()
))

def testGhCliCommand = getCommandExecutions('sh', 'gh').findAll {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TestRunBenchmarkTestScriptDistributionUrl extends BuildPipelineTest {
void setUp() {
helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('6.8.0')
.defaultVersion('7.0.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -96,6 +96,7 @@ class TestRunBenchmarkTestScriptDistributionUrl extends BuildPipelineTest {
binding.setVariable('TEST_WORKLOAD', 'nyc-taxis')
binding.setVariable('WEBHOOK_URL', 'test://artifact.url')
binding.setVariable('TELEMETRY_PARAMS', '')
binding.setVariable('USE_INSTANCE_BASED_SSD_STORAGE', 'true')

super.setUp()
}
Expand Down Expand Up @@ -131,7 +132,7 @@ class TestRunBenchmarkTestScriptDistributionUrl extends BuildPipelineTest {

assertThat(testScriptCommands.size(), equalTo(1))
assertThat(testScriptCommands, hasItems(
"set +x && ./test.sh benchmark-test execute-test --distribution-url https://artifacts.com/artifact.tar.gz --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:false,jenkins-build-id:307 --without-security --use-50-percent-heap --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --data-node-storage 100".toString()
"set +x && ./test.sh benchmark-test execute-test --distribution-url https://artifacts.com/artifact.tar.gz --distribution-version 3.0.0 --config /tmp/workspace/config.yml --workload nyc-taxis --benchmark-config /tmp/workspace/benchmark.ini --user-tag run-type:test,security-enabled:false,jenkins-build-id:307 --without-security --use-50-percent-heap --enable-instance-storage --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --data-node-storage 100".toString()
))
}

Expand Down
5 changes: 3 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('6.8.0')
.defaultVersion('7.0.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -96,6 +96,7 @@ class TestRunNonSecBenchmarkTestScript extends BuildPipelineTest{
binding.setVariable('TEST_WORKLOAD', 'nyc-taxis')
binding.setVariable('WEBHOOK_URL', 'test://artifact.url')
binding.setVariable('TELEMETRY_PARAMS', '')
binding.setVariable('USE_INSTANCE_BASED_SSD_STORAGE', 'false')

super.setUp()
}
Expand Down Expand Up @@ -140,7 +141,7 @@ class TestRunNonSecBenchmarkTestScript extends BuildPipelineTest{

assertThat(testScriptCommands.size(), equalTo(1))
assertThat(testScriptCommands, hasItem(
"set +x && ./test.sh benchmark-test execute-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,jenkins-build-id:307 --without-security --use-50-percent-heap --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --exclude-tasks type:search,scroll --include-tasks type:search,scroll --data-node-storage 100".toString()
"set +x && ./test.sh benchmark-test execute-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,jenkins-build-id:307 --without-security --use-50-percent-heap --suffix 307 --manager-node-count 3 --data-node-count 3 --data-instance-type r5-4xlarge --test-procedure append-no-conflicts --exclude-tasks type:search,scroll --include-tasks type:search,scroll --data-node-storage 100".toString()
))
}

Expand Down
7 changes: 4 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('6.8.0')
.defaultVersion('7.0.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down Expand Up @@ -96,6 +96,7 @@ class TestRunSecureBenchmarkTestScript extends BuildPipelineTest{
binding.setVariable('TEST_WORKLOAD', 'nyc-taxis')
binding.setVariable('WEBHOOK_URL', 'test://artifact.url')
binding.setVariable('TELEMETRY_PARAMS', '{"telemetry_setting":"value"}')
binding.setVariable('USE_INSTANCE_BASED_SSD_STORAGE', 'true')

super.setUp()
}
Expand Down Expand Up @@ -141,8 +142,8 @@ class TestRunSecureBenchmarkTestScript extends BuildPipelineTest{

assertThat(testScriptCommands.size(), equalTo(2))
assertThat(testScriptCommands, hasItems(
"set +x && ./test.sh benchmark-test execute-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,jenkins-build-id:307 --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 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString(),
"set +x && ./test.sh benchmark-test execute-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,jenkins-build-id:307 --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 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString()
"set +x && ./test.sh benchmark-test execute-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,jenkins-build-id:307 --use-50-percent-heap --enable-remote-store --enable-instance-storage --capture-segment-replication-stat --suffix 307-secure --manager-node-count 3 --data-node-count 3 --data-node-storage 100 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString(),
"set +x && ./test.sh benchmark-test execute-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,jenkins-build-id:307 --without-security --use-50-percent-heap --enable-remote-store --enable-instance-storage --capture-segment-replication-stat --suffix 307 --manager-node-count 3 --data-node-count 3 --data-node-storage 100 --telemetry-params '{\"telemetry_setting\":\"value\"}'".toString()
))
}

Expand Down
Loading

0 comments on commit 2399407

Please sign in to comment.