35 Star 31 Fork 93

openGauss / openGauss-workbench

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MulanPSL-2.0

openGauss DataKit

openGauss的安装、运维场景对于初级用户或单纯想要测试openGauss数据库基本特性的使用者来说技术难度较大、过程较为复杂、学习曲线较为陡峭,尤其企业版安装对一般用户来说操作难度很大。使用可视化运维平台可以屏蔽openGauss的技术细节,让普通用户能够快速上手体验功能,让运维人员能够快速在企业环境中部署、卸载各类openGauss集群,减少了用户的学习成本和运维成本,实现了对openGauss各种常见操作的可视化,屏蔽了各种不同openGauss版本中的运维命令差异,可以让用户使用相同的方式操作数据库,不用知道命令细节也可以使用openGauss数据库的各项能力,让用户可以专注于自身的业务领域。

因此需要开发一些有针对性的运维监控工具,为不同配置不同运维要求的客户提供运维技术支撑,这些都将是openGauss社区的宝贵资产。而社区急需一个一体化的平台通过插件的方式将这些工具进行整合,并支持方便快捷的个性化配置。

本项目是基于Web的openGauss的可视化的平台系统,目的是方便客户使用和管理openGauss可视化工具,可以为客户降低openGauss数据库安装使用门槛,做到安全中心管理,插件管理,以及其它功能包括一键化部署、卸载、组件化安装、多版本升级、日常运维和监控。

项目仓库结构

├── openGauss-datakit  //平台项目
├── plugins
├───├─alert-monitor         // 告警插件
├───├─base-ops              //基础运维插件项目
├───├─data-migration        //MySql数据迁移插件项目
├───├─data-studio           // Web 版本DataStudio
├───├─datakit-demo-plugin  //平台项目插件开发脚手架
├───├─datasync-mysql        //MySql数据迁移插件项目(已弃用)
├───├─observability-instance  //智能运维插件实例监控项目
├───├─observability-log-search  //智能运维插件日志检索项目
├───├─observability-sql-diagnosis  //智能运维插件慢sql诊断项目
├───├─openGauss-tools-monitor  // openGauss 数据库监控插件

下载链接

https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/tools/Datakit/Datakit-6.0.0-RC1.tar.gz

说明

  1. 插件需要安装在平台上运行,因此需要先将平台项目安装部署后,再将其他插件项目打包安装使用。

  2. 插件开发脚手架项目是为了方便开发者快速开发与平台适配的插件,而搭建的插件开发脚手架,开发者可在此脚手架之上开发业务功能。该脚手架配置的各项依赖版本已经经过验证,和平台兼容性最好,因此建议不要修改依赖版本。

编译代码

  1. 请提前安装java 11+, maven 3.8.0+, node v18+(含npm),并配置好maven镜像源和node镜像源
  2. 执行sh build.sh
  3. 编译输出件在output/Datakit-${pom_version}.tar.gz

