TiDB DM工具通过ansible 部署实战

1.安装依赖的软件包:
# yum -y install epel-release git curl sshpass python-pip

2.
# useradd -m -d /home/tidb tidb
# passwd tidb

# visudo
tidb ALL=(ALL) NOPASSWD: ALL

# su - tidb
$$  ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/tidb/.ssh/id_rsa): 
/home/tidb/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/tidb/.ssh/id_rsa.
Your public key has been saved in /home/tidb/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:ZlDNTiB1jyKdhEN4nytysl7DrIB4NFN+VoO8QajQoE8 tidb@node1
The key's randomart image is:
+---[RSA 2048]----+
|.o   ++o=+.      |
|o . oo+* o+o     |
|..E...*o*+. .    |
| o.o   *oo.      |
|  = . + S.       |
|.o oo=oo.        |
|o o  ==.         |
| . ..o .         |
|   .o            |
+----[SHA256]-----+

$cd /home/tidb
$ wget http://download.pingcap.org/dm-ansible-latest.tar.gz


$ tar -xzvf dm-ansible-latest.tar.gz
$ mv dm-ansible-latest dm-ansible
$ cd /home/tidb/dm-ansible
$ sudo pip install -r ./requirements.txt


$ ansible --version
ansible 2.6.3


软件下载:
$ ansible-playbook local_prepare.yml


配置:


 

你可能感兴趣的:(TiDB)