Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tiup: refactor tiup reference #4868

Merged
merged 76 commits into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
6afee2c
Prepare to change
lucklove Nov 10, 2020
0e76708
Introduce reference
lucklove Nov 11, 2020
d8fda1c
Add reference for tiup list and tiup uninstall
lucklove Nov 11, 2020
2077674
mirror WIP
lucklove Nov 26, 2020
14e8a3a
Update
lucklove Dec 9, 2020
724aea0
Add tiup mirror command
lucklove Dec 10, 2020
7d34944
More document for mirror
lucklove Dec 16, 2020
cfe4a2c
Add doc
lucklove Dec 17, 2020
0098142
Update publish document
lucklove Dec 18, 2020
448f74f
Update document for mirror
lucklove Dec 22, 2020
637a92f
Finish the command section
lucklove Dec 24, 2020
769ddff
Add topology reference for tiup-cluster
lucklove Dec 30, 2020
89feb16
Document for dm cluster topology
lucklove Dec 31, 2020
96fbf83
Update
lucklove Jan 5, 2021
35807e7
Finish dm
lucklove Jan 7, 2021
c330d88
Finish dm
lucklove Jan 7, 2021
186d4bc
Address comment
lucklove Jan 11, 2021
f508d7b
Fix lint
lucklove Jan 11, 2021
0872ad1
Merge branch 'master' into tiup
lucklove Jan 11, 2021
00c69e7
Fix link
lucklove Jan 11, 2021
8022482
Fix lint
lucklove Jan 11, 2021
0b1a0be
Merge branch 'master' into tiup
TomShawn Jan 11, 2021
ee910ad
Merge branch 'master' into tiup
lucklove Jan 12, 2021
5c09de5
Remove unused aliases
lucklove Jan 20, 2021
6d82fd4
Remove description title
lucklove Jan 20, 2021
46f2276
Apply suggestions from code review
lucklove Jan 20, 2021
92ec495
Merge branch 'tiup' of https://github.com/lucklove/docs-cn into tiup
lucklove Jan 20, 2021
ecb7df4
Apply suggestions from code review
lucklove Jan 21, 2021
85c60ee
Apply suggestions from code review
lucklove Jan 22, 2021
c9fde0c
Apply suggestions from code review
lucklove Jan 22, 2021
cf58861
Apply suggestions from code review
lucklove Jan 22, 2021
3465363
Address comment
lucklove Jan 22, 2021
e78004c
Merge branch 'master' into tiup
lucklove Jan 25, 2021
3c6384b
Merge branch 'master' into tiup
lucklove Jan 26, 2021
e2321f2
Merge branch 'master' into tiup
lucklove Jan 28, 2021
bb6ca71
Apply suggestions from code review
lucklove Jan 29, 2021
aa71655
Merge branch 'master' into tiup
lucklove Jan 29, 2021
ef916b9
Update tiup/tiup-reference.md
lucklove Jan 29, 2021
cb6bced
Address comment
lucklove Jan 29, 2021
aaf4ed6
Merge branch 'master' into tiup
lucklove Feb 1, 2021
ae9ea1e
Address comment
lucklove Feb 1, 2021
4f935fa
Update tiup-command-clean.md
yikeke Feb 1, 2021
d7ea451
fix a typo
Feb 1, 2021
258e28f
Apply suggestions from code review
lucklove Feb 1, 2021
2e9c211
Address comment
lucklove Feb 1, 2021
73b54a9
Address comment
lucklove Feb 1, 2021
5a14917
Apply suggestions from code review
lucklove Feb 1, 2021
f26f895
Update tiup/tiup-mirror-reference.md
lucklove Feb 1, 2021
85a6968
Merge branch 'master' into tiup
lucklove Feb 1, 2021
6d3a5af
Address comment
lucklove Feb 1, 2021
f1654e8
Apply suggestions from code review
lucklove Feb 1, 2021
f0e7a66
Address comment
lucklove Feb 1, 2021
000800b
Apply suggestions from code review
lucklove Feb 2, 2021
a2c1669
Merge branch 'master' into tiup
TomShawn Feb 3, 2021
9dc570e
refine format and remove control characters
TomShawn Feb 3, 2021
8424606
correct spelling and format
TomShawn Feb 3, 2021
99e5f99
Merge branch 'master' into tiup
TomShawn Feb 4, 2021
84859dc
Merge branch 'master' into tiup
TomShawn Feb 17, 2021
9c36c71
Merge branch 'master' into tiup
TomShawn Feb 18, 2021
dce1411
Resolve comment
lucklove Feb 22, 2021
ecbe08f
Apply suggestions from code review
lucklove Feb 22, 2021
a624e66
Merge branch 'tiup' of https://github.com/lucklove/docs-cn into tiup
lucklove Feb 22, 2021
bee0ba1
Merge branch 'master' into tiup
lucklove Feb 22, 2021
67e711b
Update tiup/tiup-command-completion.md
lucklove Feb 24, 2021
e58c0f7
Address comment
lucklove Feb 24, 2021
1b8ea3b
Merge branch 'tiup' of https://github.com/lucklove/docs-cn into tiup
lucklove Feb 24, 2021
8768213
Fix link
lucklove Feb 24, 2021
a00215c
Apply suggestions from code review
lucklove Feb 24, 2021
b869c11
Address comment
lucklove Feb 25, 2021
6794b15
Merge branch 'tiup' of https://github.com/lucklove/docs-cn into tiup
lucklove Feb 25, 2021
d2d4d8c
Merge branch 'master' into tiup
TomShawn Mar 1, 2021
dbd243e
Merge branch 'master' into tiup
yikeke Mar 1, 2021
7bbaecf
Fix link
lucklove Mar 1, 2021
69ff4f8
Address comment
lucklove Mar 1, 2021
4005fd3
add links to tiup-cluster-topology-reference.md
Mar 1, 2021
b82fddf
fix links
Mar 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Finish the command section
  • Loading branch information
