From f24d06ade1b7570f9f60ea6e852872d0f23ae20b Mon Sep 17 00:00:00 2001 From: binbin <83755740+binbinlv@users.noreply.github.com> Date: Thu, 14 Apr 2022 22:29:34 +0800 Subject: [PATCH] Add kafka support in nightly CI (#16494) Signed-off-by: Binbin Lv --- build/ci/jenkins/Nightly.groovy | 22 ++++++++++++++++------ tests/scripts/get_release_name.sh | 10 ++++++++-- tests/scripts/values/kafka.yaml | 4 ++++ tests/scripts/values/pulsar.yaml | 4 ++++ 4 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 tests/scripts/values/kafka.yaml create mode 100644 tests/scripts/values/pulsar.yaml diff --git a/build/ci/jenkins/Nightly.groovy b/build/ci/jenkins/Nightly.groovy index cef3f3f44d..d40f128b3e 100644 --- a/build/ci/jenkins/Nightly.groovy +++ b/build/ci/jenkins/Nightly.groovy @@ -8,7 +8,7 @@ String cron_string = BRANCH_NAME == "master" ? "50 22,2 * * * " : "" // Make timeout 4 hours so that we can run two nightly during the ci int total_timeout_minutes = 4 * 60 def imageTag='' -def chart_version='3.0.19' +def chart_version='3.0.20' pipeline { triggers { cron """${cron_timezone} @@ -86,7 +86,7 @@ pipeline { axes { axis { name 'MILVUS_SERVER_TYPE' - values 'standalone', 'distributed' + values 'standalone', 'distributed-pulsar', 'distributed-kafka' } axis { name 'MILVUS_CLIENT' @@ -103,9 +103,12 @@ pipeline { sh 'printenv' def clusterEnabled = "false" // def setMemoryResourceLimitArgs="--set standalone.resources.limits.memory=4Gi" - if ("${MILVUS_SERVER_TYPE}" == "distributed") { + def mqMode='pulsar' // default using is pulsar + if ("${MILVUS_SERVER_TYPE}" == "distributed-pulsar") { clusterEnabled = "true" - // setMemoryResourceLimitArgs="--set queryNode.resources.limits.memory=4Gi" + } else if ("${MILVUS_SERVER_TYPE}" == "distributed-kafka") { + clusterEnabled = "true" + mqMode='kafka' } if ("${MILVUS_CLIENT}" == "pymilvus") { if ("${imageTag}"==''){ @@ -140,6 +143,7 @@ pipeline { --set indexNode.replicas=2 \ --set dataNode.replicas=2 \ --version ${chart_version} \ + -f values/${mqMode}.yaml \ -f values/nightly.yaml " """ } @@ -167,10 +171,15 @@ pipeline { script { def release_name=sh(returnStdout: true, script: './get_release_name.sh') def clusterEnabled = "false" + def mqMode='pulsar' int e2e_timeout_seconds = 6 * 60 * 60 - if ("${MILVUS_SERVER_TYPE}" == "distributed") { + if ("${MILVUS_SERVER_TYPE}" == "distributed-pulsar") { clusterEnabled = "true" e2e_timeout_seconds = 10 * 60 * 60 + } else if("${MILVUS_SERVER_TYPE}" == "distributed-kafka" ) { + clusterEnabled = "true" + mqMode='kafka' + e2e_timeout_seconds = 10 * 60 * 60 } if ("${MILVUS_CLIENT}" == "pymilvus") { sh """ @@ -178,7 +187,8 @@ pipeline { MILVUS_HELM_NAMESPACE="milvus-ci" \ MILVUS_CLUSTER_ENABLED="${clusterEnabled}" \ TEST_TIMEOUT="${e2e_timeout_seconds}" \ - ./ci_e2e.sh "-n 6 --tags L0 L1 L2 " + MQ_MODE="${mqMode}" \ + ./ci_e2e.sh "-n 6 --tags L0 L1 L2" """ } else { error "Error: Unsupported Milvus client: ${MILVUS_CLIENT}" diff --git a/tests/scripts/get_release_name.sh b/tests/scripts/get_release_name.sh index 74d6141a14..b66ca7f6d6 100755 --- a/tests/scripts/get_release_name.sh +++ b/tests/scripts/get_release_name.sh @@ -25,10 +25,16 @@ set -x function milvus_ci_release_name(){ # Rules for helm release name local name="m" - if [[ "${MILVUS_SERVER_TYPE:-}" == "distributed" ]]; then + if [[ "${MILVUS_SERVER_TYPE:-}" == "distributed-pulsar" ]]; then + # Distributed pulsar mode + name+="dp" + elif [[ "${MILVUS_SERVER_TYPE:-}" == "distributed-kafka" ]]; then + # Distributed kafka mode + name+="dk" + elif [[ "${MILVUS_SERVER_TYPE:-}" == "distributed" ]]; then # Distributed mode name+="d" - else + else # Standalone mode name+="s" diff --git a/tests/scripts/values/kafka.yaml b/tests/scripts/values/kafka.yaml new file mode 100644 index 0000000000..ae1b3b4980 --- /dev/null +++ b/tests/scripts/values/kafka.yaml @@ -0,0 +1,4 @@ +kafka: + enabled: true +pulsar: + enabled: false \ No newline at end of file diff --git a/tests/scripts/values/pulsar.yaml b/tests/scripts/values/pulsar.yaml new file mode 100644 index 0000000000..6d609596a2 --- /dev/null +++ b/tests/scripts/values/pulsar.yaml @@ -0,0 +1,4 @@ +kafka: + enabled: false +pulsar: + enabled: true \ No newline at end of file