安装步骤

  1. 解压安装包
    通过下载链接或编译代码获取安装包Datakit-6.0.0-RC1.tar.gz,解压安装包至datakit安装目录下,例如安装目录为/path/datakit_server时,解压目录如下:
    $ tar -zxvf Datakit-6.0.0-RC1.tar.gz -C /path/datakit_server
    ./application-temp.yml
    ./doc/
    ./doc/datasync-mysql-README.md
    ./doc/data-migration-README.md
    ./doc/datakit-README.md
    ./doc/datakit-demo-plugin-README.md
    ./doc/observability-log-search-README.md
    ./doc/observability-instance-README.md
    ./doc/data-studio-README.md
    ./doc/alert-monitor-README.md
    ./doc/observability-sql-diagnosis-README.md
    ./doc/compatibility-assessment-README.md
    ./doc/openGauss-tools-monitor-README.md
    ./doc/base-ops-README.md
    ./openGauss-datakit-6.0.0-RC1.jar
    ./run.sh
    ./visualtool-plugin/
    ./visualtool-plugin/webds-plugin-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/compatibility-assessment-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/observability-instance-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/observability-sql-diagnosis-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/observability-log-search-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/monitor-tools-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/data-migration-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/alert-monitor-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/datakit-demo-plugin-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/datasync-mysql-6.0.0-RC1-repackage.jar
    ./visualtool-plugin/base-ops-6.0.0-RC1-repackage.jar
  2. 创建新目录
    datakit安装目录下,创建新的目录config, files, ssl, logs
    $ cd /path/datakit_server
    mkdir config files ssl logs
  3. 更改配置文件 - 修改工作目录
    修改datakit安装目录下的application-temp.yml文件,文件中的/ops默认工作目录路径统一修改为实际datakit安装目录的路径/path/datakit_server,而第二步创建的目录就是为了此处统一使用的
    $ vim application-temp.yml
    system.defaultStoragePath: /ops/files
    server.ssl.key-store: /ops/ssl/keystore.p12
    logging.file.path: /ops/logs
  4. 更改配置文件 - 配置数据库
    数据库可选用openGauss或轻量嵌入式数据库Intarkdb,平台默认使用openGauss作为后台数据库。使用openGauss作为后台数据库时,需要正确配置openGauss的连接信息。配置内容如下:
    # For openGauss
    driver-class-name: org.opengauss.Driver
    url: jdbc:opengauss://ip:port/database?currentSchema=public&batchMode=off
    username: dbuser
    password: dbpassword
    使用轻量嵌入式数据库Intarkdb作为后台数据库时,只需注释openGauss的配置内容,并解开对Intarkdb配置内容的注释,即可完成配置。目前datakitbase-opsalert-monitor在启动时会在数据库初始化数据。配置内容如下:
    # For Intarkdb
    driver-class-name: org.intarkdb.IntarkdbJDBC
    url: jdbc:intarkdb:data/datakit
    配置文件更改完成后,保存并退出文件编辑,然后执行如下命令,将application-temp.yml文件移动到第二步创建的config目录下
    mv application-temp.yml config
    注意:此处使用openGauss作为后台数据库时,需要提前对数据库做一些参数配置,详细步骤请参考下方目录补充:openGauss参数配置
  5. 生成密钥信息
    修改并执行如下命令生成密钥信息。修改-storepass参数值与application.yml配置文件中的key-store-password值保持一致,默认时两者均为123456;修改-keystore路径值与配置文件中的key-store路径值保持一致,即第三步中修改/ops后的路径。
    keytool -genkey -noprompt -dname "CN=opengauss, OU=opengauss, O=opengauss, L=Beijing, S=Beijing, C=CN" -alias opengauss -storetype PKCS12 -keyalg RSA -keysize 2048 -keystore /ops/ssl/keystore.p12 -validity 3650 -storepass 123456
    注意:此处为一条完整命令。
  6. 启动与日常运维
    启动应用:
    sh ./run.sh start
    停止应用:
    sh ./run.sh stop
    重启应用:
    sh ./run.sh restart
    检查应用状态:
    sh ./run.sh status
  7. 访问服务
    启动成功后,通过浏览器输入如下地址:https://ip:9494/ 访问datakit服务,这里的ipdatakit服务安装在的主机ip9494datakit服务默认端口,如有修改请根据实际情况替换。初始用户为admin,初始密码为admin123,首次登录需修改初始密码。

