mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
* restore .gitmodules * Revert "[TD-13408]<test>: move tests out" This reverts commitf80a4ca49f. * revertf80a4ca49f* immigrate file change from stand-alone repo to TDengine for 3.0 * remove tests repository for Jenkinsfile2 Co-authored-by: tangfangzhi <fztang@taosdata.com>
46 lines
673 B
Bash
Executable file
46 lines
673 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# deploy test cluster
|
|
|
|
set -e
|
|
#set -x
|
|
|
|
dnodeNumber=1
|
|
subnet="172.33.0.0/16"
|
|
|
|
while getopts "hn:s:" arg
|
|
do
|
|
case $arg in
|
|
n)
|
|
dnodeNumber=$(echo $OPTARG)
|
|
;;
|
|
s)
|
|
subnet=$(echo $OPTARG)
|
|
;;
|
|
h)
|
|
echo "Usage: `basename $0` -n [ dnode number] "
|
|
echo " -s [ subnet] "
|
|
exit 0
|
|
;;
|
|
?) #unknow option
|
|
echo "unkonw argument"
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
|
|
addFqdnToHosts() {
|
|
index=$1
|
|
ipPrefix=$2
|
|
let ipIndex=index+1
|
|
echo "${ipPrefix}.${ipIndex} node${i}" >> /etc/hosts
|
|
}
|
|
|
|
ipPrefix=${subnet%.*}
|
|
for ((i=1; i<=${dnodeNumber}; i++)); do
|
|
addFqdnToHosts ${i} ${ipPrefix}
|
|
done
|
|
|
|
|
|
|
|
|