forked from pingcap/docs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cherry pick pingcap#5285 to release-5.0
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
- Loading branch information
Showing
11 changed files
with
185 additions
and
9 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
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,30 @@ | ||
--- | ||
title: tiup mirror merge | ||
--- | ||
|
||
# tiup mirror merge | ||
|
||
The `tiup mirror merge` command is used to merge one or more mirrors to the current mirror. | ||
|
||
To execute this command, the following conditions must be met: | ||
|
||
- The owner IDs of all components of the target mirror exist in the current mirror. | ||
- The `${TIUP_HOME}/keys` directory of the user who executes this command contains all the private keys corresponding to the above owner IDs in the current mirror (you can use the command [`tiup mirror set`](/tiup/tiup-command-mirror-set.md) to switch the current mirror to the mirror that is currently authorized to modify). | ||
|
||
## Syntax | ||
|
||
```shell | ||
tiup mirror merge <mirror-dir-1> [mirror-dir-N] [flags] | ||
``` | ||
|
||
- `<mirror-dir-1>`: the first mirror to be merged into the current mirror | ||
- `[mirror-dir-N]`: the Nth mirror to be merged into the current mirror | ||
|
||
## Option | ||
|
||
None | ||
|
||
## Outputs | ||
|
||
- If the command is executed successfully, there is no output. | ||
- If the current mirror does not have a component owner of the target mirror, or if `${TIUP_HOME}/keys` does not have the owner's private key, TiUP reports the `Error: missing owner keys for owner %s on component %s` error. |
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,62 @@ | ||
--- | ||
title: tiup mirror modify | ||
--- | ||
|
||
# tiup mirror modify | ||
|
||
The `tiup mirror modify` command is used to modify published components. Only valid component owners can modify the components that they have published on their own. For the method to publish a component, refer to the [`publish` command](/tiup/tiup-command-mirror-publish.md). | ||
|
||
## Syntax | ||
|
||
```shell | ||
tiup mirror modify <component>[:version] [flags] | ||
``` | ||
|
||
Each parameter is explained as follows: | ||
|
||
- `<component>`: the component name | ||
- `[version]`: the component version to modify. If it is not specified, the entire component is modified. | ||
|
||
## Options | ||
|
||
### -k, --key | ||
|
||
- Specifies the component owner's private key used for signing the component information (`{component}.json`). | ||
- Data type: `STRING` | ||
- If this option is not specified in the command, `"${TIUP_HOME}/keys/private.json"` is used by default to sign the component information. | ||
|
||
### --yank | ||
|
||
Marks a specified component or version as unavailable. | ||
|
||
- After the component is marked as unavailable, you can neither see it in the result list of `tiup list` nor install the new version of the component. | ||
- After a component version is marked as unavailable, you can neither see it in the result list of `tiup list <component>` nor install this version. | ||
- Data type: `BOOLEAN` | ||
- This option is disabled by default and its default value is `false`. To enable this option, you can add this option to the command, and pass the `true` value or do not pass any value. | ||
|
||
### --hide | ||
|
||
- Specifies whether to hide the component. If a component is hidden, you cannot see it in the result list of `tiup list`. To see the hidden component, you can use `tiup list --all`. | ||
- Data type: `BOOLEAN` | ||
- This option is disabled by default and its default value is `false`. To enable this option, you can add this option to the command, and pass the `true` value or do not pass any value. | ||
|
||
> **Note:** | ||
> | ||
> This option can only be applied to the component, not to the component version. | ||
### --standalone | ||
|
||
- Controls whether the component can run standalone. This option is currently **NOT available**. | ||
- Data type: `BOOLEAN` | ||
- This option is disabled by default and its default value is `false`. To enable this option, you can add this option to the command, and pass the `true` value or do not pass any value. | ||
|
||
> **Note:** | ||
> | ||
> This option can only be applied to the component, not to the component version. | ||
## Outputs | ||
|
||
- If the command is executed successfully, there is no output. | ||
- If the component owner is not authorized to modify the target component: | ||
- If the mirror is a remote mirror, TiUP reports the error `Error: The server refused, make sure you have access to this component`. | ||
- If the mirror is a local mirror, TiUP reports the error `Error: the signature is not correct`. |
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,47 @@ | ||
--- | ||
title: tiup mirror sign | ||
--- | ||
|
||
# tiup mirror sign | ||
|
||
The `tiup mirror sign` command is used to sign the metadata files (*.json)defined in TiUP [mirror](/tiup/tiup-mirror-reference.md). These metadata files might be stored on the local file system or remotely stored using the HTTP protocol to provide a signature entry. | ||
|
||
## Syntax | ||
|
||
```shell | ||
tiup mirror sign <manifest-file> [flags] | ||
``` | ||
|
||
`<manifest-file>` is the address of the file to be signed, which has two forms: | ||
|
||
- Network address, which starts with HTTP or HTTPS, such as `http://172.16.5.5:8080/rotate/root.json` | ||
- Local file path, which is a relative path or an absolute path | ||
|
||
If it is a network address, this address must provide the following features: | ||
|
||
- Supports the access via `http get` that returns the complete content of the signed file (including the `signatures` field). | ||
- Supports the access via `http post`. The client adds the signature to the `signatures` field of the content that is returned by `http get` and posts to this network address. | ||
|
||
## Options | ||
|
||
### -k, --key | ||
|
||
- Specifies the location of the private key used for signing the `{component}.json` file. | ||
- Data type: `STRING` | ||
- - If this option is not specified in the command, `"${TIUP_HOME}/keys/private.json"` is used by default. | ||
|
||
### --timeout | ||
|
||
- Specifies the access timeout time for signing through the network. The unit is in seconds. | ||
- Data type: `INT` | ||
- Default: 10 | ||
|
||
> **Note:** | ||
> | ||
> This option is valid only when `<manifest-file>` is a network address. | ||
## Output | ||
|
||
- If the command is executed successfully, there is no output. | ||
- If the file has been signed by the specified key, TiUP reports the error `Error: this manifest file has already been signed by specified key`. | ||
- If the file is not a valid manifest, TiUP reports the error `Error: unmarshal manifest: %s`. |
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,37 @@ | ||
--- | ||
title: tiup mirror | ||
--- | ||
|
||
# tiup mirror | ||
|
||
In TiUP, [mirror](/tiup/tiup-mirror-reference.md) is an important concept. TiUP currently supports two forms of mirroring: | ||
|
||
- Local mirror: the TiUP client and the mirror are on the same machine, and the client accesses the mirror through the file system. | ||
- Remote mirror: the TiUP client and the mirror are not on the same machine, and the client accesses the mirror through network. | ||
|
||
The `tiup mirror` command is used to manage mirrors and provides ways to create mirrors, distribute components, and manage keys. | ||
|
||
## Syntax | ||
|
||
```shell | ||
tiup mirror <command> [flags] | ||
``` | ||
|
||
`<command>` stands for sub-commands. For the list of supported sub-commands, refer to the [command list](#command-list) below. | ||
|
||
## Option | ||
|
||
None | ||
|
||
## Command list | ||
|
||
- [genkey](/tiup/tiup-command-mirror-genkey.md): generates the private key file | ||
- [sign](/tiup/tiup-command-mirror-sign.md): signs a specific file using a private key file | ||
- init<!-- (/tiup/tiup-command-mirror-init.md) -->: initiates an empty mirror | ||
- [set](/tiup/tiup-command-mirror-set.md): sets the current mirror | ||
- [grant](/tiup/tiup-command-mirror-grant.md): grants a new component owner for the current mirror | ||
- [publish](/tiup/tiup-command-mirror-publish.md): publishes new components to the current mirror | ||
- [modify](/tiup/tiup-command-mirror-modify.md): modifies the attributes of the components in the current mirror | ||
- rotate<!-- (/tiup/tiup-command-mirror-rotate.md) -->: updates the root certificate in the current mirror | ||
- [clone](/tiup/tiup-command-mirror-clone.md): clones a new mirror from an existing one | ||
- [merge](/tiup/tiup-command-mirror-merge.md): merges mirrors |