当前位置:网站首页>Introduction to TiUP
Introduction to TiUP
2022-07-30 15:41:00 【Tim's Shop】
在各种系统软件和应用软件的安装管理中,包管理器均有着广泛的应用,包管理工具的出现大大简化了软件的安装和升级维护工作.例如,几乎所有使用 RPM 的 Linux 都会使用 yum 来进行包管理,而 Anaconda 则可以非常方便地管理 Python 的环境和相关软件包.
在早期的 TiDB 生态中,There is no dedicated package management tool,Users can only manage manually through the corresponding configuration file and folder naming,如 Prometheus Other third-party monitoring reporting tools even require additional special management,This greatly increases the difficulty of operation and maintenance management.
从 TiDB 4.0 版本开始,TiUP 作为新的工具,承担着包管理器的角色,管理着 TiDB 生态下众多的组件,如 TiDB、PD、TiKV 等.用户想要运行 TiDB 生态中任何组件时,只需要执行 TiUP 一行命令即可,相比以前,极大地降低了管理难度.
安装 TiUP
TiUP The installation process is very simple,无论是 Darwin 还是 Linux 操作系统,Execute one line of command to install successfully:
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
该命令将 TiUP 安装在 $HOME/.tiup
文件夹下,The components installed later and the data generated by the operation of the components will also be placed in this folder.同时,它还会自动将 $HOME/.tiup/bin
加入到 Shell Profile 文件的 PATH 环境变量中,这样你就可以直接使用 TiUP 了.
例如,你可以查看 TiUP 的版本:
tiup --version
注意
TiUP 默认会收集使用情况信息,并将这些信息分享给 PingCAP 用于改善产品.若要了解所收集的信息详情及如何禁用该行为,请参见遥测.
TiUP 生态介绍
TiUP The direct function is as TiDB A package manager in the ecosystem,But that's not its ultimate mission.TiUP 的愿景是将 TiDB The threshold for using all tools in the ecosystem is reduced to the extreme,This is not possible with package management functions alone,Some additional packages need to be introduced to enrich the system,They are added together TiUP 生态中,让 TiDB The world becomes simpler.
TiUP The main content of the series of documents is the introduction TiUP and how these packages function and are used.
在 TiUP 生态中,You can do this by appending to any command --help
way to get help information,For example, it can be obtained by the following command TiUP its own help information:
tiup --help
TiUP is a command-line component management tool that can help to download and install TiDB platform components to the local system. You can run a specific version of a component via "tiup <component>[:version]". If no version number is specified, the latest version installed locally will be used. If the specified component does not have any version installed locally, the latest stable version will be downloaded from the repository. Usage: tiup [flags] <command> [args...] tiup [flags] <component> [args...] Available Commands: install Install a specific version of a component list List the available TiDB components or versions uninstall Uninstall components or versions of a component update Update tiup components to the latest version status List the status of instantiated components clean Clean the data of instantiated components mirror Manage a repository mirror for TiUP components help Help about any command or component Components Manifest: use "tiup list" to fetch the latest components manifest Flags: -B, --binary <component>[:version] Print binary path of a specific version of a component <component>[:version] and the latest version installed will be selected if no version specified --binpath string Specify the binary path of component instance -h, --help help for tiup --skip-version-check Skip the strict version check, by default a version must be a valid SemVer string -T, --tag string Specify a tag for component instance -v, --version version for tiup Component instances with the same "tag" will share a data directory ($TIUP_HOME/data/$tag): $ tiup --tag mycluster playground Examples: $ tiup playground # Quick start $ tiup playground nightly # Start a playground with the latest nightly version $ tiup install <component>[:version] # Install a component of specific version $ tiup update --all # Update all installed components to the latest version $ tiup update --nightly # Update all installed components to the nightly version $ tiup update --self # Update the "tiup" to the latest version $ tiup list # Fetch the latest supported components list $ tiup status # Display all running/terminated instances $ tiup clean <name> # Clean the data of running/terminated instance (Kill process if it's running) $ tiup clean --all # Clean the data of all running/terminated instances Use "tiup [command] --help" for more information about a command.
The output of the help message is longer,You can focus on only two parts:
- 可用的命令
- install:Used to install components
- list:See the list of available components
- uninstall:卸载组件
- update:更新组件版本
- status:View component operation records
- clean:Clear the component run log
- mirror:Clone a private image from the official image
- help:输出帮助信息
- 可用的组件
- playground:Start the cluster locally
- client:Connect to the local cluster
- cluster:Deploy the cluster for production use
- bench:Stress test the database
注意
- Available components will continue to increase,以
tiup list
The output result shall prevail. - The list of available versions of components also continues to grow,以
tiup list <component>
The output result shall prevail.
The difference between commands and components is that,命令是 TiUP 自带的,Operations for package management.而组件是 TiUP Packages of stand-alone components installed through package management operations.比如执行 tiup list
命令,TiUP It will run its own internal code directly,而执行 tiup playground
The command will first check whether there is a local name playground 的组件包,If not, download it from the mirror first,Then run the package.
边栏推荐
猜你喜欢
分布式前修课:MySQL实现分布式锁
ISELED---the new choice of ambient lighting scheme
952. 按公因数计算最大组件大小 : 枚举质因数 + 并查集运用题
Memory-mapped, bit-band operations
Alluxio为Presto赋能跨云的自助服务能力
Flink本地UI运行
Redis cache penetration, breakdown, avalanche and consistency issues
(Crypto必备干货)详细分析目前NFT的几大交易市场
延时消息队列
Our company has used gateway services for 6 years, dynamic routing, authentication, current limiting, etc., a stable batch!
随机推荐
【云原生】阿里云ARMS业务实时监控
tiup completion
难道Redis真的变慢了吗?
Fink异步IO的实战(关联维表)
如何写一份高可读性的软件工程设计文档
tiup help
TensorFlow自定义训练函数
CMake库搜索函数居然不搜索LD_LIBRARY_PATH
GeoServer + openlayers
How to do a good job in technology selection
类和对象(下篇)
HTTP缓存小结
Load Base Split 使用文档
1700. 无法吃午餐的学生数量
【为宏正名】99%的人从第一天学习C语言就自废的武功
Distributed pre-course: MySQL implements distributed locks
Configuration - Notes
编译、链接 - 笔记 - 3
L2-007 家庭房产(vector、set、map的使用)
Sleuth+Zipkin (visualization) service link tracking