Tidb 集群在线滚动升级

参考链接

https://pingcap.com/docs-cn/op-guide/ansible-deployment/#%E6%BB%9A%E5%8A%A8%E5%8D%87%E7%BA%A7


[root@tidb1 tidb-ansible]# mysql -h 192.168.137.161 -uroot -P 4000 -D mysql 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A


Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.1-TiDB-v1.0.8-1-gaacba4a MySQL Community Server (Apache License 2.0)


Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> 


[root@tidb1 tidb-ansible]# pwd
/root/tidb-ansible


vim inventory.ini   

 将tidb_version = v1.0.8 修改为如下的版本

tidb_version = v2.0.0-rc.4

rm -rf downloads/*


ansible-playbook local_prepare.yml  

TIdb 升级的过程中 无需关闭TIDB 集群

ansible-playbook rolling_update.yml

[root@tidb1 tidb-ansible]# mysql -h 192.168.137.161 -uroot -P 4000 -D mysql  
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.10-TiDB-v2.0.0-rc.4 MySQL Community Server (Apache License 2.0)


Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql> 

你可能感兴趣的:(TIDB)