lucklove committed Jan 7, 2021
commit 637a92f27788f16dc63d05aa6b110af1e07f12a0
46 changes: 46 additions & 0 deletions tiup/tiup-command-completion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: tiup completion
aliases: ['/docs-cn/dev/tiup/tiup-command-completion/']
---

# tiup completion

## 介绍

为了记忆命令的心智负担,TiUP 提供了 `tiup completion` 命令用于生成命令行自动补全的配置文件,目前支持 `bash` 和 `zsh` 两种 shell 的命令补全。
lucklove marked this conversation as resolved.
Show resolved Hide resolved

如果是 bash,需要提前安装好 bash-completion:

- macOS 的安装方式为:`brew install bash-completion` 或者 `brew install bash-completion@2`(Bash 4.1+)
lucklove marked this conversation as resolved.
Show resolved Hide resolved
- Linux 的安装方式为:使用包管理器安装 `bash-completion` 包
lucklove marked this conversation as resolved.
Show resolved Hide resolved

## 语法

```sh
tiup completion <shell>
```

`<shell>` 为 shell 类型,目前支持 `bash` 和 `zsh`。

## 使用方式

### bash

将自动补全代码写入一个文件,并且在 .bash_profile 中 source 之:
lucklove marked this conversation as resolved.
Show resolved Hide resolved

```sh
tiup completion bash > ~/.completion.bash.inc
lucklove marked this conversation as resolved.
Show resolved Hide resolved

printf "
# tiup shell completion
source '$HOME/.completion.bash.inc'
" >> $HOME/.bash_profile

source $HOME/.bash_profile
```

### zsh

```sh
tiup completion zsh > "${fpath[1]}/_tiup"
```
29 changes: 29 additions & 0 deletions tiup/tiup-command-env.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: tiup env
aliases: ['/docs-cn/dev/tiup/tiup-command-env/']
---

# tiup env

## 介绍

TiUP 为用户提供了灵活的定制化接口,其中一部分是使用环境变量来实现的,命令 `tiup env` 用于查询 TiUP 支持用户自定义的环境变量以及它们此时的值。

## 语法

```sh
tiup env [name1...N]
```

`[name1...N]` 用于查看指定的环境变量,若不指定,则查看所有支持的环境变量。
lucklove marked this conversation as resolved.
Show resolved Hide resolved

## 选项


## 输出

- 若未指定 `[name1...N]`,则输出 "{key}"="{value}" 列表
- 若指定了 `[name1...N]`,则按顺序输出 "{value}" 列表

以上输出若 value 为空则代表其未设置,TiUP 会采用默认行为。
lucklove marked this conversation as resolved.
Show resolved Hide resolved
26 changes: 26 additions & 0 deletions tiup/tiup-command-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: tiup help
aliases: ['/docs-cn/dev/tiup/tiup-command-help/']
---

# tiup help

## 介绍

TiUP 在命令行界面为用户提供了丰富的帮助信息,这些帮助信息可以通过 `help` 命令或者 `--help` 参数获得,基本上,`tiup help <command>` 等价于 `tiup <command> --help`。
lucklove marked this conversation as resolved.
Show resolved Hide resolved

## 语法

```sh
tiup help [command]
```

`[command]` 用于指定要查看哪个命令的帮助信息,若不指定,则查看 TiUP 自身的帮助信息。

