v1.1
- 关于PTK
- 快速上手
- 安装PTK
- 使用手册
- 配置文件字段说明
- 配置文件示例
- 命令介绍
- ptk
- ptk completion
- ptk register
- ptk init-cluster
- ptk collect
- ptk rec-guc
- ptk cache
- ptk gen-ptkc
- ptk manage
- ptk demo
- ptk meta
- ptk version
- ptk self
- ptk gen-om-xml
- ptk env
- ptk gen-static-config
- ptk cluster
- ptk cluster rename
- ptk cluster throwout
- ptk cluster takeover
- ptk cluster uninstall-cm
- ptk cluster install-cm
- ptk cluster gen-cert-files
- ptk cluster load-cm-vip
- ptk cluster del-kerberos-auth
- ptk cluster add-kerberos-auth
- ptk cluster uninstall-kerberos-server
- ptk cluster install-kerberos-server
- ptk cluster is-in-upgrade
- ptk cluster upgrade-rollback
- ptk cluster upgrade-commit
- ptk cluster upgrade
- ptk cluster demote
- ptk cluster promote
- ptk cluster refresh
- ptk cluster shell
- ptk cluster modify-comment
- ptk cluster show-config
- ptk cluster set-guc
- ptk cluster show-guc
- ptk cluster set-hba
- ptk cluster show-hba
- ptk cluster scale-out
- ptk cluster scale-in
- ptk cluster uninstall-mogha
- ptk cluster install-mogha
- ptk cluster list-plugins
- ptk cluster install-plugin
- ptk cluster inspect
- ptk cluster failover
- ptk cluster switchover
- ptk cluster build
- ptk cluster status
- ptk cluster restart
- ptk cluster stop
- ptk cluster start
- ptk uninstall
- ptk ls
- ptk install
- ptk exec
- ptk template
- ptk encrypt
- ptk checkos
- ptk download
- ptk candidate
- 故障排查
- 常见问题
- 发布记录
- GPTK - 图形化部署工具
- 社区
- 附录:YAML语法
插件安装
MogDB 插件的使用请参考相关文档
PTK 插件安装会自动通过判断当前集群的版本,下载对应的插件包进行安装。
安装成功后,PTK 不会在数据库中创建 extension,需用户根据需要手动在数据库中参考插件安装指导进行创建。
查看帮助文档
# ptk cluster install-plugin -h
安装MogDB插件
Usage:
ptk cluster install-plugin [flags]
Flags:
-h, --help help for install-plugin
-H, --host strings 指定待安装的主机 IP,默认将安装到集群中的所有主机
-n, --name string 集群名称
--override 是否覆盖现有插件文件
-p, --pkg string 指定插件包路径
-P, --plugin strings 指定要安装的插件名称,默认会安装所有插件
安装全部插件
默认 PTK 会下载对应版本的安装包后安装全部插件到数据库,若需指定插件安装,可通过 -P
或 --plugin
指定。
安装示例:
# ptk cluster -n cluster_slirist install-plugin
INFO[2022-08-02T16:15:11.786] downloading Plugins-3.0.0-CentOS-x86_64.tar.gz...
> Plugins-3.0.0-CentOS-x86_64...: 70.71 MiB / 70.71 MiB [-----------------------------------------------] 100.00% 14.33 MiB p/s 5.1s
INFO[2022-08-02T16:15:17.629] download successfully
INFO[2022-08-02T16:15:17.651] scp file from /tmp/2451478859/Plugins-3.0.0-CentOS-x86_64.tar.gz to 192.168.122.101:/opt/mogdb/tool/Plugins-3.0.0-CentOS-x86_64.tar.gz host=192.168.122.101
INFO[2022-08-02T16:15:17.651] scp file from /tmp/2451478859/Plugins-3.0.0-CentOS-x86_64.tar.gz to 192.168.122.102:/opt/mogdb/tool/Plugins-3.0.0-CentOS-x86_64.tar.gz host=192.168.122.102
INFO[2022-08-02T16:15:17.781] mkdir /opt/mogdb/tool/plugins host=192.168.122.101
> upload Plugins-3.0.0-CentOS...: 70.71 MiB / 70.71 MiB [--------------------------------------------------------] 100.00% 124.92 MiB p/s 800ms
INFO[2022-08-02T16:15:18.437] mkdir /opt/mogdb/tool/plugins host=192.168.122.102
INFO[2022-08-02T16:15:18.606] decompress Plugins-3.0.0-CentOS-x86_64.tar.gz to dir /opt/mogdb/tool/plugins host=192.168.122.102
INFO[2022-08-02T16:15:19.816] change /opt/mogdb/tool/plugins owner to vmx host=192.168.122.101
INFO[2022-08-02T16:15:20.542] change /opt/mogdb/tool/plugins owner to vmx host=192.168.122.102
INFO[2022-08-02T16:15:20.562] installing plugin [dblink] ... host=192.168.122.101
INFO[2022-08-02T16:15:20.562] installing plugin [dolphin] ... host=192.168.122.102
INFO[2022-08-02T16:15:20.627] plugin [dblink] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:20.627] installing plugin [wal2json] ... host=192.168.122.101
INFO[2022-08-02T16:15:20.668] plugin [wal2json] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:20.668] installing plugin [pg_bulkload] ... host=192.168.122.101
INFO[2022-08-02T16:15:20.725] plugin [dolphin] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:20.725] installing plugin [postgis] ... host=192.168.122.102
INFO[2022-08-02T16:15:20.734] plugin [pg_bulkload] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:20.734] installing plugin [pg_prewarm] ... host=192.168.122.101
INFO[2022-08-02T16:15:20.771] plugin [pg_prewarm] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:20.771] installing plugin [dolphin] ... host=192.168.122.101
INFO[2022-08-02T16:15:20.881] plugin [dolphin] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:20.881] installing plugin [postgis] ... host=192.168.122.101
INFO[2022-08-02T16:15:20.985] plugin [postgis] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:20.985] installing plugin [dblink] ... host=192.168.122.102
INFO[2022-08-02T16:15:21.042] plugin [dblink] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:21.042] installing plugin [wal2json] ... host=192.168.122.102
INFO[2022-08-02T16:15:21.075] plugin [postgis] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:21.075] installing plugin [pg_trgm] ... host=192.168.122.101
INFO[2022-08-02T16:15:21.112] plugin [wal2json] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:21.112] installing plugin [pg_bulkload] ... host=192.168.122.102
INFO[2022-08-02T16:15:21.117] plugin [pg_trgm] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:21.117] installing plugin [orafce] ... host=192.168.122.101
INFO[2022-08-02T16:15:21.160] plugin [orafce] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:21.160] installing plugin [pg_repack] ... host=192.168.122.101
INFO[2022-08-02T16:15:21.200] plugin [pg_repack] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:21.200] installing plugin [whale] ... host=192.168.122.101
INFO[2022-08-02T16:15:21.208] plugin [pg_bulkload] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:21.208] installing plugin [pg_prewarm] ... host=192.168.122.102
INFO[2022-08-02T16:15:21.243] plugin [whale] installed successfully host=192.168.122.101
INFO[2022-08-02T16:15:21.266] plugin [pg_prewarm] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:21.266] installing plugin [pg_trgm] ... host=192.168.122.102
INFO[2022-08-02T16:15:21.321] plugin [pg_trgm] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:21.321] installing plugin [orafce] ... host=192.168.122.102
INFO[2022-08-02T16:15:21.384] plugin [orafce] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:21.384] installing plugin [pg_repack] ... host=192.168.122.102
INFO[2022-08-02T16:15:21.444] plugin [pg_repack] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:21.444] installing plugin [whale] ... host=192.168.122.102
INFO[2022-08-02T16:15:21.510] plugin [whale] installed successfully host=192.168.122.102
INFO[2022-08-02T16:15:26.949] All done
INFO[2022-08-02T16:15:26.949] Time elapsed: 15s