From fa1aba3afdfbf35d226bd7868c120c3ddc5cea2c Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 18 Jul 2018 14:06:54 +0800 Subject: [PATCH 1/2] op-guide: use tidb user with sudo privilege to run deploy_ntp.yml --- op-guide/ansible-deployment.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/op-guide/ansible-deployment.md b/op-guide/ansible-deployment.md index 212de88acb21b..2c280a7b739fd 100644 --- a/op-guide/ansible-deployment.md +++ b/op-guide/ansible-deployment.md @@ -187,20 +187,22 @@ Make sure you have logged in to the Control Machine using the `tidb` user accoun 2. Run the following command and input the `root` user account password of your target machines. ```bash - $ ansible-playbook -i hosts.ini create_users.yml -k + $ ansible-playbook -i hosts.ini create_users.yml -u root -k ``` This step creates the `tidb` user account on the target machines, configures the sudo rules and the SSH mutual trust between the Control Machine and the target machines. +> Configure the SSH mutual trust and sudo without password manually, see [How to manually configure the SSH mutual trust and sudo without password](#how-to-manually-configure-the-ssh-mutual-trust-and-sudo-without-password) + ## Step 6: Install the NTP service on the target machines > **Note:** If the time and time zone of all your target machines are same, the NTP service is on and is normally synchronizing time, you can ignore this step. See [How to check whether the NTP service is normal](#how-to-check-whether-the-ntp-service-is-normal). -Make sure you have logged in to the Control Machine using the `tidb` user account, run the following command, and input the `root` password of your target machines as prompted: +Make sure you have logged in to the Control Machine using the `tidb` user account, run the following command: ```bash $ cd /home/tidb/tidb-ansible -$ ansible-playbook -i hosts.ini deploy_ntp.yml -k +$ ansible-playbook -i hosts.ini deploy_ntp.yml -u tidb -b ``` The NTP service is installed and started using the software repository that comes with the system on the target machines. The default NTP server list in the installation package is used. The related `server` parameter is in the `/etc/ntp.conf` configuration file. @@ -258,7 +260,7 @@ As the above code shows, the current mode is `powersave` in this example. - You can also run the following command to set the mode on the target machine in batches: ``` - $ ansible -i hosts.ini all -m shell -a "cpupower frequency-set --governor performance" -b + $ ansible -i hosts.ini all -m shell -a "cpupower frequency-set --governor performance" -u tidb -b ``` ## Step 8: Mount the data disk ext4 filesystem with options on the target machines From a1b1fd25916b0d4c34a526328eb1d8c4c278225c Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 18 Jul 2018 14:14:06 +0800 Subject: [PATCH 2/2] fix grammar --- op-guide/ansible-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-guide/ansible-deployment.md b/op-guide/ansible-deployment.md index 2c280a7b739fd..b658fb254a922 100644 --- a/op-guide/ansible-deployment.md +++ b/op-guide/ansible-deployment.md @@ -192,7 +192,7 @@ Make sure you have logged in to the Control Machine using the `tidb` user accoun This step creates the `tidb` user account on the target machines, configures the sudo rules and the SSH mutual trust between the Control Machine and the target machines. -> Configure the SSH mutual trust and sudo without password manually, see [How to manually configure the SSH mutual trust and sudo without password](#how-to-manually-configure-the-ssh-mutual-trust-and-sudo-without-password) +> To configure the SSH mutual trust and sudo without password manually, see [How to manually configure the SSH mutual trust and sudo without password](#how-to-manually-configure-the-ssh-mutual-trust-and-sudo-without-password) ## Step 6: Install the NTP service on the target machines