!57 开源之夏2023-openGauss运维辅助工具

Merge pull request !57 from peaceLT/master
This commit is contained in:
opengauss_bot 2023-10-23 06:12:21 +00:00 committed by Gitee
commit dbf2bd7bd5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 1291 additions and 0 deletions

29
opengausss_orz/README.md Normal file
View File

@ -0,0 +1,29 @@
# openGauss运维辅助工具
基于Python的封装工具可以提供方便快捷的管理和运维操作通过简单的命令就能够执行常见的openGauss管理任务。
## 安装和使用
### 安装
1. 确保安装python3
2. `pip install -r requirements.txt`
3. 将orz.py和database.ini文件下载到自己电脑
4. 修改database.ini文件中数据库相关配置
5. 修改omm用户下.bashrc文件设置命令别称
`vim ~/.bashrc`
`alias orz = 'python3 /文件所在路径/orz.py'`
6. `source ~/.bashrc`
7. 运行requests文件安装所需包
### 使用
在omm用户下输入orz命令查看相关操作内容根据提示进行使用。

View File

@ -0,0 +1,6 @@
[connect]
host = 192.168.226.130
port = 15400
database = mydb
username = omm
password = 123456

1255
opengausss_orz/orz.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
prettytable==2.2.0