## 选项


## 输出

`[command]` 或 TiUP 的帮助信息。
33 changes: 33 additions & 0 deletions tiup/tiup-command-mirror-merge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: tiup mirror merge
aliases: ['/docs-cn/dev/tiup/tiup-command-mirror-merge/']
---

# tiup mirror merge

## 介绍

命令 `tiup mirror merge` 用于合并一个或多个镜像到当前镜像。在合并之前,需要使用命令 [tiup mirror set](/tiup/tiup-command-mirror-set.md) 指定当一个有权限发布组件的前镜像。
lucklove marked this conversation as resolved.
Show resolved Hide resolved

执行此命令需要满足几个条件:

- 目标镜像的所有组件的管理员 ID 必须在当前镜像中存在
- 执行该命令的用户的 `${TIUP_HOME}/keys` 目录中有上述管理员 ID 在当前镜像中对应的所有的私钥
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两个是 && 的关系,应该是同级的列表吧?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同级的列表是指?


## 语法

```sh
tiup mirror merge <mirror-dir-1> [mirror-dir-N] [flags]
```

- `<mirror-dir-1>`:要合并到当前镜像的第一个镜像
- `[mirror-dir-N]`:要合并到当前镜像的第 N 个镜像

## 选项


## 输出

- 成功:无输出
- 当前镜像缺失目标镜像某个组件的管理员,或 `${TIUP_HOME}/keys` 缺失该管理员的私钥:`Error: missing owner keys for owner %s on component %s`
2 changes: 1 addition & 1 deletion tiup/tiup-command-mirror.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ tiup mirror <command> [flags]
- [modify](/tiup/tiup-command-mirror-modify.md): 修改当前镜像中的组件属性
- [rotate](/tiup/tiup-command-mirror-rotate.md): 更新当前镜像中的根证书
- [clone](/tiup/tiup-command-mirror-rotate.md): 从已有镜像克隆一个新的镜像
- merge: 合并两个或多个镜像
- [merge](/tiup/tiup-command-mirror-merge.md): 合并镜像
47 changes: 47 additions & 0 deletions tiup/tiup-command-telemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: tiup telemetry
aliases: ['/docs-cn/dev/tiup/tiup-command-telemetry/']
---

# tiup telemetry

## 介绍

TiDB、TiUP 及 TiDB Dashboard 默认会收集使用情况信息,并将这些信息分享给 PingCAP 用于改善产品,例如,通过这些使用情况信息,PingCAP 可以了解常见的 TiDB 集群操作,从而确定新功能优先级。
lucklove marked this conversation as resolved.
Show resolved Hide resolved

当 TiUP 遥测功能开启时,执行 TiUP 命令时将会将使用情况信息分享给 PingCAP,包括(但不限于):
lucklove marked this conversation as resolved.
Show resolved Hide resolved

- 随机生成的遥测标示符
- TiUP 命令的执行情况,如命令执行是否成功、命令执行耗时等
- 使用 TiUP 进行部署的情况,如部署的目标机器硬件信息、组件版本号、修改过的部署配置名称等

TiUP 使用命令 `tiup telemetry` 来控制遥测。

## 语法

```sh
tiup telemetry <command>
```

`<command>` 代表子命令,支持的子命令列表请参考下方命令一节。

## 命令

### status

命令 `tiup telemetry status` 查看当前的遥测设置,输出以下信息:

- status: 当前是否开启遥测(enable|disable)
- uuid: 随机生成的遥测标示符

### reset

命令 `tiup telemetry reset` 重置当前的遥测标示符,以一个新的随机标识符代替之。

### enable

命令 `tiup telemetry enable` 启用遥测。

### disable

命令 `tiup telemetry disable` 停用遥测。
8 changes: 4 additions & 4 deletions tiup/tiup-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ tiup [flags] <component> [args...] # 运行组件
- [status](/tiup/tiup-command-status.md):查看组件运行状态
- [clean](/tiup/tiup-command-clean.md):清理组件数据目录
- [mirror](/tiup/tiup-command-mirror.md):镜像管理
- telemetry:遥测开关
- completion:TiUP 命令补全
- env:查看 TiUP 相关环境变量
- help:查看特定命令或组件的帮助文档
- [telemetry](/tiup/tiup-command-telemetry.md):遥测开关
- [completion](/tiup/tiup-command-completion.md):TiUP 命令补全
- [env](/tiup/tiup-command-env.md):查看 TiUP 相关环境变量
- [help](/tiup/tiup-command-help.md):查看特定命令或组件的帮助文档

## 组件清单
lucklove marked this conversation as resolved.
Show resolved Hide resolved

Expand Down