-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update TiUP documentation from Special Week changes (#3052)
* create and rename file; update TOC and docs guide * align the rest of pingcap/docs-cn#3197 * Update TOC.md * add an alias * align https://github.com/pingcap/docs-cn/pull/3417/files * align pingcap/docs-cn#3463 and pingcap/docs-cn#3425 * update aliases * Apply suggestions from code review Co-authored-by: TomShawn <[email protected]> * add summary and update format * Apply suggestions from code review Co-authored-by: TomShawn <[email protected]> * Update tiup/tiup-component-management.md Co-authored-by: TomShawn <[email protected]>
- Loading branch information
Showing
11 changed files
with
286 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: TiUP Documentation Guide | ||
summary: Guide you through TiUP documentation with links and introductions. | ||
category: tools | ||
--- | ||
|
||
# TiUP Documentation Guide | ||
|
||
## TiUP user guide | ||
|
||
- [TiUP Overview](/tiup/tiup-overview.md): Gives an overall introduction to TiUP, for example, how to install and use TiUP | ||
- [TiUP Terminology and Concepts](/tiup/tiup-terminology-and-concepts.md): Explains the terms that you might bump into when using TiUP, and help you understand the key concepts of TiUP | ||
- [TiUP Component Management](/tiup/tiup-component-management.md): Introduces all TiUP commands in detail, and how to use TiUP to download, update and delete components | ||
- [TiUP FAQ](/tiup/tiup-faq.md): Introduces common issues when you use TiUP, including FAQs of the third-party components of TiUP | ||
- [TiUP Troubleshooting Guide](/tiup/tiup-troubleshooting-guide.md): Introduces the troubleshooting methods and solutions if you encounter issues when using TiUP | ||
|
||
## TiUP component user guide | ||
|
||
- [tiup-playground](/tiup/tiup-playground.md): Introduces how to use the TiUP playground component to quickly build a local TiDB cluster for testing | ||
- [tiup-cluster](/tiup/tiup-cluster.md): Introduces the usage and command-line flags of the TiUP cluster component, which is used to deploy and maintain a TiDB cluster for production | ||
- [tiup-mirror](/tiup/tiup-mirror.md): Introduces how to use the TiUP mirror component to customize a local offline mirror | ||
- [tiup-bench](/tiup/tiup-bench.md): Introduces how to use the TiUP bench component for common stress testings, such as TPCC/TPCH | ||
|
||
## TiUP resources | ||
|
||
- [TiUP Issues](https://github.com/pingcap/tiup/issues): Lists TiUP Github issues |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: TiUP FAQ | ||
summary: Provide answers to common questions asked by TiUP users. | ||
category: tools | ||
--- | ||
|
||
# TiUP FAQ | ||
|
||
## Can TiUP not use the official mirror source? | ||
|
||
TiUP supports specifying the mirror source through the `TIUP_MIRRORS` environment variable. The address of the mirror source can be a local directory or an HTTP server address. If your environment cannot access the network, you can create your own offline mirror source to use TiUP. | ||
|
||
## How do I put my own component into the TiUP mirrors? | ||
|
||
TiUP does not support third-party components for the time being, but the TiUP Team has developed the TiUP component development specifications and is developing the tiup-publish component. After everything is ready, a contributor can publish their own components to TiUP's official mirrors by using the `tiup publish <comp> <version>` command. | ||
|
||
## What is the difference between the TiUP playground and TiUP cluster components? | ||
|
||
The TiUP playground component is mainly used to build a stand-alone development environment on Linux or macOS operating systems. It helps you get started quickly and run a specified version of the TiUP cluster easily. The TiUP cluster component is mainly used to deploy and maintain a production environment cluster, which is usually a large-scale cluster. | ||
|
||
## How do I write the topology file for the TiUP cluster component? | ||
|
||
Refer to [these templates](https://github.com/pingcap/tiup/tree/master/examples) to write the topology file. The templates include: | ||
|
||
- Multi-DC deployment topology | ||
- Minimal deployment topology | ||
- Complete topology file | ||
|
||
You can edit your topology file based on the templates and your needs. | ||
|
||
## Can multiple instances be deployed on the same host? | ||
|
||
You can use the TiUP cluster component to deploy multiple instances on the same host, but with different ports and directories configured; otherwise, directory and port conflicts might occur. | ||
|
||
## Are port and directory conflicts detected within the same cluster? | ||
|
||
Port and directory conflicts in the same cluster are detected during deployment and scaling. If there is any directory or port conflict, the deployment or scaling process is interrupted. | ||
|
||
## Are port and directory conflicts detected among different clusters? | ||
|
||
If multiple different clusters are deployed by the same TiUP control machine, the port and directory conflicts among these clusters are detected during deployment and scaling. If the clusters are deployed by different TiUP control machines, conflict detection is not supported currently. | ||
|
||
## During cluster deployment, TiUP received an `ssh: handshake failed: read tcp 10.10.10.34:38980 -> 10.10.10.34:3600: read: connection reset by peer` error | ||
|
||
The error might occur because the default number of concurrent threads of TiUP exceeds the default maximum number of SSH connections. To solve the issue, you can increase the default number of SSH connections, and then restart the sshd service: | ||
|
||
{{< copyable "shell-regular" >}} | ||
|
||
```shell | ||
vi /etc/ssh/sshd_config | ||
``` | ||
|
||
```bash | ||
MaxSessions 1000 | ||
MaxStartups 1000 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
title: Create a Private Mirror | ||
summary: Learn how to create a private mirror. | ||
category: tools | ||
aliases: ['/tidb/dev/tiup-mirrors','/docs/dev/tiup/tiup-mirrors/','/docs/dev/reference/tools/tiup/mirrors/'] | ||
--- | ||
|
||
# Create a Private Mirror | ||
|
||
When creating a private cloud, usually, you need to use an isolated network environment, where the official mirror of TiUP is not accessible. Therefore, you can create a private mirror, which is mainly implemented by the `mirror` command. You can also use the `mirror` command for offline deployment. | ||
|
||
## TiUP `mirror` overview | ||
|
||
Execute the following command to get the help information of the `mirror` command: | ||
|
||
{{< copyable "shell-regular" >}} | ||
|
||
```bash | ||
tiup mirror --help | ||
``` | ||
|
||
```bash | ||
The 'mirror' command is used to manage a component repository for TiUP, you can use | ||
it to create a private repository, or to add new component to an existing repository. | ||
The repository can be used either online or offline. | ||
It also provides some useful utilities to help managing keys, users and versions | ||
of components or the repository itself. | ||
Usage: | ||
tiup mirror <command> [flags] | ||
Available Commands: | ||
init Initialize an empty repository | ||
sign Add signatures to a manifest file | ||
genkey Generate a new key pair | ||
clone Clone a local mirror from remote mirror and download all selected components | ||
publish Publish a component | ||
Flags: | ||
-h, --help help for mirror | ||
--repo string Path to the repository | ||
Global Flags: | ||
--skip-version-check Skip the strict version check, by default a version must be a valid SemVer string | ||
Use "tiup mirror [command] --help" for more information about a command. | ||
``` | ||
|
||
The `tiup mirror clone` command is used to build a local mirror. The basic usage is as follows: | ||
|
||
{{< copyable "shell-regular" >}} | ||
|
||
```bash | ||
tiup mirror clone <target-dir> [global-version] [flags] | ||
``` | ||
|
||
- `target-dir`: used to specify the directory in which cloned data is stored. | ||
- `global-version`: used to quickly set a global version for all components. | ||
|
||
The `tiup mirror clone` command provides many optional flags (might provide more in the future). These flags can be divided into the following categories according to their intended usages: | ||
|
||
- Determines whether to use prefix matching to match the version when cloning | ||
|
||
If the `--prefix` flag is specified, the version number is matched by prefix for the clone. For example, if you specify `--prefix` as "v4.0.0", then "v4.0.0-rc.1", "v4.0.0-rc.2", and "v4.0.0" are matched. | ||
|
||
- Determines whether to use the full clone | ||
|
||
If you specify the `--full` flag, you can clone the official mirror fully. | ||
|
||
> **Note:** | ||
> | ||
> If `--full`, `global-version` flags, and the component versions are not specified, only some meta information is cloned. | ||
- Determines whether to clone packages from the specific platform | ||
|
||
If you want to clone packages only for a specific platform, use `-os` and `-arch` to specify the platform. For example: | ||
|
||
- Execute the `tiup mirror clone <target-dir> [global-version] --os=linux` command to clone for linux. | ||
- Execute the `tiup mirror clone <target-dir> [global-version] --arch=amd64` command to clone for amd64. | ||
- Execute the `tiup mirror clone <target-dir> [global-version] --os=linux --arch=amd64` command to clone for linux/amd64. | ||
|
||
- Determines whether to clone a specific version of a package | ||
|
||
If you want to clone only one version (not all versions) of a component, use `--<component>=<version>` to specify this version. For example: | ||
|
||
- Execute the `tiup mirror clone <target-dir> --tidb v4.0.0` command to clone the v4.0.0 version of the TiDB component. | ||
- Execute the `tiup mirror clone <target-dir> --tidb v4.0.0 --tikv all` command to clone the v4.0.0 version of the TiDB component and all versions of the TiKV component. | ||
- Execute the `tiup mirror clone <target-dir> v4.0.0` command to clone the v4.0.0 version of all components in a cluster. | ||
|
||
## Usage examples | ||
|
||
This section introduces the usage examples of the `mirror` command. | ||
|
||
### Deploy a TiDB Cluster offline using TiUP | ||
|
||
Refer to [Deploy a TiDB Cluster Offline Using TiUP](/production-offline-deployment-using-tiup.md#manually-pack-an-offline-component-package-using-tiup-mirror-clone) to install the TiUP offline mirror, deploy a TiDB cluster, and start it. |
Oops, something went wrong.