From 33c9240760c007fd87abc2b5e6b4f78734e6a5fa Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 23 Dec 2024 16:06:27 +0800 Subject: [PATCH 1/4] This is an automated cherry-pick of #19769 Signed-off-by: ti-chi-bot --- tiup/tiup-playground.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tiup/tiup-playground.md b/tiup/tiup-playground.md index 9ae1487626fa0..9e60c5ad21952 100644 --- a/tiup/tiup-playground.md +++ b/tiup/tiup-playground.md @@ -133,3 +133,43 @@ You can specify a `pid` in the `tiup playground scale-in` command to scale in th ```shell tiup playground scale-in --pid 86526 ``` +<<<<<<< HEAD +======= + +## Deploy TiProxy + +[TiProxy](/tiproxy/tiproxy-overview.md) is the official proxy component from PingCAP, placed between the client and the TiDB server to provide load balancing, connection persistence, service discovery, and other features for TiDB. + +Starting from TiUP v1.14.1, you can deploy TiProxy for your cluster using TiUP Playground, as in the following example: + +```shell +tiup playground v8.5.0 --tiproxy 1 +``` + +For more information about TiProxy deployment and usage, see [TiProxy documentation](/tiproxy/tiproxy-overview.md#installation-and-usage). + +In the playground component, TiProxy-related command-line flags are as follows: + +```bash +Flags: + --tiproxy int The number of TiProxy nodes in the cluster. If not specified, TiProxy is not deployed. + --tiproxy.binpath string TiProxy instance binary path. + --tiproxy.config string TiProxy instance configuration file. + --tiproxy.host host Playground TiProxy host. If not provided, TiProxy will still use host flag as its host. + --tiproxy.port int Playground TiProxy port. If not provided, TiProxy will use 6000 as its port. + --tiproxy.timeout int TiProxy maximum wait time in seconds for starting. 0 means no limit (default 60). +``` + +## Deploy PD microservices + +Starting from v8.2.0, [PD microservice mode](/pd-microservices.md) (experimental) can be deployed using TiUP. You can deploy the `tso` microservice and `scheduling` microservice for your cluster using TiUP Playground as follows: + +```shell +tiup playground v8.5.0 --pd.mode ms --pd 3 --tso 2 --scheduling 2 +``` + +- `--pd.mode`: setting it to `ms` means enabling the microservice mode for PD. +- `--pd `: specifies the number of APIs for PD microservices. It must be at least `1`. +- `--tso `: specifies the number of instances to be deployed for the `tso` microservice. +- `--scheduling `: specifies the number of instances to be deployed for the `scheduling` microservice. +>>>>>>> 0015d117d5 (tiup-playground: add info about TiProxy (#19769)) From 3276bcd243d6fdb2034baac1271127258796dae4 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 23 Dec 2024 16:19:47 +0800 Subject: [PATCH 2/4] Update tiup-playground.md --- tiup/tiup-playground.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/tiup/tiup-playground.md b/tiup/tiup-playground.md index 9e60c5ad21952..5943c30a757b6 100644 --- a/tiup/tiup-playground.md +++ b/tiup/tiup-playground.md @@ -133,8 +133,6 @@ You can specify a `pid` in the `tiup playground scale-in` command to scale in th ```shell tiup playground scale-in --pid 86526 ``` -<<<<<<< HEAD -======= ## Deploy TiProxy @@ -143,7 +141,7 @@ tiup playground scale-in --pid 86526 Starting from TiUP v1.14.1, you can deploy TiProxy for your cluster using TiUP Playground, as in the following example: ```shell -tiup playground v8.5.0 --tiproxy 1 +tiup playground v8.1.2 --tiproxy 1 ``` For more information about TiProxy deployment and usage, see [TiProxy documentation](/tiproxy/tiproxy-overview.md#installation-and-usage). @@ -159,17 +157,3 @@ Flags: --tiproxy.port int Playground TiProxy port. If not provided, TiProxy will use 6000 as its port. --tiproxy.timeout int TiProxy maximum wait time in seconds for starting. 0 means no limit (default 60). ``` - -## Deploy PD microservices - -Starting from v8.2.0, [PD microservice mode](/pd-microservices.md) (experimental) can be deployed using TiUP. You can deploy the `tso` microservice and `scheduling` microservice for your cluster using TiUP Playground as follows: - -```shell -tiup playground v8.5.0 --pd.mode ms --pd 3 --tso 2 --scheduling 2 -``` - -- `--pd.mode`: setting it to `ms` means enabling the microservice mode for PD. -- `--pd `: specifies the number of APIs for PD microservices. It must be at least `1`. -- `--tso `: specifies the number of instances to be deployed for the `tso` microservice. -- `--scheduling `: specifies the number of instances to be deployed for the `scheduling` microservice. ->>>>>>> 0015d117d5 (tiup-playground: add info about TiProxy (#19769)) From f2ac29b736d69733ae043276cf6f14fec4fe0952 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 23 Dec 2024 22:35:23 +0800 Subject: [PATCH 3/4] Update tiup-playground.md --- tiup/tiup-playground.md | 43 +++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/tiup/tiup-playground.md b/tiup/tiup-playground.md index 5943c30a757b6..975ec27e0966c 100644 --- a/tiup/tiup-playground.md +++ b/tiup/tiup-playground.md @@ -138,22 +138,35 @@ tiup playground scale-in --pid 86526 [TiProxy](/tiproxy/tiproxy-overview.md) is the official proxy component from PingCAP, placed between the client and the TiDB server to provide load balancing, connection persistence, service discovery, and other features for TiDB. -Starting from TiUP v1.14.1, you can deploy TiProxy for your cluster using TiUP Playground, as in the following example: +Starting from TiUP v1.15.0, you can deploy TiProxy for your cluster using TiUP Playground. -```shell -tiup playground v8.1.2 --tiproxy 1 -``` +1. Create a `tidb.toml` file and add the following configuration: -For more information about TiProxy deployment and usage, see [TiProxy documentation](/tiproxy/tiproxy-overview.md#installation-and-usage). + ``` + graceful-wait-before-shutdown=15 + ``` -In the playground component, TiProxy-related command-line flags are as follows: + This configuration item controls the duration (in seconds) that TiDB waits before shutting down the server, avoiding client disconnections during cluster scaling-in operations. -```bash -Flags: - --tiproxy int The number of TiProxy nodes in the cluster. If not specified, TiProxy is not deployed. - --tiproxy.binpath string TiProxy instance binary path. - --tiproxy.config string TiProxy instance configuration file. - --tiproxy.host host Playground TiProxy host. If not provided, TiProxy will still use host flag as its host. - --tiproxy.port int Playground TiProxy port. If not provided, TiProxy will use 6000 as its port. - --tiproxy.timeout int TiProxy maximum wait time in seconds for starting. 0 means no limit (default 60). -``` +2. Start the TiDB cluster: + + ```shell + tiup playground v8.1.1 --tiproxy 1 --db.config tidb.toml + ``` + + In the playground component, TiProxy-related command-line flags are as follows: + + ```bash + Flags: + --tiproxy int The number of TiProxy nodes in the cluster. If not specified, TiProxy is not deployed. + --tiproxy.binpath string TiProxy instance binary path. + --tiproxy.config string TiProxy instance configuration file. + --tiproxy.host host Playground TiProxy host. If not provided, TiProxy will still use host flag as its host. + --tiproxy.port int Playground TiProxy port. If not provided, TiProxy will use 6000 as its port. + --tiproxy.timeout int TiProxy maximum wait time in seconds for starting. 0 means no limit (default 60). + --tiproxy.version string The version of TiProxy. If not specified, the latest version of TiProxy is deployed. + ``` + +For more information about deploying and using TiProxy, see [TiProxy installation and usage](/tiproxy/tiproxy-overview.md#installation-and-usage). + +To use the TiProxy client program `tiproxyctl`, see [Install TiProxy Control](/tiproxy/tiproxy-command-line-flags.md#install-tiproxy-control). From ac7a052010f73a7678003d9f1b3bae5aa16ea36e Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 24 Dec 2024 14:44:02 +0800 Subject: [PATCH 4/4] Update tiup/tiup-playground.md --- tiup/tiup-playground.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/tiup/tiup-playground.md b/tiup/tiup-playground.md index 975ec27e0966c..6c3b65311753b 100644 --- a/tiup/tiup-playground.md +++ b/tiup/tiup-playground.md @@ -168,5 +168,3 @@ Starting from TiUP v1.15.0, you can deploy TiProxy for your cluster using TiUP P ``` For more information about deploying and using TiProxy, see [TiProxy installation and usage](/tiproxy/tiproxy-overview.md#installation-and-usage). - -To use the TiProxy client program `tiproxyctl`, see [Install TiProxy Control](/tiproxy/tiproxy-command-line-flags.md#install-tiproxy-control).