pingcap / docs-cn

TiDB/TiKV/PD 中文文档
https://docs.pingcap.com/zh
Other
1.81k stars 1.21k forks source link

tiup tools HA #6479

Closed Auggie321 closed 3 years ago

Auggie321 commented 3 years ago

File: /production-deployment-using-tiup.md

Questions about : does tiup tools could alive in mutilple nodes at the same time in one tidb cluster?

If i have a1,b1,c1,d1 node, a1 was tiup deploy node, b1,c1,d1 were tidb,tikv,pd node;

In case of a1 node down, still need node have tiup could operation tidb cluster, how do i keep tiup compenent alive in a, b, c nodes at the same time ?

when a1 node tiup tools running normally, offline install tiup in b1 node, execute tiup cluster list, could not found the exist tidb cluster name:

[root@centos2 tidb-community-server-v5.0.1-linux-amd64]# tiup cluster list
The component `cluster` version  is not installed; downloading from repository.
Starting component `cluster`: /root/.tiup/components/cluster/v1.4.1/tiup-cluster list
Name  User  Version  Path  PrivateKey
----  ----  -------  ----  ----------

thanks.

Auggie321 commented 3 years ago

b1 node offline installed tiup compenent, wanna use "tiup cluster check ./topology.yaml -uroot -p" command loading exist cluter topology.yml and operation tidb cluster, but loading failed; it noticed some "Fail port xxx is already in use";

sir, in case of tiup compenent node down, maybe there still has one node could execute tiup command to maintenance it.

Auggie321 commented 3 years ago

a1 node(tiup component deploy node)

root@centos1 ~ $ tiup cluster list
Starting component `cluster`: /root/.tiup/components/cluster/v1.4.1/tiup-cluster list
Name       User    Version  Path                                            PrivateKey
----       ----    -------  ----                                            ----------
tidb-test  ucchip  v5.0.1   /root/.tiup/storage/cluster/clusters/tidb-test  /root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa

b1 node(tidb,tikv,pd node)

tar -xf tidb-community-server-v5.0.1-linux-amd64.tar.gz 
cd tidb-community-server-v5.0.1-linux-amd64/
bash local_install.sh 
source /root/.bash_profile

[root@centos2 tidb-community-server-v5.0.1-linux-amd64]# ls /root/.tiup/storage/cluster/
audit  packages

a1node

root@centos1 ~ $ du -sh /root/.tiup/storage/cluster/clusters/tidb-test
236K    /root/.tiup/storage/cluster/clusters/tidb-test

root@centos1 ~ $ scp -r /root/.tiup/storage/cluster/clusters  root@192.168.1.116:/root/.tiup/storage/cluster/

b1 node:

[root@centos2 tidb-community-server-v5.0.1-linux-amd64]# tiup cluster list
Starting component `cluster`: /root/.tiup/components/cluster/v1.4.1/tiup-cluster list
Name       User    Version  Path                                            PrivateKey
----       ----    -------  ----                                            ----------
tidb-test  ucchip  v5.0.1   /root/.tiup/storage/cluster/clusters/tidb-test  /root/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa

Manually modificate b1 node's with a1 node's tiup copy, then b1 node colud tiup cluster list too.

Is this would have some issues, i mean a1 node(236K /root/.tiup/storage/cluster/clusters/tidb-test), some info will become; if some one day a1 down, b1 use old info operate tidb, will casue some troubles;

Auggie321 commented 3 years ago

All i knew, use cron job sync a1 tiup node .tidb dir data to b1(or more) per mins.

Official about tiup HA whether there is a better way, or is there, is that I missed it

TomShawn commented 3 years ago

@Auggie321 Thanks for your feedback. Unfortunately, this is a documentation repository dedicated to documentation issues ONLY. If you have found any TiDB doc issue, welcome to raise it in this repo. If you have any issue related to TiUP usage, please raise your issue at https://github.com/pingcap/tiup/issues. This is the quickest way to have your issue resolved. Thanks!

Auggie321 commented 3 years ago

@TomShawn Thank you. this issue could be closed now.