+
-Log in to the control machine using a regular user account (take the `tidb` user as an example). All the following TiUP installation and cluster management operations can be performed by the `tidb` user.
+### Deploy TiUP online
-1. Install TiUP by executing the following command:
+Log in to the control machine using a regular user account (take the `tidb` user as an example). Subsequent TiUP installation and cluster management can be performed by the `tidb` user.
+
+1. Install TiUP by running the following command:
{{< copyable "shell-regular" >}}
@@ -36,23 +39,23 @@ Log in to the control machine using a regular user account (take the `tidb` user
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
```
-2. Set the TiUP environment variables:
+2. Set TiUP environment variables:
- Redeclare the global environment variables:
+ 1. Redeclare the global environment variables:
- {{< copyable "shell-regular" >}}
+ {{< copyable "shell-regular" >}}
- ```shell
- source .bash_profile
- ```
+ ```shell
+ source .bash_profile
+ ```
- Confirm whether TiUP is installed:
+ 2. Confirm whether TiUP is installed:
- {{< copyable "shell-regular" >}}
+ {{< copyable "shell-regular" >}}
- ```shell
- which tiup
- ```
+ ```shell
+ which tiup
+ ```
3. Install the TiUP cluster component:
@@ -70,7 +73,7 @@ Log in to the control machine using a regular user account (take the `tidb` user
tiup update --self && tiup update cluster
```
- Expected output includes `"Update successfully!"`.
+ If `“Update successfully!”` is displayed, the TiUP cluster is updated successfully.
5. Verify the current version of your TiUP cluster:
@@ -80,13 +83,17 @@ Log in to the control machine using a regular user account (take the `tidb` user
tiup --binary cluster
```
-### Method 2: Deploy TiUP offline
+
+
+
+
+### Deploy TiUP offline
Perform the following steps in this section to deploy a TiDB cluster offline using TiUP:
-#### Step 1: Prepare the TiUP offline component package
+#### Prepare the TiUP offline component package
-To prepare the TiUP offline component package, manually pack an offline component package using `tiup mirror clone`.
+To prepare the TiUP offline component package, you can manually pack an offline component package using `tiup mirror clone`.
1. Install the TiUP package manager online.
@@ -182,7 +189,7 @@ To prepare the TiUP offline component package, manually pack an offline componen
5. When the above steps are completed, check the result by running the `tiup list` command. In this document's example, the outputs of both `tiup list tiup` and `tiup list cluster` show that the corresponding components of `v1.10.0` are available.
-#### Step 2: Deploy the offline TiUP component
+#### Deploy the offline TiUP component
After sending the package to the control machine of the target cluster, install the TiUP component by running the following commands:
@@ -194,15 +201,16 @@ sh tidb-community-server-${version}-linux-amd64/local_install.sh && \
source /home/tidb/.bash_profile
```
-The `local_install.sh` script automatically executes the `tiup mirror set tidb-community-server-${version}-linux-amd64` command to set the current mirror address to `tidb-community-server-${version}-linux-amd64`.
+The `local_install.sh` script automatically runs the `tiup mirror set tidb-community-server-${version}-linux-amd64` command to set the current mirror address to `tidb-community-server-${version}-linux-amd64`.
-To switch the mirror to another directory, you can manually execute the `tiup mirror set ` command. To switch the mirror to the online environment, you can execute the `tiup mirror set https://tiup-mirrors.pingcap.com` command.
+To switch the mirror to another directory, run the `tiup mirror set ` command. To switch the mirror to the online environment, run the `tiup mirror set https://tiup-mirrors.pingcap.com` command.
-## Step 3: Initialize cluster topology file
+
+
-According to the intended cluster topology, you need to manually create and edit the cluster initialization configuration file.
+## Step 3. Initialize cluster topology file
-To create the cluster initialization configuration file, you can create a YAML-formatted configuration file on the control machine using TiUP:
+Run the following command to create a cluster topology file:
{{< copyable "shell-regular" >}}
@@ -210,11 +218,27 @@ To create the cluster initialization configuration file, you can create a YAML-f
tiup cluster template > topology.yaml
```
-> **Note:**
->
-> For the hybrid deployment scenarios, you can also execute `tiup cluster template --full > topology.yaml` to create the recommended topology template. For the geo-distributed deployment scenarios, you can execute `tiup cluster template --multi-dc > topology.yaml` to create the recommended topology template.
+In the following two common scenarios, you can generate recommended topology templates by running commands:
-Execute `vi topology.yaml` to see the configuration file content:
+- For hybrid deployment: Multiple instances are deployed on a single machine. For details, see [Hybrid Deployment Topology](/hybrid-deployment-topology.md).
+
+ {{< copyable "shell-regular" >}}
+
+ ```shell
+ tiup cluster template --full > topology.yaml
+ ```
+
+- For geo-distributed deployment: TiDB clusters are deployed in geographically distributed data centers. For details, see [Geo-Distributed Deployment Topology](/geo-distributed-deployment-topology.md).
+
+ {{< copyable "shell-regular" >}}
+
+ ```shell
+ tiup cluster template --multi-dc > topology.yaml
+ ```
+
+Run `vi topology.yaml` to see the configuration file content:
+
+{{< copyable "shell-regular" >}}
```shell
global:
@@ -243,51 +267,40 @@ alertmanager_servers:
- host: 10.0.1.4
```
-The following examples cover six common scenarios. You need to modify the configuration file (named `topology.yaml`) according to the topology description and templates in the corresponding links. For other scenarios, edit the configuration template accordingly.
-
-- [Minimal deployment topology](/minimal-deployment-topology.md)
-
- This is the basic cluster topology, including tidb-server, tikv-server, and pd-server. It is suitable for OLTP applications.
-
-- [TiFlash deployment topology](/tiflash-deployment-topology.md)
-
- This is to deploy TiFlash along with the minimal cluster topology. TiFlash is a columnar storage engine, and gradually becomes a standard cluster topology. It is suitable for real-time HTAP applications.
-
-- [TiCDC deployment topology](/ticdc-deployment-topology.md)
+The following examples cover seven common scenarios. You need to modify the configuration file (named `topology.yaml`) according to the topology description and templates in the corresponding links. For other scenarios, edit the configuration template accordingly.
- This is to deploy TiCDC along with the minimal cluster topology. TiCDC is a tool for replicating the incremental data of TiDB, introduced in TiDB 4.0. It supports multiple downstream platforms, such as TiDB, MySQL, and MQ. Compared with TiDB Binlog, TiCDC has lower latency and native high availability. After the deployment, start TiCDC and [create the replication task using `cdc cli`](/ticdc/manage-ticdc.md).
-
-- [TiDB Binlog deployment topology](/tidb-binlog-deployment-topology.md)
-
- This is to deploy TiDB Binlog along with the minimal cluster topology. TiDB Binlog is the widely used component for replicating incremental data. It provides near real-time backup and replication.
-
-- [TiSpark deployment topology](/tispark-deployment-topology.md)
-
- This is to deploy TiSpark along with the minimal cluster topology. TiSpark is a component built for running Apache Spark on top of TiDB/TiKV to answer the OLAP queries. Currently, TiUP cluster's support for TiSpark is still **experimental**.
-
-- [Hybrid deployment topology](/hybrid-deployment-topology.md)
-
- This is to deploy multiple instances on a single machine. You need to add extra configurations for the directory, port, resource ratio, and label.
-
-- [Geo-distributed deployment topology](/geo-distributed-deployment-topology.md)
-
- This topology takes the typical architecture of three data centers in two cities as an example. It introduces the geo-distributed deployment architecture and the key configuration that requires attention.
+| Application | Configuration task | Configuration file template | Topology description |
+| :-- | :-- | :-- | :-- |
+| OLTP | [Deploy minimal topology](/minimal-deployment-topology.md) | [Simple minimal configuration template](/config-templates/simple-mini.yaml)