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.md
+40-1
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,8 @@ Available Commands:
49
49
50
50
Flags:
51
51
-h, --help help for cluster
52
+
--native-ssh Use the system's native SSH client
53
+
--wait-timeout int Timeout of waiting the operation
52
54
--ssh-timeout int Timeout in seconds to connect host via SSH, ignored for operations that don't need an SSH connection. (default 5)
53
55
-y, --yes Skip all confirmations and assumes 'yes'
54
56
```
@@ -351,6 +353,8 @@ Flags:
351
353
--transfer-timeout int Timeout in seconds when transferring PD and TiKV store leaders (default 300)
352
354
353
355
Global Flags:
356
+
--native-ssh Use the system's native SSH client
357
+
--wait-timeout int Timeout of waiting the operation
354
358
--ssh-timeout int Timeout in seconds to connect host via SSH, ignored for operations that don't need an SSH connection. (default 5)
355
359
-y, --yes Skip all confirmations and assumes 'yes'
356
360
```
@@ -409,6 +413,8 @@ Flags:
409
413
--transfer-timeout int Timeout in seconds when transferring PD and TiKV store leaders (default 300)
410
414
411
415
Global Flags:
416
+
--native-ssh Use the system's native SSH client
417
+
--wait-timeout int Timeout of waiting the operation
412
418
--ssh-timeout int Timeout in seconds to connect host via SSH, ignored for operations that don't need an SSH connection. (default 5)
413
419
-y, --yes Skip all confirmations and assumes 'yes'
414
420
```
@@ -459,6 +465,8 @@ Flags:
459
465
-r, --rename NAME Rename the imported cluster to NAME
460
466
461
467
Global Flags:
468
+
--native-ssh Use the system's native SSH client
469
+
--wait-timeout int Timeout of waiting the operation
462
470
--ssh-timeout int Timeout in seconds to connect host via SSH, ignored for operations that don't need an SSH connection. (default 5)
463
471
-y, --yes Skip all confirmations and assumes 'yes'
464
472
```
@@ -613,6 +621,37 @@ When running the checks, if the `--apply` flag is specified, the program automat
613
621
614
622
Environment checks are not necessary for deploying a cluster. For the production environment, it is recommended to perform environment checks and pass all check items before deployment. If not all the check items are passed, the cluster might be deployed and run normally, but the best performance might not be obtained.
615
623
624
+
## Use the system's native SSH client to connect to cluster
625
+
626
+
All operations above performed on the cluster machine use the SSH client embedded in TiUP to connect to the cluster and execute commands. However, in some scenarios, you might also need to use the SSH client native to the control machine system to perform such cluster operations. For example:
627
+
628
+
- To use a SSH plug-in for authentication
629
+
- To use a customized SSH client
630
+
631
+
Then you can use the `--native-ssh` command-line flag to enable the system-native command-line tool:
632
+
633
+
- Deploy a cluster: `tiup cluster deploy <cluster-name><version><topo> --native-ssh`
634
+
- Start a cluster: `tiup cluster start <cluster-name> --native-ssh`
635
+
- Upgrade a cluster: `tiup cluster upgrade ... --native-ssh`
636
+
637
+
You can add `--native-ssh`in all cluster operation commands above to use the system's native SSH client.
638
+
639
+
To avoid adding such a flag in every command, you can use the `TIUP_NATIVE_SSH` system variable to specify whether to use the local SSH client:
640
+
641
+
```sh
642
+
export TIUP_NATIVE_SSH=true
643
+
# or
644
+
export TIUP_NATIVE_SSH=1
645
+
# or
646
+
export TIUP_NATIVE_SSH=enable
647
+
```
648
+
649
+
If you specify this environment variable and `--native-ssh` at the same time, `--native-ssh` has higher priority.
650
+
651
+
> **Note:**
652
+
>
653
+
> During the process of cluster deployment, if you need to use a password for connection (`-p`) or `passphrase` is configured in the key file, you must ensure that `sshpass` is installed on the control machine; otherwise, a timeout error is reported.
654
+
616
655
## Migrate control machine and back up TiUP data
617
656
618
657
The TiUP data is stored in the `.tiup` directory in the user's home directory. To migrate the control machine, you can take the following steps to copy the `.tiup` directory to the corresponding target machine:
@@ -626,4 +665,4 @@ The TiUP data is stored in the `.tiup` directory in the user's home directory. T
626
665
627
666
>**Note:**
628
667
>
629
-
> It is recommended that you back up the `.tiup` directory regularly to avoid the loss of TiUP data caused by abnormal conditions, such as disk damage of the control machine.
668
+
> It is recommended that you back up the `.tiup` directory regularly to avoid the loss of TiUP data caused by abnormal conditions, such as disk damage of the control machine.
0 commit comments