You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tiup/tiup-cluster-no-sudo-mode.md
+41-7Lines changed: 41 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -73,12 +73,12 @@ This document focuses on how to use the TiUP no-sudo Mode to deploy a cluster.
73
73
74
74
2. Edit the topology file.
75
75
76
-
Compared with the previous mode, TiUP using no-sudo mode needs to add `systemd_mode: "user"`to topology.yaml global block. If this parameter is not set, its default value is `system`, indicating that sudo permissions are required. In addition, no-sudo mode cannot use `/data` as `deploy_dir` and `data_dir` because there will be permission issues, and you need to choose a path that ordinary users can access. The example below uses relative paths and the final paths used are `/home/tidb/data/tidb-deploy` and `/home/tidb/data/tidb-data`.
76
+
Compared with the previous mode, TiUP using no-sudo mode needs to add the line `systemd_mode: "user"`in the global block of topology.yaml. The `systemd_mode` parameter is used to indicate whether to use systemd user mode. If this parameter is not set, its default value is `system`, indicating that sudo permissions are required. In addition, no-sudo mode cannot use `/data` as `deploy_dir` and `data_dir` because there will be permission issues, and you need to choose a path that ordinary users can access. The example below uses relative paths and the final paths used are `/home/tidb/data/tidb-deploy` and `/home/tidb/data/tidb-data`.
77
77
The rest is consistent with the old version.
78
78
79
79
{{< copyable "shell-regular">}}
80
80
81
-
```shell
81
+
```yaml
82
82
global:
83
83
user: "tidb"
84
84
systemd_mode: "user"
@@ -89,9 +89,9 @@ This document focuses on how to use the TiUP no-sudo Mode to deploy a cluster.
89
89
...
90
90
```
91
91
92
-
## Manual repair failed check items
92
+
## Manually repair failed check items
93
93
94
-
Executing `tiup cluster check topology.yaml` will display some failed check items, examples:
94
+
Executing `tiup cluster check topology.yaml --user tidb` will display some failed check items, examples:
95
95
96
96
{{< copyable "shell-regular">}}
97
97
@@ -112,7 +112,7 @@ Node Check Result Message
112
112
192.168.124.27 service Fail service firewalld is running but should be stopped
113
113
```
114
114
115
-
Since in no-sudo mode, the `tidb` user does not have sudo permissions, executing `tiup cluster check topology.yaml --apply` will not be able to automatically repair failed check items due to insufficient permissions. Therefore, some operations need to be performed manually on the deployment machines using the `root` user.
115
+
Since in no-sudo mode, the `tidb` user does not have sudo permissions, executing `tiup cluster check topology.yaml --apply --user tidb` will not be able to automatically repair failed check items due to insufficient permissions. Therefore, some operations need to be performed manually on the deployment machines using the `root` user.
116
116
117
117
1. Install the numactl tool
118
118
@@ -177,8 +177,10 @@ Since in no-sudo mode, the `tidb` user does not have sudo permissions, executing
177
177
cat << EOF >>/etc/security/limits.conf
178
178
tidb soft nofile 1000000
179
179
tidb hard nofile 1000000
180
-
tidb soft stack 32768
181
-
tidb hard stack 32768
180
+
tidb soft stack 32768
181
+
tidb hard stack 32768
182
+
tidb soft core unlimited
183
+
tidb hard core unlimited
182
184
EOF
183
185
```
184
186
@@ -192,6 +194,38 @@ In order to use the `tidb` user prepared in the above steps and avoid re-creatin
Copy file name to clipboardExpand all lines: tiup/tiup-cluster-topology-reference.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,8 @@ The `global` section corresponds to the cluster's global configuration and has t
42
42
43
43
-`group`: The user group to which a user belongs. It is specified when the user is created. The value defaults to that of the `<user>` field. If the specified group does not exist, it is automatically created.
44
44
45
+
-`systemd_mode`: The systemd mode used on the target machine during cluster deployment. The default value is `system`. If it is set to `user`, it means that sudo permissions are not used on the target machine, that is, the TiUP no-sudo mode is used.
46
+
45
47
-`ssh_port`: Specifies the SSH port to connect to the target machine for operations. The default value is `22`.
46
48
47
49
-`enable_tls`: Specifies whether to enable TLS for the cluster. After TLS is enabled, the generated TLS certificate must be used for connections between components or between the client and the component. The default value is `false`.
0 commit comments