From b03bae1630e71c30638f62ae62190104fcacc19d Mon Sep 17 00:00:00 2001 From: Aolin Date: Mon, 1 Apr 2024 15:54:48 +0800 Subject: [PATCH 1/4] tiup, tiproxy: add version flags to tiup cluster upgrade --- tiproxy/tiproxy-overview.md | 4 +- tiup/tiup-component-cluster-upgrade.md | 66 ++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/tiproxy/tiproxy-overview.md b/tiproxy/tiproxy-overview.md index 32eda9fb4040f..e0558f9a902df 100644 --- a/tiproxy/tiproxy-overview.md +++ b/tiproxy/tiproxy-overview.md @@ -55,7 +55,7 @@ It is recommended that you use TiProxy for the scenarios that TiProxy is suitabl ## Installation and usage -This section describes how to deploy and change TiProxy using TiUP. For how to deploy TiProxy using TiDB Operator in Kubernetes, see [TiDB Operator documentation](https://docs.pingcap.com/tidb-in-kubernetes/stable). +This section describes how to deploy and change TiProxy using TiUP. For how to deploy TiProxy using TiDB Operator in Kubernetes, see [TiDB Operator documentation](https://docs.pingcap.com/tidb-in-kubernetes/stable/deploy-tiproxy). ### Deploy TiProxy @@ -126,7 +126,7 @@ When using TiUP to change the TiProxy configuration, if the configuration item t When you deploy TiProxy, it is recommended to specify the version of TiProxy so that TiProxy will not be upgraded when you upgrade the TiDB cluster. -If you need to upgrade TiProxy, add [`--tiproxy-version`](/tiup/tiup-component-cluster-upgrade.md) in the upgrade command to specify the version of TiProxy: +If you need to upgrade TiProxy, add [`--tiproxy-version`](/tiup/tiup-component-cluster-upgrade.md#--tiproxy-version) in the upgrade command to specify the version of TiProxy: ```shell tiup cluster upgrade --tiproxy-version diff --git a/tiup/tiup-component-cluster-upgrade.md b/tiup/tiup-component-cluster-upgrade.md index 90699ec1607dc..e243b925d9971 100644 --- a/tiup/tiup-component-cluster-upgrade.md +++ b/tiup/tiup-component-cluster-upgrade.md @@ -44,12 +44,78 @@ tiup cluster upgrade [flags] - Data type: `BOOLEAN` - Default: false +### --ignore-version-check + +- Before upgrading, TiUP checks whether the target version is greater than or equal to the current version. To skip this check, you can use the `--ignore-version-check` option. +- Data type: `BOOLEAN` +- This option is disabled by default with the `false` value. To enable this option, add this option to the command, and either pass the `true` value or do not pass any value. + ### --offline - Declares that the current cluster is not running. When this option is specified, TiUP does not evict the service leader to another node or restart the service, but only replaces the binary files of the cluster components. - Data type: `BOOLEAN` - This option is disabled by default with the `false` value. To enable this option, add this option to the command, and either pass the `true` value or do not pass any value. +### --pd-version + +- Specifies the version of PD. If this option is set, the version of PD will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of PD remains consistent with the cluster version. + +### --tikv-version + +- Specifies the version of TiKV. If this option is set, the version of TiKV will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of TiKV remains consistent with the cluster version. + +### --tikv-cdc-version + +- Specifies the version of TiKV CDC. If this option is set, the version of TiKV CDC will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of TiKV CDC remains consistent with the cluster version. + +### --tiflash-version + +- Specifies the version of TiFlash. If this option is set, the version of TiFlash will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of TiFlash remains consistent with the cluster version. + +### --cdc-version + +- Specifies the version of TiCDC. If this option is set, the version of TiCDC will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of TiCDC remains consistent with the cluster version. + +### --tiproxy-version + +- Specifies the version of TiProxy. If this option is set, the version of TiProxy will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of TiProxy remains consistent with the cluster version. + +### --tidb-dashboard-version + +- Specifies the version of TiDB Dashboard. If this option is set, the version of TiDB Dashboard will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of TiDB Dashboard remains consistent with the cluster version. + +### --alertmanager-version + +- Specifies the version of alert manager. If this option is set, the version of alert manager will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of alert manager remains consistent with the cluster version. + +### --blackbox-exporter-version + +- Specifies the version of Blackbox Exporter. If this option is set, the version of Blackbox Exporter will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of Blackbox Exporter remains consistent with the cluster version. + +### --node-exporter-version + +- Specifies the version of Node Exporter. If this option is set, the version of Node Exporter will no longer be consistent with the cluster version. +- Data type: `STRINGS` +- If this option is not set, the version of Node Exporter remains consistent with the cluster version. + ### -h, --help - Prints the help information. From ce1df5ef6564bd0bd5522acb9772ac67e98c500f Mon Sep 17 00:00:00 2001 From: Aolin Date: Thu, 11 Apr 2024 15:45:59 +0800 Subject: [PATCH 2/4] fix config require-backend-tls --- tiproxy/tiproxy-configuration.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tiproxy/tiproxy-configuration.md b/tiproxy/tiproxy-configuration.md index 7fd480cef1bfb..e56ec1ad61752 100644 --- a/tiproxy/tiproxy-configuration.md +++ b/tiproxy/tiproxy-configuration.md @@ -84,12 +84,6 @@ Configuration for SQL port. + Possible values: ``, `v2` + Enable the [PROXY protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) on the port. By enabling the PROXY protocol, TiProxy can pass the real client IP address to TiDB. `v2` indicates using the PROXY protocol version 2, and `` indicates disabling the PROXY protocol. If the PROXY protocol is enabled on TiProxy, you need to also enable the [PROXY protocol](/tidb-configuration-file.md#proxy-protocol) on the TiDB server. -#### `require-backend-tls` - -+ Default value: `true` -+ Support hot-reload: yes, but only for new connections -+ Require TLS between TiProxy and TiDB servers. If the TiDB server doesn't support TLS, clients will report an error when connecting to TiProxy. - ### api Configurations for HTTP gateway. @@ -194,6 +188,12 @@ For server TLS object: A client TLS object. It is used to access TiDB or PD. +#### `require-backend-tls` + ++ Default value: `false` ++ Support hot-reload: yes, but only for new connections ++ Require TLS between TiProxy and TiDB servers. If the TiDB server doesn't support TLS, clients will report an error when connecting to TiProxy. + #### `sql-tls` A client TLS object. It is used to access TiDB SQL port (4000). From 1d6815d522bb84b6f293773f5d19c60682b3ea5a Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 16 Apr 2024 11:37:57 +0800 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: xixirangrang --- tiproxy/tiproxy-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiproxy/tiproxy-configuration.md b/tiproxy/tiproxy-configuration.md index e56ec1ad61752..3544073e7c997 100644 --- a/tiproxy/tiproxy-configuration.md +++ b/tiproxy/tiproxy-configuration.md @@ -192,7 +192,7 @@ A client TLS object. It is used to access TiDB or PD. + Default value: `false` + Support hot-reload: yes, but only for new connections -+ Require TLS between TiProxy and TiDB servers. If the TiDB server doesn't support TLS, clients will report an error when connecting to TiProxy. ++ Require TLS between TiProxy and TiDB servers. If the TiDB server does not support TLS, clients will report an error when connecting to TiProxy. #### `sql-tls` From 4dc5043b38510bbbe938790e583f4a1723c9c78f Mon Sep 17 00:00:00 2001 From: Aolin Date: Tue, 16 Apr 2024 11:39:40 +0800 Subject: [PATCH 4/4] update -h --- tiup/tiup-component-cluster-upgrade.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-upgrade.md b/tiup/tiup-component-cluster-upgrade.md index e243b925d9971..bd192ec8ddb42 100644 --- a/tiup/tiup-component-cluster-upgrade.md +++ b/tiup/tiup-component-cluster-upgrade.md @@ -120,7 +120,7 @@ tiup cluster upgrade [flags] - Prints the help information. - Data type: `BOOLEAN` -- Default: false +- This option is disabled by default with the `false` value. To enable this option, add this option to the command, and either pass the `true` value or do not pass any value. ## Output