From c3856ac0a4fa08fdd607c2008301df8d30fdf663 Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Tue, 10 Aug 2021 21:17:32 +0200 Subject: [PATCH 1/7] TiUP: add instructions for offline mirror --- production-deployment-using-tiup.md | 50 ++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/production-deployment-using-tiup.md b/production-deployment-using-tiup.md index 73bc55696759f..946ba377bb334 100644 --- a/production-deployment-using-tiup.md +++ b/production-deployment-using-tiup.md @@ -83,7 +83,9 @@ Perform the following steps in this section to deploy a TiDB cluster offline usi #### Step 1: Prepare the TiUP offline component package -To prepare the TiUP offline component package, manually pack an offline component package using `tiup mirror clone`. +Option 1: Select the corresponding version of the package of the TiDB server's offline mirrors (including the TiUP offline component package) on the [Download TiDB page](https://pingcap.com/download/). + +Option 2: To prepare the TiUP offline component package, manually pack an offline component package using `tiup mirror clone`. 1. Install the TiUP package manager online. @@ -133,6 +135,52 @@ To prepare the TiUP offline component package, manually pack an offline componen `tidb-community-server-${version}-linux-amd64.tar.gz` is an independent offline environment package. +3. Customize the offline mirror, or adjust the contents of the existing offline mirror. + + If the package of the TiDB server's offline mirrors from the PingCAP website does not meet your specific needs, or if you want to make adjustments to the existing offline mirror (like adding a new version of a component), take the following process: + + 1. When pulling an offline mirror, you can get an incomplete offline mirror by specifying specific information, such as components and version. For example, you can pull an offline mirror that includes only the offline mirrors of TiUP v1.5.2 and TiUP Cluster by running the following command: + + {{< copyable "shell-regular" >}} + + ```bash + tiup mirror clone tiup-custom-mirror-v1.5.2 --tiup v1.5.2 --cluster v1.5.2 + ``` + + If you only need the components for a particular platform, you can specify them through `--os` and `--arch`. + + 2. Refer to step 2 mentioned above, "Install TiUP on the control machine", send this incomplete offline mirror to the control machine in the isolated environment. + + 3. Check the path of the current offline mirror on the control machine in the isolated environment. If you installed TiUP in the newer versions, you can get the current mirror address by running the following command: + + {{< copyable "shell-regular" >}} + + ```bash + tiup mirror show + ``` + + If the above command indicates that the `show` command does not exist, you may now use an older version of TiUP. In this case, you can get the current mirror address from `$HOME/.tiup/tiup.toml`. Write down this mirror address, and then use `${base_mirror}` to refer to it. + + 4. Merge an incomplete offline mirror into an existing offline mirror: + + First, copy the `keys` directory in the current offline mirror to the `$HOME/.tiup` directory: + + {{< copyable "shell-regular" >}} + + ```bash + cp -r ${base_mirror}/keys $HOME/.tiup/ + ``` + + Then use the TiUP command to merge the incomplete offline mirror into the currently used mirror: + + {{< copyable "shell-regular" >}} + + ```bash + tiup mirror merge tiup-custom-mirror-v1.5.2 + ``` + + 5. When the above steps are complete, check the results by running the `tiup list'command. In this document's example, you can find the `v1.5.2` version of the corresponding components in the outputs of `tiup list tiup` and `tiup list cluster`. + #### Step 2: 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: From 146f3fe4dab0f598352bc35ff1e82fdee48fc74d Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Tue, 10 Aug 2021 21:35:45 +0200 Subject: [PATCH 2/7] fix CI error --- production-deployment-using-tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production-deployment-using-tiup.md b/production-deployment-using-tiup.md index 946ba377bb334..fd9930653052d 100644 --- a/production-deployment-using-tiup.md +++ b/production-deployment-using-tiup.md @@ -179,7 +179,7 @@ Option 2: To prepare the TiUP offline component package, manually pack an offlin tiup mirror merge tiup-custom-mirror-v1.5.2 ``` - 5. When the above steps are complete, check the results by running the `tiup list'command. In this document's example, you can find the `v1.5.2` version of the corresponding components in the outputs of `tiup list tiup` and `tiup list cluster`. + 5. When the above steps are complete, check the results by running the `tiup list`command. In this document's example, you can find the `v1.5.2` version of the corresponding components in the outputs of `tiup list tiup` and `tiup list cluster`. #### Step 2: Deploy the offline TiUP component From 7d4bc568996b86b9aa77563d6e508800afe94a7c Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Wed, 11 Aug 2021 09:29:29 +0200 Subject: [PATCH 3/7] remove a part and revise the corresponding translation --- production-deployment-using-tiup.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/production-deployment-using-tiup.md b/production-deployment-using-tiup.md index fd9930653052d..aa1fde19c11ff 100644 --- a/production-deployment-using-tiup.md +++ b/production-deployment-using-tiup.md @@ -83,9 +83,7 @@ Perform the following steps in this section to deploy a TiDB cluster offline usi #### Step 1: Prepare the TiUP offline component package -Option 1: Select the corresponding version of the package of the TiDB server's offline mirrors (including the TiUP offline component package) on the [Download TiDB page](https://pingcap.com/download/). - -Option 2: To prepare the TiUP offline component package, manually pack an offline component package using `tiup mirror clone`. +To prepare the TiUP offline component package, manually pack an offline component package using `tiup mirror clone`. 1. Install the TiUP package manager online. @@ -137,7 +135,7 @@ Option 2: To prepare the TiUP offline component package, manually pack an offlin 3. Customize the offline mirror, or adjust the contents of the existing offline mirror. - If the package of the TiDB server's offline mirrors from the PingCAP website does not meet your specific needs, or if you want to make adjustments to the existing offline mirror (like adding a new version of a component), take the following process: + If the existing offline mirrors does not meet your specific needs, or if you want to make adjustments to the mirror (like adding a new version of a component), take the following process: 1. When pulling an offline mirror, you can get an incomplete offline mirror by specifying specific information, such as components and version. For example, you can pull an offline mirror that includes only the offline mirrors of TiUP v1.5.2 and TiUP Cluster by running the following command: From 9557bc9af6d61d076cc9b0f18a828d99775166d0 Mon Sep 17 00:00:00 2001 From: Enwei Date: Wed, 11 Aug 2021 10:18:27 +0200 Subject: [PATCH 4/7] Update production-deployment-using-tiup.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- production-deployment-using-tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production-deployment-using-tiup.md b/production-deployment-using-tiup.md index aa1fde19c11ff..a1d10ee48b02e 100644 --- a/production-deployment-using-tiup.md +++ b/production-deployment-using-tiup.md @@ -135,7 +135,7 @@ To prepare the TiUP offline component package, manually pack an offline componen 3. Customize the offline mirror, or adjust the contents of the existing offline mirror. - If the existing offline mirrors does not meet your specific needs, or if you want to make adjustments to the mirror (like adding a new version of a component), take the following process: + If you want to adjust the existing offline mirror (such as adding a new version of a component), take the following steps: 1. When pulling an offline mirror, you can get an incomplete offline mirror by specifying specific information, such as components and version. For example, you can pull an offline mirror that includes only the offline mirrors of TiUP v1.5.2 and TiUP Cluster by running the following command: From e2a781d7820af6c180d4d1e8146cd2b36812d520 Mon Sep 17 00:00:00 2001 From: Enwei Date: Wed, 11 Aug 2021 10:32:09 +0200 Subject: [PATCH 5/7] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- production-deployment-using-tiup.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/production-deployment-using-tiup.md b/production-deployment-using-tiup.md index a1d10ee48b02e..d3cfdb329dc29 100644 --- a/production-deployment-using-tiup.md +++ b/production-deployment-using-tiup.md @@ -137,7 +137,7 @@ To prepare the TiUP offline component package, manually pack an offline componen If you want to adjust the existing offline mirror (such as adding a new version of a component), take the following steps: - 1. When pulling an offline mirror, you can get an incomplete offline mirror by specifying specific information, such as components and version. For example, you can pull an offline mirror that includes only the offline mirrors of TiUP v1.5.2 and TiUP Cluster by running the following command: + 1. When pulling an offline mirror, you can get an incomplete offline mirror by specifying specific information via parameters, such as the component and version information. For example, you can pull an offline mirror that includes only the offline mirror of TiUP v1.5.2 and TiUP Cluster v1.5.2 by running the following command: {{< copyable "shell-regular" >}} @@ -145,11 +145,11 @@ To prepare the TiUP offline component package, manually pack an offline componen tiup mirror clone tiup-custom-mirror-v1.5.2 --tiup v1.5.2 --cluster v1.5.2 ``` - If you only need the components for a particular platform, you can specify them through `--os` and `--arch`. + If you only need the components for a particular platform, you can specify them using the `--os` or `--arch` parameter. - 2. Refer to step 2 mentioned above, "Install TiUP on the control machine", send this incomplete offline mirror to the control machine in the isolated environment. + 2. Refer to the step 2 of "Pull the mirror using TiUP", and send this incomplete offline mirror to the control machine in the isolated environment. - 3. Check the path of the current offline mirror on the control machine in the isolated environment. If you installed TiUP in the newer versions, you can get the current mirror address by running the following command: + 3. Check the path of the current offline mirror on the control machine in the isolated environment. If your TiUP tool is of a newer version, you can get the current mirror address by running the following command: {{< copyable "shell-regular" >}} @@ -157,7 +157,7 @@ To prepare the TiUP offline component package, manually pack an offline componen tiup mirror show ``` - If the above command indicates that the `show` command does not exist, you may now use an older version of TiUP. In this case, you can get the current mirror address from `$HOME/.tiup/tiup.toml`. Write down this mirror address, and then use `${base_mirror}` to refer to it. + If the output of the above command indicates that the `show` command does not exist, you might be using an older version of TiUP. In this case, you can get the current mirror address from `$HOME/.tiup/tiup.toml`. Record this mirror address. In the following steps, `${base_mirror}` is used to refer to this address. 4. Merge an incomplete offline mirror into an existing offline mirror: @@ -169,7 +169,7 @@ To prepare the TiUP offline component package, manually pack an offline componen cp -r ${base_mirror}/keys $HOME/.tiup/ ``` - Then use the TiUP command to merge the incomplete offline mirror into the currently used mirror: + Then use the TiUP command to merge the incomplete offline mirror into the mirror in use: {{< copyable "shell-regular" >}} @@ -177,7 +177,7 @@ To prepare the TiUP offline component package, manually pack an offline componen tiup mirror merge tiup-custom-mirror-v1.5.2 ``` - 5. When the above steps are complete, check the results by running the `tiup list`command. In this document's example, you can find the `v1.5.2` version of the corresponding components in the outputs of `tiup list tiup` and `tiup list cluster`. + 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 version of the corresponding component is `v1.5.2`. #### Step 2: Deploy the offline TiUP component From c5c8ed6dcd1121916dd22c098d05eee3e76c9df8 Mon Sep 17 00:00:00 2001 From: Enwei Date: Wed, 18 Aug 2021 11:46:42 +0200 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: Allen Zhong --- production-deployment-using-tiup.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/production-deployment-using-tiup.md b/production-deployment-using-tiup.md index d3cfdb329dc29..086b1c2b0b59a 100644 --- a/production-deployment-using-tiup.md +++ b/production-deployment-using-tiup.md @@ -133,9 +133,9 @@ To prepare the TiUP offline component package, manually pack an offline componen `tidb-community-server-${version}-linux-amd64.tar.gz` is an independent offline environment package. -3. Customize the offline mirror, or adjust the contents of the existing offline mirror. +3. Customize the offline mirror, or adjust the contents of an existing offline mirror. - If you want to adjust the existing offline mirror (such as adding a new version of a component), take the following steps: + If you want to adjust an existing offline mirror (such as adding a new version of a component), take the following steps: 1. When pulling an offline mirror, you can get an incomplete offline mirror by specifying specific information via parameters, such as the component and version information. For example, you can pull an offline mirror that includes only the offline mirror of TiUP v1.5.2 and TiUP Cluster v1.5.2 by running the following command: @@ -145,11 +145,11 @@ To prepare the TiUP offline component package, manually pack an offline componen tiup mirror clone tiup-custom-mirror-v1.5.2 --tiup v1.5.2 --cluster v1.5.2 ``` - If you only need the components for a particular platform, you can specify them using the `--os` or `--arch` parameter. + If you only need the components for a particular platform, you can specify them using the `--os` or `--arch` parameters. 2. Refer to the step 2 of "Pull the mirror using TiUP", and send this incomplete offline mirror to the control machine in the isolated environment. - 3. Check the path of the current offline mirror on the control machine in the isolated environment. If your TiUP tool is of a newer version, you can get the current mirror address by running the following command: + 3. Check the path of the current offline mirror on the control machine in the isolated environment. If your TiUP tool is of a recent version, you can get the current mirror address by running the following command: {{< copyable "shell-regular" >}} From c6ff9647e0bca23fc7be7b6ada1cada0d1931523 Mon Sep 17 00:00:00 2001 From: Enwei Date: Mon, 23 Aug 2021 18:27:46 +0200 Subject: [PATCH 7/7] Apply suggestions from code review Co-authored-by: Allen Zhong --- production-deployment-using-tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production-deployment-using-tiup.md b/production-deployment-using-tiup.md index 086b1c2b0b59a..e05683b703363 100644 --- a/production-deployment-using-tiup.md +++ b/production-deployment-using-tiup.md @@ -177,7 +177,7 @@ To prepare the TiUP offline component package, manually pack an offline componen tiup mirror merge tiup-custom-mirror-v1.5.2 ``` - 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 version of the corresponding component is `v1.5.2`. + 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.5.2` are available. #### Step 2: Deploy the offline TiUP component