Skip to content

Commit

Permalink
use tiproxy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
djshow832 committed Aug 16, 2024
1 parent d88091b commit ca629fa
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 15 deletions.
18 changes: 4 additions & 14 deletions tests/tiup-cluster/script/scale_tiproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,15 @@ function scale_tiproxy() {
mkdir -p ~/.tiup/bin/

version=$1
test_tls=$2
native_ssh=$3
native_ssh=$2

common_args="--wait-timeout=360"
if [ $native_ssh == true ]; then
common_args="$common_args --ssh=system"
fi

name="test_scale_tiproxy_$RANDOM"
if [ $test_tls = true ]; then
topo=./topo/full_tls.yaml
else
topo=./topo/full.yaml
fi
topo=./topo/tiproxy.yaml

check_cert_file="ls /home/tidb/deploy/tidb-4000/tls/tiproxy-session.crt /home/tidb/deploy/tidb-4000/tls/tiproxy-session.key"
check_cert_config="grep -q session-token-signing-key /home/tidb/deploy/tidb-4000/conf/tidb.toml"
Expand All @@ -41,13 +36,8 @@ function scale_tiproxy() {

tiup-cluster $common_args --yes reload $name --skip-restart

if [ $test_tls = true ]; then
total_sub_one=18
total=19
else
total_sub_one=23
total=24
fi
total_sub_one=23
total=24

# disable tiproxy
echo "start scale in tiproxy"
Expand Down
2 changes: 1 addition & 1 deletion tests/tiup-cluster/test_scale_tiproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -eu
source script/scale_tiproxy.sh

echo "test scaling of tidb and tiproxy in cluster for version v8.2.0, via easy ssh"
scale_tiproxy v8.2.0 false false
scale_tiproxy v8.2.0 false
26 changes: 26 additions & 0 deletions tests/tiup-cluster/topo/tiproxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
global:
user: tidb
group: pingcap

component_version:
tiproxy: v1.2.0

tidb_servers:
- host: n1
- host: n2

pd_servers:
- host: n3
- host: n4
- host: n5

# Note if only 3 instance, when scale-in one of it.
# It may not be tombstone.
tikv_servers:
- host: n1
- host: n3
- host: n4
- host: n5

tiproxy_servers:
- host: n1

0 comments on commit ca629fa

Please sign in to comment.