[skip e2e]Make work node number can be configured (#17522)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2022-06-13 16:04:09 +08:00 committed by GitHub
parent e6225d923b
commit aa9c307a09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 78 additions and 7 deletions

View File

@ -52,10 +52,25 @@ pipeline {
defaultValue: "3.5.0-r1"
)
string(
description: 'Query Replic Nums',
description: 'QueryNode Nums',
name: 'querynode_nums',
defaultValue: '3'
)
string(
description: 'DataNode Nums',
name: 'datanode_nums',
defaultValue: '2'
)
string(
description: 'IndexNode Nums',
name: 'indexnode_nums',
defaultValue: '1'
)
string(
description: 'Proxy Nums',
name: 'proxy_nums',
defaultValue: '1'
)
booleanParam(
description: 'Keep Env',
name: 'keep_env',
@ -88,6 +103,9 @@ pipeline {
script {
sh """
yq -i '.queryNode.replicas = "${params.querynode_nums}"' cluster-values.yaml
yq -i '.dataNode.replicas = "${params.datanode_nums}"' cluster-values.yaml
yq -i '.indexNode.replicas = "${params.indexnode_nums}"' cluster-values.yaml
yq -i '.proxy.replicas = "${params.proxy_nums}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' cluster-values.yaml
yq -i '.etcd.image.tag = "${params.etcd_image_tag}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' standalone-values.yaml

View File

@ -52,10 +52,25 @@ pipeline {
defaultValue: "3.5.0-r1"
)
string(
description: 'Query Replic Nums',
description: 'QueryNode Nums',
name: 'querynode_nums',
defaultValue: '3'
)
string(
description: 'DataNode Nums',
name: 'datanode_nums',
defaultValue: '2'
)
string(
description: 'IndexNode Nums',
name: 'indexnode_nums',
defaultValue: '1'
)
string(
description: 'Proxy Nums',
name: 'proxy_nums',
defaultValue: '1'
)
booleanParam(
description: 'Keep Env',
name: 'keep_env',
@ -91,6 +106,9 @@ pipeline {
yq -i '.pulsar.enabled = false' cluster-values.yaml
yq -i '.queryNode.replicas = "${params.querynode_nums}"' cluster-values.yaml
yq -i '.dataNode.replicas = "${params.datanode_nums}"' cluster-values.yaml
yq -i '.indexNode.replicas = "${params.indexnode_nums}"' cluster-values.yaml
yq -i '.proxy.replicas = "${params.proxy_nums}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' cluster-values.yaml
yq -i '.etcd.image.tag = "${params.etcd_image_tag}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' standalone-values.yaml

View File

@ -63,6 +63,21 @@ pipeline {
name: 'querynode_nums',
defaultValue: '3'
)
string(
description: 'DataNode Nums',
name: 'datanode_nums',
defaultValue: '2'
)
string(
description: 'IndexNode Nums',
name: 'indexnode_nums',
defaultValue: '1'
)
string(
description: 'Proxy Nums',
name: 'proxy_nums',
defaultValue: '1'
)
string(
description: 'Data Size',
name: 'data_size',
@ -106,6 +121,9 @@ pipeline {
script {
sh """
yq -i '.queryNode.replicas = "${params.querynode_nums}"' cluster-values.yaml
yq -i '.dataNode.replicas = "${params.datanode_nums}"' cluster-values.yaml
yq -i '.indexNode.replicas = "${params.indexnode_nums}"' cluster-values.yaml
yq -i '.proxy.replicas = "${params.proxy_nums}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' cluster-values.yaml
yq -i '.etcd.image.tag = "${params.etcd_image_tag}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' standalone-values.yaml

View File

@ -63,6 +63,21 @@ pipeline {
name: 'querynode_nums',
defaultValue: '3'
)
string(
description: 'DataNode Nums',
name: 'datanode_nums',
defaultValue: '2'
)
string(
description: 'IndexNode Nums',
name: 'indexnode_nums',
defaultValue: '1'
)
string(
description: 'Proxy Nums',
name: 'proxy_nums',
defaultValue: '1'
)
string(
description: 'Data Size',
name: 'data_size',
@ -113,6 +128,12 @@ pipeline {
} else if ("${params.mq_type}" == "kafka") {
sh "yq -i '.kafka.enabled = true' cluster-values.yaml"
}
sh"""
yq -i '.queryNode.replicas = "${params.querynode_nums}"' cluster-values.yaml
yq -i '.dataNode.replicas = "${params.datanode_nums}"' cluster-values.yaml
yq -i '.indexNode.replicas = "${params.indexnode_nums}"' cluster-values.yaml
yq -i '.proxy.replicas = "${params.proxy_nums}"' cluster-values.yaml
"""
sh "cat cluster-values.yaml"
}
}

View File

@ -3,14 +3,10 @@ set -e
release=${1:-"milvs-chaos"}
ns=${2:-"chaos-testing"}
pod=${3:-"querynode"}
node_num=${4:-1}
bash uninstall_milvus.sh ${release} ${ns}|| true
declare -A pod_map=(["querynode"]="queryNode" ["indexnode"]="indexNode" ["datanode"]="dataNode" ["proxy"]="proxy")
echo "insatll cluster"
helm install --wait --debug --timeout 600s ${RELEASE_NAME:-$release} milvus/milvus \
--set image.all.repository=${REPOSITORY:-"milvusdb/milvus-dev"} \
--set image.all.tag=${IMAGE_TAG:-"master-latest"} \
--set ${pod_map[${pod}]}.replicas=$node_num \
-f ../cluster-values.yaml -n=${ns}