Skip to content

Commit 2fe2ade

Browse files
authored
op-guide: use tidb user with sudo privilege to run deploy_ntp.yml (#544)
1 parent 451ccd6 commit 2fe2ade

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

op-guide/ansible-deployment.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,20 +187,22 @@ Make sure you have logged in to the Control Machine using the `tidb` user accoun
187187
2. Run the following command and input the `root` user account password of your target machines.
188188
189189
```bash
190-
$ ansible-playbook -i hosts.ini create_users.yml -k
190+
$ ansible-playbook -i hosts.ini create_users.yml -u root -k
191191
```
192192
193193
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.
194194
195+
> 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)
196+
195197
## Step 6: Install the NTP service on the target machines
196198
197199
> **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).
198200
199-
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:
201+
Make sure you have logged in to the Control Machine using the `tidb` user account, run the following command:
200202
201203
```bash
202204
$ cd /home/tidb/tidb-ansible
203-
$ ansible-playbook -i hosts.ini deploy_ntp.yml -k
205+
$ ansible-playbook -i hosts.ini deploy_ntp.yml -u tidb -b
204206
```
205207

206208
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.
258260
- You can also run the following command to set the mode on the target machine in batches:
259261
260262
```
261-
$ ansible -i hosts.ini all -m shell -a "cpupower frequency-set --governor performance" -b
263+
$ ansible -i hosts.ini all -m shell -a "cpupower frequency-set --governor performance" -u tidb -b
262264
```
263265
264266
## Step 8: Mount the data disk ext4 filesystem with options on the target machines

0 commit comments

Comments
 (0)