当前位置:网站首页>TiUP 简介
TiUP 简介
2022-07-30 14:50:00 【添香小铺】
在各种系统软件和应用软件的安装管理中,包管理器均有着广泛的应用,包管理工具的出现大大简化了软件的安装和升级维护工作。例如,几乎所有使用 RPM 的 Linux 都会使用 yum 来进行包管理,而 Anaconda 则可以非常方便地管理 Python 的环境和相关软件包。
在早期的 TiDB 生态中,没有专门的包管理工具,使用者只能通过相应的配置文件和文件夹命名来手动管理,如 Prometheus 等第三方监控报表工具甚至需要额外的特殊管理,这样大大提升了运维管理难度。
从 TiDB 4.0 版本开始,TiUP 作为新的工具,承担着包管理器的角色,管理着 TiDB 生态下众多的组件,如 TiDB、PD、TiKV 等。用户想要运行 TiDB 生态中任何组件时,只需要执行 TiUP 一行命令即可,相比以前,极大地降低了管理难度。
安装 TiUP
TiUP 安装过程十分简洁,无论是 Darwin 还是 Linux 操作系统,执行一行命令即可安装成功:
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
该命令将 TiUP 安装在 $HOME/.tiup 文件夹下,之后安装的组件以及组件运行产生的数据也会放在该文件夹下。同时,它还会自动将 $HOME/.tiup/bin 加入到 Shell Profile 文件的 PATH 环境变量中,这样你就可以直接使用 TiUP 了。
例如,你可以查看 TiUP 的版本:
tiup --version
注意
TiUP 默认会收集使用情况信息,并将这些信息分享给 PingCAP 用于改善产品。若要了解所收集的信息详情及如何禁用该行为,请参见遥测。
TiUP 生态介绍
TiUP 的直接功能是作为 TiDB 生态中的包管理器,但这并不是它的最终使命。TiUP 的愿景是将 TiDB 生态中所有工具的使用门槛降到极致,这个仅仅靠包管理功能是做不到的,还需要引入一些额外的包来丰富这个系统,它们一起加入到 TiUP 生态中,让 TiDB 的世界变得更简单。
TiUP 系列文档的主要内容就是介绍 TiUP 及这些包的功能和使用方式。
在 TiUP 生态中,你可以通过在任何命令后加上 --help 的方式来获得帮助信息,比如通过以下命令获取 TiUP 本身的帮助信息:
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.
输出的帮助信息较长,你可以只关注两部分:
- 可用的命令
- install:用于安装组件
- list:查看可用组件列表
- uninstall:卸载组件
- update:更新组件版本
- status:查看组件运行记录
- clean:清除组件运行记录
- mirror:从官方镜像克隆一个私有镜像
- help:输出帮助信息
- 可用的组件
- playground:在本机启动集群
- client:连接本机的集群
- cluster:部署用于生产环境的集群
- bench:对数据库进行压力测试
注意
- 可用的组件会持续增加,以
tiup list输出结果为准。 - 组件的可用版本列表也会持续增加,以
tiup list <component>输出结果为准。
命令和组件的区别在于,命令是 TiUP 自带的,用于进行包管理的操作。而组件是 TiUP 通过包管理操作安装的独立组件包。比如执行 tiup list 命令,TiUP 会直接运行自己内部的代码,而执行 tiup playground 命令则会先检查本地有没有叫做 playground 的组件包,若没有则先从镜像上下载过来,然后运行这个组件包。
边栏推荐
- Metaverse Post Office AI space-themed series of digital collections will be launched at 10:00 on July 30th "Yuanyou Digital Collection"
- 【喂到嘴边了的模块】准备徒手撸GUI?用Arm-2D三分钟就够了
- LeetCode_数位枚举_困难_233.数字 1 的个数
- 阿里CTO程立:阿里巴巴的开源历程、理念和实践
- 存储器映射、位带操作
- JHM:芳环羟化双加氧酶数据库DARHD建立及相关引物评价
- 2022最新 | 室外单目深度估计研究综述
- [Cloud native] Grayscale release, blue-green release, rolling release, grayscale release explanation
- 【云原生】服务行业案例-不可预测的并发场景解决方案
- The use and principle of distributed current limiting reduction RRateLimiter
猜你喜欢

Extremely Knowing v2 Analysis

Distributed pre-course: MySQL implements distributed locks

阿里CTO程立:阿里巴巴的开源历程、理念和实践

Memory-mapped, bit-band operations

MongoDB启动报错 Process: 29784 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)

【云原生】阿里云ARMS业务实时监控

canal scrape data

Configuration - Notes

2022最新 | 室外单目深度估计研究综述

The highest level of wiring in the computer room, the beauty is suffocating
随机推荐
How do luxury giants such as GUCCI and LV deploy the metaverse, should other brands keep up?
如何写一份高可读性的软件工程设计文档
ECCV2022 | FPN错位对齐,实现高效半监督目标检测 (PseCo)
分布式前修课:MySQL实现分布式锁
MaxWell scraped data
Kubernetes应用管理深度剖析
转换OTU表和序列文件为PICRUST2需要的格式
JUC常见的线程池源码学习 02 ( ThreadPoolExecutor 线程池 )
JUC common thread pool source learning 02 ( ThreadPoolExecutor thread pool )
Alluxio for Presto fu can across the cloud self-service ability
952. 按公因数计算最大组件大小 : 枚举质因数 + 并查集运用题
R中按照数字大小进行排序
调试 - 笔记
Our company has used gateway services for 6 years, dynamic routing, authentication, current limiting, etc., a stable batch!
(科普文)什么是碎片化NFT(Fractional NFT)
关于MySQL主从复制的数据同步延迟问题
瑞吉外卖项目实战Day02
我们公司用了 6 年的网关服务,动态路由、鉴权、限流等都有,稳的一批!
websocket flv 客户端解封包
canal抓取数据