补充:openGauss参数配置

  1. 安装openGauss数据库
    openGauss数据库的下载及安装请参考官网教程,这里不做赘述,下载地址:https://opengauss.org/zh/download/
  2. 切换数据库安装用户,并加载环境变量
    成功安装openGauss数据库后,主机切换到数据库安装用户,如omm用户。然后source环境变量文件,来加载openGauss的环境变量,如omm用户环境变量文件~/.bashrc。注意此环境变量文件为openGauss数据库环境变量所在文件,请根据实际情况替换。
    source ~/.bashrc
  3. 参数配置
    修改并执行如下命令,设置配置文件pg_hba.conf相关参数
    gs_guc set -D /opt/software/openGauss/data/single_node -h "host all all 0.0.0.0/0 sha256"
    修改并执行如下命令,配置文件postgresql.conf相关参数
    gs_guc set -D /opt/software/openGauss/data/single_node -c "listen_addresses = '*'"
    上述命令中的/opt/software/openGauss/data/single_node为数据库节点的安装目录路径,此目录下包含有上述两个文件,请根据数据库的实际情况替换。此处参数配置的目的是使得数据库接受来自任意ip地址的连接请求,以便在外部服务器可以成功连接到数据库。
  4. 重启数据库
    执行如下命令重新启动数据库,使参数配置生效。此处的/opt/software/openGauss/data/single_node请按第三步的方法替换为实际路径
    gs_ctl restart -D /opt/software/openGauss/data/single_node
  5. 连接数据库
    执行如下命令连接数据库,此处5432openGauss数据库默认端口,请根据实际情况替换
    gsql -d postgres -p 5432 -r
  6. 创建用户及数据库
    成功连接数据库后,依次执行如下三条命令,分别进行创建用户,赋予用户管理员权限,创建数据库的操作。
    create user opengauss_test with password 'Sample@123';
    grant all privileges to opengauss_test;
    create database db_datakit;
    由于openGauss数据库不支持通过初始用户进行远程连接,因此此处创建新的用户供datakit远程连接时使用。同时,由于datakit需要拥有管理员权限对数据库进行操作,因此需要赋予连接用户管理员权限。此处新建db_datakit数据库作为datakit平台的底层数据库使用,不用做任何操作,datakit成功连接后会自动初始化数据。
  7. 所有配置完成,保持openGauss数据库服务启动

参与开发

开发环境搭建参考 开发环境搭建

插件开发请参考openGauss-datakit/doc目录下的开发手册

新增插件请务必更新build.sh脚本,保证可以一键编译

木兰宽松许可证, 第2版 木兰宽松许可证, 第2版 2020年1月 http://license.coscl.org.cn/MulanPSL2 您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束: 0. 定义 “软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 “贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 “贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 “法人实体”是指提交贡献的机构及其“关联实体”。 “关联实体”是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 1. 授予版权许可 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 2. 授予专利许可 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 3. 无商标许可 “本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 4. 分发限制 您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 5. 免责声明与责任限制 “软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 6. 语言 “本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 条款结束 如何将木兰宽松许可证,第2版,应用到您的软件 如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步: 1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; 2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; 3, 请将如下声明文本放入每个源文件的头部注释中。 Copyright (c) [Year] [name of copyright holder] [Software Name] is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details. Mulan Permissive Software License,Version 2 Mulan Permissive Software License,Version 2 (Mulan PSL v2) January 2020 http://license.coscl.org.cn/MulanPSL2 Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions: 0. Definition Software means the program and related documents which are licensed under this License and comprise all Contribution(s). Contribution means the copyrightable work licensed by a particular Contributor under this License. Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. Legal Entity means the entity making a Contribution and all its Affiliates. Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. 1. Grant of Copyright License Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. 2. Grant of Patent License Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. 3. No Trademark License No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in Section 4. 4. Distribution Restriction You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. 5. Disclaimer of Warranty and Limitation of Liability THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 6. Language THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. END OF THE TERMS AND CONDITIONS How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps: i Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; ii Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package; iii Attach the statement to the appropriate annotated syntax at the beginning of each source file. Copyright (c) [Year] [name of copyright holder] [Software Name] is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.

简介

暂无描述 展开 收起
MulanPSL-2.0
取消

发行版 (1)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/opengauss/openGauss-workbench.git
git@gitee.com:opengauss/openGauss-workbench.git
opengauss
openGauss-workbench
openGauss-workbench
master

搜索帮助