From 0399ddc2ad814e44a37a1337dab6b82c28a655af Mon Sep 17 00:00:00 2001 From: Ran Date: Fri, 17 Apr 2020 13:32:43 +0800 Subject: [PATCH 1/9] how-to: add quick-start-with-tidb doc --- TOC.md | 1 + how-to/get-started/quick-start-with-tidb.md | 320 ++++++++++++++++++++ 2 files changed, 321 insertions(+) create mode 100644 how-to/get-started/quick-start-with-tidb.md diff --git a/TOC.md b/TOC.md index a4f4eaca54ddf..47ef050477b65 100644 --- a/TOC.md +++ b/TOC.md @@ -36,6 +36,7 @@ + How-to + Get Started + Start a Cluster + - [Quick Start with TiDB](/how-to/get-started/quick-start-with-tidb.md) - [From Binary](/how-to/get-started/deploy-tidb-from-binary.md) - [From Homebrew](/how-to/get-started/deploy-tidb-from-homebrew.md) - [From DBdeployer](/how-to/get-started/deploy-tidb-from-dbdeployer.md) diff --git a/how-to/get-started/quick-start-with-tidb.md b/how-to/get-started/quick-start-with-tidb.md new file mode 100644 index 0000000000000..d7ef51cc60900 --- /dev/null +++ b/how-to/get-started/quick-start-with-tidb.md @@ -0,0 +1,320 @@ +--- +title: Quick Start with TiDB +summary: Learn how to quick start your first TiDB cluster and try out the features. +category: how-to +--- + +# Quick Start with TiDB + +This document describes how to try out TiDB, a distributed SQL database. You can choose any of the following three methods to start your first TiDB cluster: + +- [Try out TiDB with one click using TiDB-Wasm](#try-out-tidb-with-one-click-using-tidb-wasm) +- [Deploy a local test environment using TiUP Playground](#deploy-a-local-test-environment-using-tiup-playground) +- [Deploy a quasi-production test environment on a single machine using TiUP cluster](#deploya-quasi-production-test-environment-on-a-single-machine-using-tiup-cluster) + +> **Note:** +> +> It is not recommended to deploy TiDB for production environments with the above three methods. Instead, you can [deploy TiDB using TiUP](/how-to/deploy/orchestrated/tiup.md). + +## Try out TiDB with one click using TiDB-Wasm + +- Scenario: Have a first taste on the basic features of TiDB, such as syntax and compatibility. +- Time required: Instant + +TiDB-Wasm is a TiDB cluster running in the browser. You can use TiDB simply by opening a web page and perform basic operations such as executing SQL statements and verifying compatibility. + +Click to [try TiDB-Wasm](https://tour.pingcap.com). The TiDB cluster will be built in the memory, expectedly in around 10 seconds. + +## Deploy a local test environment using TiUP Playground + +- Scenario: Quickly deploy a TiDB cluster on a local Mac or Linux OS machine. You can see the basic architecture of TiDB and how TiDB, TiKV, PD, monitoring, and other components run in a TiDB cluster. +- Time required: 1 minute + +As a distributed system, a basic TiDB test cluster usually consists of 2 TiDB instances, 3 TiKV instances, and 3 PD instances. With TiUP Playground, you can quickly build the above test cluster by taking the following steps: + +1. Download and install TiUP: + + {{< copyable "shell-regular" >}} + + ```shell + curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh + ``` + +2. Declare the global environment variable: + + {< copyable "shell-regular" >}} + + ```shell + source .bash_profile + ``` + + > **Note:** + > + > After the installation, TiUP gives the absolute path of the corresponding `profile` file. You need to modify the above `source` command according to the path. + +3. Install TiUP Playground: + + {{< copyable "shell-regular" >}} + + ```shell + tiup install playground + ``` + + If you have installed TiUP Playground before, execute the following command to upgrade it to the latest version: + + {{< copyable "shell-regular" >}} + + ```shell + tiup update playground + ``` + +4. Execute the following command in the current session to start the cluster: + + - If you want to start a TiDB cluster of the latest version with 1 TiDB instance, 1 TiKV instance, and 1 PD instance, run the following command: + + {{< copyable "shell-regular" >}} + + ```shell + tiup playground + ``` + + - If you want to specify the version and the number of the component instances, run the following command: + + {{< copyable "shell-regular" >}} + + ```shell + tiup playground v4.0.0-rc --db 2 --pd 3 --kv 3 --monitor + ``` + + The command downloads a v4.0.0-rc cluster to the local machine and starts it. + + `--monitor` means that the monitoring component will also be deployed. + + The execution results show the access methods of the cluster: + + ```log + CLUSTER START SUCCESSFULLY, Enjoy it ^-^ + To connect TiDB: mysql --host 127.0.0.1 --port 4000 -u root + To connect TiDB: mysql --host 127.0.0.1 --port 4001 -u root + To view the dashboard: http://127.0.0.1:2379/dashboard + To view the monitor: http://127.0.0.1:9090 + ``` + +5. Start a new session to access TiDB: + + {{< copyable "shell-regular" >}} + + ```shell + mysql --host 127.0.0.1 --port 4000 -u root + ``` + +6. Access the Prometheus dashboard of TiDB at . + +7. Access the TiDB Dashboard at . The default username is `root`, with an empty password. + +8. After the test, you can clean the cluster by taking the following steps: + + 1. Stop the process by pressing `ctrl-c`. + + 2. Run the following command: + + {{< copyable "shell-regular" >}} + + ```shell + tiup clean --all + ``` + +## Deploy a quasi-production test environment on a single machine using TiUP cluster + +- Scenario: Experience a smallest TiDB cluster with the complete topology and simulate the production deployment steps on a single Linux server. +- Time required: 10 minutes + +This section describes how to deploy a TiDB cluster using a YAML file of the smallest topology in TiUP. + +### Prepare + +Prepare a deployment machine that meets the following requirements: + +- CentOS 7.3 or a later version is installed +- The Linux OS has access to the Internet, which can be used to download TiDB and related software installation packages + +The smallest TiDB topology is as follows: + +| Instance | Number | IP | Configuration | +|:-- | :-- | :-- | :-- | +| TiKV | 3 | 10.0.1.1
10.0.1.1
10.0.1.1 | Avoid conflict between the port and the directory | +| TiDB | 1 | 10.0.1.1 | The default port
Global directory configuration | +| PD | 1 | 10.0.1.1 | The default port
Global directory configuration | +| TiFlash | 1 | 10.0.1.1 | The default port
Global directory configuration | +| Monitor | 1 | 10.0.1.1 | The default port
Global directory configuration | + +Other requirements for the deployment machine: + +- Know the root user password +- Stop the firewall service of the deployment machine, or open the port needed by the TiDB cluster nodes +- Currently, TiUP only supports deploying TiDB on the x86_64 (AMD64) architecture (the ARM architecture will be supported in TiDB 4.0 GA): + + - It is recommended to use CentOS 7.3 or later versions on AMD64 + - It is recommended to use CentOS 7.6 1810 on ARM + +### Deploy + +> **Note:** +> +> You can log in to the host as any ordinary user or the root user of the Linux OS. The following steps use the root user as an example. + +1. Download and install TiUP: + + {{< copyable "shell-regular" >}} + + ```shell + curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh + ``` + +2. Install the cluster component of TiUP: + + {{< copyable "shell-regular" >}} + + ```shell + tiup cluster + ``` + +3. If the TiUP cluster is already installed on the machine, update the software version: + + {{< copyable "shell-regular" >}} + + ```shell + tiup update cluster + ``` + +4. Use the root user access to increase the connection limit of the `sshd` service. This is because TiUP needs to simulate deployment on multiple machines. + + 1. Modify `/etc/ssh/sshd_config`, and set `MaxSessions` to `20`. + 2. Restart the `sshd` service: + + {{< copyable "shell-regular" >}} + + ```shell + service sshd restart + ``` + +5. Create and start the cluster: + + Edit the configuration file according to the following template, and name it as `topology.yaml`: + + {{< copyable "shell-regular" >}} + + ```yaml + # # Global variables are applied to all deployments and as the default value of + # # them if the specific deployment value missing. + + global: + user: "tidb" + ssh_port: 22 + deploy_dir: "/tidb-deploy" + data_dir: "/tidb-data" + + # # Monitored variables are used to all the machine + monitored: + node_exporter_port: 9100 + blackbox_exporter_port: 9115 + + server_configs: + tidb: + log.slow-threshold: 300 + tikv: + readpool.storage.use-unified-pool: true + readpool.coprocessor.use-unified-pool: true + pd: + replication.enable-placement-rules: true + tiflash: + logger.level: "info" + + pd_servers: + - host: 10.0.1.1 + + tidb_servers: + - host: 10.0.1.1 + + tikv_servers: + - host: 10.0.1.1 + port: 20160 + status_port: 20180 + + - host: 10.0.1.1 + port: 20161 + status_port: 20181 + + - host: 10.0.1.1 + port: 20162 + status_port: 20182 + + tiflash_servers: + - host: 10.0.1.1 + + monitoring_servers: + - host: 10.0.1.1 + + grafana_servers: + - host: 10.0.1.1 + ``` + + - `user: "tidb"`: Use the `tidb` system user to perform the internal management of the cluster. By default, use port 22 to log in to the target machine via SSH. + - `replication.enable-placement-rules`: This PD parameter is set to ensure that TiFlash runs normally. + - `host`: The IP of the deployment machine. + +6. Execute the cluster deployment command: + + {{< copyable "shell-regular" >}} + + ```shell + tiup cluster deploy ./topo.yaml --user root + ``` + + - ``: Set the cluster name + - ``: Set the cluster version. Choose the TiDB version currently supported by running the `tiup list tidb --refresh` command + + Enter "y" and the root password to complete the deployment: + + ```log + Do you want to continue? [y/N]: y + Input SSH password: + ``` + +7. Start the cluster: + + {{< copyable "shell-regular" >}} + + ```shell + tiup cluster start + ``` + +8. Access the cluster: + + - Access TiDB. The password is empty: + + {{< copyable "shell-regular" >}} + + ```shell + mysql -h 10.0.1.1 -P 4000 -u root + ``` + + - Access the Grafana monitoring dashboard at . The default username and password are both `admin`. + + - Access the TiDB Dashboard at . The default username is `root`, and the password is empty. + + - To view the currently deployed cluster list, run the following command: + + {{< copyable "shell-regular" >}} + + ```shell + tiup cluster list + ``` + + - To view the cluster topology and status, run the following command: + + {{< copyable "shell-regular" >}} + + ```shell + tiup cluster display + ``` From 5b7592c814a97be0a7856f1edb59515463778668 Mon Sep 17 00:00:00 2001 From: Ran Date: Fri, 17 Apr 2020 15:55:39 +0800 Subject: [PATCH 2/9] test markdownlint --- how-to/get-started/quick-start-with-tidb.md | 1 - 1 file changed, 1 deletion(-) diff --git a/how-to/get-started/quick-start-with-tidb.md b/how-to/get-started/quick-start-with-tidb.md index d7ef51cc60900..a86e0f1f393be 100644 --- a/how-to/get-started/quick-start-with-tidb.md +++ b/how-to/get-started/quick-start-with-tidb.md @@ -3,7 +3,6 @@ title: Quick Start with TiDB summary: Learn how to quick start your first TiDB cluster and try out the features. category: how-to --- - # Quick Start with TiDB This document describes how to try out TiDB, a distributed SQL database. You can choose any of the following three methods to start your first TiDB cluster: From dfdac1253038aa9782710d1371ece2029a488384 Mon Sep 17 00:00:00 2001 From: Ran Date: Fri, 17 Apr 2020 15:57:58 +0800 Subject: [PATCH 3/9] revert the change --- how-to/get-started/quick-start-with-tidb.md | 1 + 1 file changed, 1 insertion(+) diff --git a/how-to/get-started/quick-start-with-tidb.md b/how-to/get-started/quick-start-with-tidb.md index a86e0f1f393be..d7ef51cc60900 100644 --- a/how-to/get-started/quick-start-with-tidb.md +++ b/how-to/get-started/quick-start-with-tidb.md @@ -3,6 +3,7 @@ title: Quick Start with TiDB summary: Learn how to quick start your first TiDB cluster and try out the features. category: how-to --- + # Quick Start with TiDB This document describes how to try out TiDB, a distributed SQL database. You can choose any of the following three methods to start your first TiDB cluster: From 1c51c723946ed1225095024b1fb25986432f7d4a Mon Sep 17 00:00:00 2001 From: Ran Date: Sun, 19 Apr 2020 19:23:17 +0800 Subject: [PATCH 4/9] Apply suggestions from coco Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> --- how-to/get-started/quick-start-with-tidb.md | 44 ++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/how-to/get-started/quick-start-with-tidb.md b/how-to/get-started/quick-start-with-tidb.md index d7ef51cc60900..e738d66cbed91 100644 --- a/how-to/get-started/quick-start-with-tidb.md +++ b/how-to/get-started/quick-start-with-tidb.md @@ -1,12 +1,12 @@ --- title: Quick Start with TiDB -summary: Learn how to quick start your first TiDB cluster and try out the features. +summary: Learn how to quickly start your first TiDB cluster and try out the features. category: how-to --- # Quick Start with TiDB -This document describes how to try out TiDB, a distributed SQL database. You can choose any of the following three methods to start your first TiDB cluster: +This document describes how to try out TiDB, a distributed SQL database, in a few minutes. You can choose any of the following three methods to start your first TiDB cluster: - [Try out TiDB with one click using TiDB-Wasm](#try-out-tidb-with-one-click-using-tidb-wasm) - [Deploy a local test environment using TiUP Playground](#deploy-a-local-test-environment-using-tiup-playground) @@ -21,9 +21,9 @@ This document describes how to try out TiDB, a distributed SQL database. You can - Scenario: Have a first taste on the basic features of TiDB, such as syntax and compatibility. - Time required: Instant -TiDB-Wasm is a TiDB cluster running in the browser. You can use TiDB simply by opening a web page and perform basic operations such as executing SQL statements and verifying compatibility. +TiDB-Wasm is a TiDB cluster running in the browser. With TiDB-Wasm, you can use TiDB simply by opening a web page and perform basic operations such as executing SQL statements and verifying compatibility. -Click to [try TiDB-Wasm](https://tour.pingcap.com). The TiDB cluster will be built in the memory, expectedly in around 10 seconds. +Click to try TiDB-Wasm: . The TiDB cluster will be built in the memory, which takes about 10 seconds. ## Deploy a local test environment using TiUP Playground @@ -68,7 +68,7 @@ As a distributed system, a basic TiDB test cluster usually consists of 2 TiDB in tiup update playground ``` -4. Execute the following command in the current session to start the cluster: +4. Start the cluster in the current session: - If you want to start a TiDB cluster of the latest version with 1 TiDB instance, 1 TiKV instance, and 1 PD instance, run the following command: @@ -78,7 +78,7 @@ As a distributed system, a basic TiDB test cluster usually consists of 2 TiDB in tiup playground ``` - - If you want to specify the version and the number of the component instances, run the following command: + - If you want to specify the TiDB version and the number of the instances of each component, run a command like this: {{< copyable "shell-regular" >}} @@ -88,9 +88,9 @@ As a distributed system, a basic TiDB test cluster usually consists of 2 TiDB in The command downloads a v4.0.0-rc cluster to the local machine and starts it. - `--monitor` means that the monitoring component will also be deployed. + `--monitor` means that the monitoring component is also deployed. - The execution results show the access methods of the cluster: + This command returns the access methods of the cluster: ```log CLUSTER START SUCCESSFULLY, Enjoy it ^-^ @@ -124,7 +124,7 @@ As a distributed system, a basic TiDB test cluster usually consists of 2 TiDB in tiup clean --all ``` -## Deploy a quasi-production test environment on a single machine using TiUP cluster +## Set up a quasi-production environment on a single machine using TiUP cluster - Scenario: Experience a smallest TiDB cluster with the complete topology and simulate the production deployment steps on a single Linux server. - Time required: 10 minutes @@ -136,11 +136,11 @@ This section describes how to deploy a TiDB cluster using a YAML file of the sma Prepare a deployment machine that meets the following requirements: - CentOS 7.3 or a later version is installed -- The Linux OS has access to the Internet, which can be used to download TiDB and related software installation packages +- The Linux OS has access to the Internet, which is required to download TiDB and related software installation packages -The smallest TiDB topology is as follows: +The smallest TiDB cluster topology is as follows: -| Instance | Number | IP | Configuration | +| Instance | Count | IP | Configuration | |:-- | :-- | :-- | :-- | | TiKV | 3 | 10.0.1.1
10.0.1.1
10.0.1.1 | Avoid conflict between the port and the directory | | TiDB | 1 | 10.0.1.1 | The default port
Global directory configuration | @@ -150,8 +150,8 @@ The smallest TiDB topology is as follows: Other requirements for the deployment machine: -- Know the root user password -- Stop the firewall service of the deployment machine, or open the port needed by the TiDB cluster nodes +- The `root` user and its password is required +- [Stop the firewall service of the deployment machine](/how-to/deploy/orchestrated/tiup.md#how-to-stop-the-firewall-service-of-deployment-machines), or open the port needed by the TiDB cluster nodes - Currently, TiUP only supports deploying TiDB on the x86_64 (AMD64) architecture (the ARM architecture will be supported in TiDB 4.0 GA): - It is recommended to use CentOS 7.3 or later versions on AMD64 @@ -161,7 +161,7 @@ Other requirements for the deployment machine: > **Note:** > -> You can log in to the host as any ordinary user or the root user of the Linux OS. The following steps use the root user as an example. +> You can log in to the deployment machine as a regular user or the `root` user. The following steps use the `root` user as an example. 1. Download and install TiUP: @@ -187,7 +187,7 @@ Other requirements for the deployment machine: tiup update cluster ``` -4. Use the root user access to increase the connection limit of the `sshd` service. This is because TiUP needs to simulate deployment on multiple machines. +4. Use the `root` user privilege to increase the connection limit of the `sshd` service. This is because TiUP needs to simulate deployment on multiple machines. 1. Modify `/etc/ssh/sshd_config`, and set `MaxSessions` to `20`. 2. Restart the `sshd` service: @@ -200,7 +200,7 @@ Other requirements for the deployment machine: 5. Create and start the cluster: - Edit the configuration file according to the following template, and name it as `topology.yaml`: + Edit the configuration file according to the following template, and name it as `topo.yaml`: {{< copyable "shell-regular" >}} @@ -259,7 +259,7 @@ Other requirements for the deployment machine: - host: 10.0.1.1 ``` - - `user: "tidb"`: Use the `tidb` system user to perform the internal management of the cluster. By default, use port 22 to log in to the target machine via SSH. + - `user: "tidb"`: Use the `tidb` system user (automatically created during deployment) to perform the internal management of the cluster. By default, use port 22 to log in to the target machine via SSH. - `replication.enable-placement-rules`: This PD parameter is set to ensure that TiFlash runs normally. - `host`: The IP of the deployment machine. @@ -272,9 +272,9 @@ Other requirements for the deployment machine: ``` - ``: Set the cluster name - - ``: Set the cluster version. Choose the TiDB version currently supported by running the `tiup list tidb --refresh` command + - ``: Set the TiDB cluster version. You can see all the supported TiDB versions by running the `tiup list tidb --refresh` command - Enter "y" and the root password to complete the deployment: + Enter "y" and the `root` user's password to complete the deployment: ```log Do you want to continue? [y/N]: y @@ -303,7 +303,7 @@ Other requirements for the deployment machine: - Access the TiDB Dashboard at . The default username is `root`, and the password is empty. - - To view the currently deployed cluster list, run the following command: + - To view the currently deployed cluster list: {{< copyable "shell-regular" >}} @@ -311,7 +311,7 @@ Other requirements for the deployment machine: tiup cluster list ``` - - To view the cluster topology and status, run the following command: + - To view the cluster topology and status: {{< copyable "shell-regular" >}} From d3ddcf97f1bb3c0d2209dfd788c82253d9190734 Mon Sep 17 00:00:00 2001 From: Ran Date: Sun, 19 Apr 2020 19:26:06 +0800 Subject: [PATCH 5/9] Apply suggestions from coco Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> --- how-to/get-started/quick-start-with-tidb.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/how-to/get-started/quick-start-with-tidb.md b/how-to/get-started/quick-start-with-tidb.md index e738d66cbed91..721241f484601 100644 --- a/how-to/get-started/quick-start-with-tidb.md +++ b/how-to/get-started/quick-start-with-tidb.md @@ -14,7 +14,7 @@ This document describes how to try out TiDB, a distributed SQL database, in a fe > **Note:** > -> It is not recommended to deploy TiDB for production environments with the above three methods. Instead, you can [deploy TiDB using TiUP](/how-to/deploy/orchestrated/tiup.md). +> For production environments, **do not** deploy TiDB with the following three methods. Instead, it is recommended that you [deploy TiDB using TiUP](/how-to/deploy/orchestrated/tiup.md). ## Try out TiDB with one click using TiDB-Wasm @@ -50,7 +50,7 @@ As a distributed system, a basic TiDB test cluster usually consists of 2 TiDB in > **Note:** > - > After the installation, TiUP gives the absolute path of the corresponding `profile` file. You need to modify the above `source` command according to the path. + > After the installation, TiUP gives the absolute path of the corresponding `profile` file. You need to modify the following `source` command according to the path. 3. Install TiUP Playground: From 750de5ba99a3bff16e85bf84eb0498d9b309853a Mon Sep 17 00:00:00 2001 From: Ran Date: Sun, 19 Apr 2020 19:27:52 +0800 Subject: [PATCH 6/9] move the notes --- how-to/get-started/quick-start-with-tidb.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/how-to/get-started/quick-start-with-tidb.md b/how-to/get-started/quick-start-with-tidb.md index 721241f484601..cfc89797223bb 100644 --- a/how-to/get-started/quick-start-with-tidb.md +++ b/how-to/get-started/quick-start-with-tidb.md @@ -8,14 +8,14 @@ category: how-to This document describes how to try out TiDB, a distributed SQL database, in a few minutes. You can choose any of the following three methods to start your first TiDB cluster: -- [Try out TiDB with one click using TiDB-Wasm](#try-out-tidb-with-one-click-using-tidb-wasm) -- [Deploy a local test environment using TiUP Playground](#deploy-a-local-test-environment-using-tiup-playground) -- [Deploy a quasi-production test environment on a single machine using TiUP cluster](#deploya-quasi-production-test-environment-on-a-single-machine-using-tiup-cluster) - > **Note:** > > For production environments, **do not** deploy TiDB with the following three methods. Instead, it is recommended that you [deploy TiDB using TiUP](/how-to/deploy/orchestrated/tiup.md). +- [Try out TiDB with one click using TiDB-Wasm](#try-out-tidb-with-one-click-using-tidb-wasm) +- [Deploy a local test environment using TiUP Playground](#deploy-a-local-test-environment-using-tiup-playground) +- [Deploy a quasi-production test environment on a single machine using TiUP cluster](#deploya-quasi-production-test-environment-on-a-single-machine-using-tiup-cluster) + ## Try out TiDB with one click using TiDB-Wasm - Scenario: Have a first taste on the basic features of TiDB, such as syntax and compatibility. @@ -42,16 +42,16 @@ As a distributed system, a basic TiDB test cluster usually consists of 2 TiDB in 2. Declare the global environment variable: + > **Note:** + > + > After the installation, TiUP gives the absolute path of the corresponding `profile` file. You need to modify the following `source` command according to the path. + {< copyable "shell-regular" >}} ```shell source .bash_profile ``` - > **Note:** - > - > After the installation, TiUP gives the absolute path of the corresponding `profile` file. You need to modify the following `source` command according to the path. - 3. Install TiUP Playground: {{< copyable "shell-regular" >}} From e0348030c6eb7e06430c509128b012cded534c7c Mon Sep 17 00:00:00 2001 From: Ran Date: Sun, 19 Apr 2020 21:53:22 +0800 Subject: [PATCH 7/9] address comments --- TOC.md | 2 +- how-to/get-started/quick-start-with-tidb.md | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/TOC.md b/TOC.md index 47ef050477b65..0b9eb2b2b9e00 100644 --- a/TOC.md +++ b/TOC.md @@ -7,6 +7,7 @@ + Introduction - [TiDB Introduction](/overview.md) + - [Quick Start with TiDB](/how-to/get-started/quick-start-with-tidb.md) + Benchmarks - [How to Test TiDB Using Sysbench](/benchmark/how-to-run-sysbench.md) - [How to Run TPC-C Test on TiDB](/benchmark/how-to-run-tpcc.md) @@ -36,7 +37,6 @@ + How-to + Get Started + Start a Cluster - - [Quick Start with TiDB](/how-to/get-started/quick-start-with-tidb.md) - [From Binary](/how-to/get-started/deploy-tidb-from-binary.md) - [From Homebrew](/how-to/get-started/deploy-tidb-from-homebrew.md) - [From DBdeployer](/how-to/get-started/deploy-tidb-from-dbdeployer.md) diff --git a/how-to/get-started/quick-start-with-tidb.md b/how-to/get-started/quick-start-with-tidb.md index cfc89797223bb..a91d2c3f246be 100644 --- a/how-to/get-started/quick-start-with-tidb.md +++ b/how-to/get-started/quick-start-with-tidb.md @@ -1,29 +1,29 @@ --- -title: Quick Start with TiDB -summary: Learn how to quickly start your first TiDB cluster and try out the features. +title: Quick Start Guide for the TiDB Database Platform +summary: Learn how to quickly get started with the TiDB platform and see if TiDB is the right choice for you. category: how-to --- -# Quick Start with TiDB - -This document describes how to try out TiDB, a distributed SQL database, in a few minutes. You can choose any of the following three methods to start your first TiDB cluster: +# Quick Start Guide for the TiDB Database Platform > **Note:** > > For production environments, **do not** deploy TiDB with the following three methods. Instead, it is recommended that you [deploy TiDB using TiUP](/how-to/deploy/orchestrated/tiup.md). +This document describes how to try out TiDB, a distributed SQL database, in a few minutes. You can choose any of the following three methods to get started with the TiDB database platform: + - [Try out TiDB with one click using TiDB-Wasm](#try-out-tidb-with-one-click-using-tidb-wasm) - [Deploy a local test environment using TiUP Playground](#deploy-a-local-test-environment-using-tiup-playground) - [Deploy a quasi-production test environment on a single machine using TiUP cluster](#deploya-quasi-production-test-environment-on-a-single-machine-using-tiup-cluster) ## Try out TiDB with one click using TiDB-Wasm -- Scenario: Have a first taste on the basic features of TiDB, such as syntax and compatibility. +- Scenario: Experiment with TiDB SQL and test the TiDB compatibility with MySQL queries. - Time required: Instant -TiDB-Wasm is a TiDB cluster running in the browser. With TiDB-Wasm, you can use TiDB simply by opening a web page and perform basic operations such as executing SQL statements and verifying compatibility. +TiDB-Wasm enables you to run a TiDB server instance in a browser so that you can experiment with SQL and test TiDB compatibility with MySQL queries. -Click to try TiDB-Wasm: . The TiDB cluster will be built in the memory, which takes about 10 seconds. +Click to try TiDB-Wasm playground: . It takes about 10 seconds to launch the TiDB server instance in your browser. The playground walks you through the basic TiDB SQL statements such as DDL, DML and CRUD operations. ## Deploy a local test environment using TiUP Playground @@ -44,7 +44,7 @@ As a distributed system, a basic TiDB test cluster usually consists of 2 TiDB in > **Note:** > - > After the installation, TiUP gives the absolute path of the corresponding `profile` file. You need to modify the following `source` command according to the path. + > After the installation, TiUP displays the absolute path of the corresponding `profile` file. You need to modify the following `source` command according to the path. {< copyable "shell-regular" >}} @@ -124,7 +124,7 @@ As a distributed system, a basic TiDB test cluster usually consists of 2 TiDB in tiup clean --all ``` -## Set up a quasi-production environment on a single machine using TiUP cluster +## Set up a test environment on a single machine using TiUP cluster - Scenario: Experience a smallest TiDB cluster with the complete topology and simulate the production deployment steps on a single Linux server. - Time required: 10 minutes From 90854ec90ac442bec4c4675ba2c5411c64e7a9fd Mon Sep 17 00:00:00 2001 From: Ran Date: Mon, 20 Apr 2020 14:07:40 +0800 Subject: [PATCH 8/9] move the file location and edit toc --- TOC.md | 2 +- .../quick-start-with-tidb.md => quick-start-with-tidb.md | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename how-to/get-started/quick-start-with-tidb.md => quick-start-with-tidb.md (100%) diff --git a/TOC.md b/TOC.md index 0b9eb2b2b9e00..170c3135cd29a 100644 --- a/TOC.md +++ b/TOC.md @@ -7,13 +7,13 @@ + Introduction - [TiDB Introduction](/overview.md) - - [Quick Start with TiDB](/how-to/get-started/quick-start-with-tidb.md) + Benchmarks - [How to Test TiDB Using Sysbench](/benchmark/how-to-run-sysbench.md) - [How to Run TPC-C Test on TiDB](/benchmark/how-to-run-tpcc.md) - [Sysbench Performance Test - v3.0 vs. v2.1](/benchmark/sysbench-v4.md) - [TPC-C Performance Test - v3.0 vs. v2.1](/benchmark/tpcc.md) - [Interaction Test on Online Workloads and `ADD INDEX` Operations](/benchmark/add-index-with-load.md) +- [Quick Start with TiDB](/quick-start-with-tidb.md) + Concepts - [Architecture](/architecture.md) + Key Features diff --git a/how-to/get-started/quick-start-with-tidb.md b/quick-start-with-tidb.md similarity index 100% rename from how-to/get-started/quick-start-with-tidb.md rename to quick-start-with-tidb.md From 2cf9eb577e899e8ad0da66d6ae894d1ad9c8f4b1 Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Mon, 20 Apr 2020 15:13:53 +0800 Subject: [PATCH 9/9] fix an anchor link --- quick-start-with-tidb.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quick-start-with-tidb.md b/quick-start-with-tidb.md index a91d2c3f246be..5c0e98559f7e5 100644 --- a/quick-start-with-tidb.md +++ b/quick-start-with-tidb.md @@ -14,7 +14,7 @@ This document describes how to try out TiDB, a distributed SQL database, in a fe - [Try out TiDB with one click using TiDB-Wasm](#try-out-tidb-with-one-click-using-tidb-wasm) - [Deploy a local test environment using TiUP Playground](#deploy-a-local-test-environment-using-tiup-playground) -- [Deploy a quasi-production test environment on a single machine using TiUP cluster](#deploya-quasi-production-test-environment-on-a-single-machine-using-tiup-cluster) +- [Set up a test environment on a single machine using TiUP cluster](#set-up-a-test-environment-on-a-single-machine-using-tiup-cluster) ## Try out TiDB with one click using TiDB-Wasm