-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skip ci] update benchmark scripts on 0.10.4 (#4213)
* [skip ci] update ci/jenkinsfile to 0.10.4 Signed-off-by: zw <[email protected]> * [skip ci] update version in test case Signed-off-by: zw <[email protected]> * [skip ci] update benchmark scripts Signed-off-by: zw <[email protected]> * [skip ci] add comments in scripts Signed-off-by: zw <[email protected]> * [skip ci] fix style in benchmark Signed-off-by: zw <[email protected]> * [skip ci] fix style in benchmark Signed-off-by: zw <[email protected]> * [skip ci] fix style in benchmark Signed-off-by: zw <[email protected]> * [skip ci] fix style in benchmark Signed-off-by: zw <[email protected]> * [skip ci] fix style in benchmark Signed-off-by: zw <[email protected]> * [skip ci] fix style in benchmark Signed-off-by: zw <[email protected]> * [skip ci] fix style in benchmark Signed-off-by: zw <[email protected]> Co-authored-by: zw <[email protected]>
- Loading branch information
1 parent
bf5fdc3
commit de0669f
Showing
44 changed files
with
1,976 additions
and
658 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
13 changes: 13 additions & 0 deletions
13
tests/milvus_benchmark/ci/jenkinsfile/cleanupShards.groovy
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
try { | ||
def result = sh script: "helm status -n milvus ${env.HELM_SHARDS_RELEASE_NAME}", returnStatus: true | ||
if (!result) { | ||
sh "helm uninstall -n milvus ${env.HELM_SHARDS_RELEASE_NAME}" | ||
} | ||
} catch (exc) { | ||
def result = sh script: "helm status -n milvus ${env.HELM_SHARDS_RELEASE_NAME}", returnStatus: true | ||
if (!result) { | ||
sh "helm uninstall -n milvus ${env.HELM_SHARDS_RELEASE_NAME}" | ||
} | ||
throw exc | ||
} | ||
|
21 changes: 21 additions & 0 deletions
21
tests/milvus_benchmark/ci/jenkinsfile/deploy_shards_test.groovy
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
timeout(time: 12, unit: 'HOURS') { | ||
try { | ||
dir ("milvus-helm") { | ||
// sh 'helm init --client-only --skip-refresh --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts' | ||
// sh 'helm repo update' | ||
checkout([$class: 'GitSCM', branches: [[name: "${HELM_BRANCH}"]], userRemoteConfigs: [[url: "${HELM_URL}", name: 'origin', refspec: "+refs/heads/${HELM_BRANCH}:refs/remotes/origin/${HELM_BRANCH}"]]]) | ||
} | ||
dir ("milvus_benchmark") { | ||
print "Git clone url: ${TEST_URL}:${TEST_BRANCH}" | ||
checkout([$class: 'GitSCM', branches: [[name: "${TEST_BRANCH}"]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: "${params.GIT_USER}", url: "${TEST_URL}", name: 'origin', refspec: "+refs/heads/${TEST_BRANCH}:refs/remotes/origin/${TEST_BRANCH}"]]]) | ||
print "Install requirements" | ||
// sh "python3 -m pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com" | ||
sh "python3 -m pip install -r requirements.txt" | ||
sh "python3 -m pip install git+${TEST_LIB_URL}" | ||
sh "python3 main.py --image-version=${params.IMAGE_VERSION} --schedule-conf=scheduler/${params.SHARDS_CONFIG_FILE} --deploy-mode=${params.DEPLOY_MODE}" | ||
} | ||
} catch (exc) { | ||
echo 'Deploy SHARDS Test Failed !' | ||
throw exc | ||
} | ||
} |
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,21 +1,19 @@ | ||
timeout(time: 4000, unit: 'MINUTES') { | ||
try { | ||
dir ("milvus-helm") { | ||
// sh 'helm init --client-only --skip-refresh --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts' | ||
// sh 'helm repo update' | ||
checkout([$class: 'GitSCM', branches: [[name: "${HELM_BRANCH}"]], userRemoteConfigs: [[url: "${HELM_URL}", name: 'origin', refspec: "+refs/heads/${HELM_BRANCH}:refs/remotes/origin/${HELM_BRANCH}"]]]) | ||
} | ||
dir ("milvus_benchmark") { | ||
print "Git clone url: ${TEST_URL}:${TEST_BRANCH}" | ||
checkout([$class: 'GitSCM', branches: [[name: "${TEST_BRANCH}"]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: "${params.GIT_USER}", url: "${TEST_URL}", name: 'origin', refspec: "+refs/heads/${TEST_BRANCH}:refs/remotes/origin/${TEST_BRANCH}"]]]) | ||
print "Install requirements" | ||
// sh "python3 -m pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com" | ||
sh "python3 -m pip install -r requirements.txt" | ||
sh "python3 -m pip install git+${TEST_LIB_URL}" | ||
sh "python3 main.py --image-version=${params.IMAGE_VERSION} --schedule-conf=scheduler/${params.CONFIG_FILE}" | ||
} | ||
} catch (exc) { | ||
echo 'Deploy Test Failed !' | ||
throw exc | ||
try { | ||
dir ("milvus-helm") { | ||
// sh 'helm init --client-only --skip-refresh --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts' | ||
// sh 'helm repo update' | ||
checkout([$class: 'GitSCM', branches: [[name: "${HELM_BRANCH}"]], userRemoteConfigs: [[url: "${HELM_URL}", name: 'origin', refspec: "+refs/heads/${HELM_BRANCH}:refs/remotes/origin/${HELM_BRANCH}"]]]) | ||
} | ||
dir ("milvus_benchmark") { | ||
print "Git clone url: ${TEST_URL}:${TEST_BRANCH}" | ||
checkout([$class: 'GitSCM', branches: [[name: "${TEST_BRANCH}"]], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: "${params.GIT_USER}", url: "${TEST_URL}", name: 'origin', refspec: "+refs/heads/${TEST_BRANCH}:refs/remotes/origin/${TEST_BRANCH}"]]]) | ||
print "Install requirements" | ||
// sh "python3 -m pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com" | ||
sh "python3 -m pip install -r requirements.txt" | ||
sh "python3 -m pip install git+${TEST_LIB_URL}" | ||
sh "python3 main.py --image-version=${params.IMAGE_VERSION} --schedule-conf=scheduler/${params.CONFIG_FILE} --deploy-mode=${params.DEPLOY_MODE}" | ||
} | ||
} catch (exc) { | ||
echo 'Deploy Test Failed !' | ||
throw exc | ||
} |
2 changes: 1 addition & 1 deletion
2
tests/milvus_benchmark/ci/jenkinsfile/publishDailyImages.groovy
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 |
---|---|---|
|
@@ -6,17 +6,21 @@ pipeline { | |
} | ||
|
||
parameters{ | ||
string defaultValue: 'master', description: 'server image version', name: 'IMAGE_VERSION', trim: true | ||
string defaultValue: '080_data.json', description: 'test suite config yaml', name: 'CONFIG_FILE', trim: true | ||
string defaultValue: '0.10.4', description: 'server image version', name: 'IMAGE_VERSION', trim: true | ||
choice choices: ['single', 'shards'], description: 'server deploy mode', name: 'DEPLOY_MODE' | ||
string defaultValue: '010_data.json', description: 'test suite config yaml', name: 'CONFIG_FILE', trim: true | ||
string defaultValue: 'shards.json', description: 'shards test suite config yaml', name: 'SHARDS_CONFIG_FILE', trim: true | ||
string defaultValue: '09509e53-9125-4f5d-9ce8-42855987ad67', description: 'git credentials', name: 'GIT_USER', trim: true | ||
} | ||
|
||
environment { | ||
HELM_URL = "https://github.com/milvus-io/milvus-helm.git" | ||
HELM_BRANCH = "master" | ||
HELM_BRANCH = "0.10.3" | ||
TEST_URL = "[email protected]:Test/milvus_benchmark.git" | ||
TEST_BRANCH = "master" | ||
TEST_BRANCH = "0.10.4" | ||
TEST_LIB_URL = "http://192.168.1.105:6060/Test/milvus_metrics.git" | ||
HELM_RELEASE_NAME = "milvus-benchmark-test-${env.BUILD_NUMBER}" | ||
HELM_SHARDS_RELEASE_NAME = "milvus-shards-benchmark-test-${env.BUILD_NUMBER}" | ||
} | ||
|
||
stages { | ||
|
@@ -35,7 +39,7 @@ pipeline { | |
spec: | ||
containers: | ||
- name: milvus-test-env | ||
image: registry.zilliz.com/milvus/milvus-test-env:v0.2 | ||
image: registry.zilliz.com/milvus/milvus-test-env:v0.3 | ||
command: | ||
- cat | ||
tty: true | ||
|
@@ -82,7 +86,8 @@ pipeline { | |
script { | ||
boolean isNightlyTest = isTimeTriggeredBuild() | ||
if (isNightlyTest) { | ||
build job: 'milvus-publish-daily-docker', wait: false | ||
// build job: 'milvus-publish-daily-docker', parameters: [[$class: 'StringParameterValue', name: 'BRANCH', value: "${params.IMAGE_VERSION}"]], wait: false | ||
build job: 'milvus-publish-daily-docker', parameters: [string(name: 'LOCAL_DOKCER_REGISTRY_URL', value: 'registry.zilliz.com'), string(name: 'REMOTE_DOKCER_REGISTRY_URL', value: 'registry-1.docker.io'), string(name: 'REMOTE_DOCKER_CREDENTIALS_ID', value: 'milvus-docker-access-token'), string(name: 'BRANCH', value: String.valueOf(IMAGE_VERSION))], wait: false | ||
} else { | ||
echo "Skip publish daily docker images ..." | ||
} | ||
|
@@ -93,11 +98,13 @@ pipeline { | |
|
||
stage("Deploy Test") { | ||
steps { | ||
gitlabCommitStatus(name: 'Deploy Test') { | ||
container('milvus-test-env') { | ||
script { | ||
print "In Deploy Test Stage" | ||
container('milvus-test-env') { | ||
script { | ||
print "In Deploy Test Stage" | ||
if ("${params.DEPLOY_MODE}" == "single") { | ||
load "${env.WORKSPACE}/ci/jenkinsfile/deploy_test.groovy" | ||
} else { | ||
load "${env.WORKSPACE}/ci/jenkinsfile/deploy_shards_test.groovy" | ||
} | ||
} | ||
} | ||
|
@@ -106,24 +113,19 @@ pipeline { | |
|
||
stage ("Cleanup Env") { | ||
steps { | ||
gitlabCommitStatus(name: 'Cleanup Env') { | ||
container('milvus-test-env') { | ||
script { | ||
container('milvus-test-env') { | ||
script { | ||
if ("${params.DEPLOY_MODE}" == "single") { | ||
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup.groovy" | ||
} else { | ||
load "${env.WORKSPACE}/ci/jenkinsfile/cleanupShards.groovy" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
container('milvus-test-env') { | ||
script { | ||
load "${env.WORKSPACE}/ci/jenkinsfile/cleanup.groovy" | ||
} | ||
} | ||
} | ||
success { | ||
script { | ||
echo "Milvus benchmark test success !" | ||
|
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
Oops, something went wrong.