This action will force synchronization from openEuler/cantian, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
数据存储加速引擎
在cantian项目根目录创建library、platform、open_source三个目录:
当前Cantian依赖第三方软件有securec、zlib、lz4、Zstandard、openssl、protobuf、protubuf-c、pcre;
1、在编译Cantian之前,需要先编译依赖的开源及第三方软件。在cantian根路径下,创建open_source目录,下载步骤3中所涉及的三方依赖组件。
2、在open_source目录下创建各依赖组件头文件目录,如open_source/{component}/include/,并将组件源码中的头文件全部拷贝对应组件的include目录。
open_source目录组织结构
huawei_security lz4 openssl pcre protobuf protobuf-c zlib Zstandard
3、创建library目录,将编译好的各组件库拷到library/{component}/lib目录。如:libpcre2-8.so*、liblz4.so*、libzstd.so*、libprotobuf-c.a、libcrypto.a、libssl.a、libz.so*拷贝到对应组件的lib目录。
注:protobuf需要执行make install安装默认动态库加载路径,安装protobuf之后再安装protobuf-c。
library目录组织结构
huawei_security lz4 openssl pcre protobuf protobuf-c zlib Zstandard
4、将编译好的安全函数库libsecurec.a拷贝到library/huawei_security/lib目录下。
5、在根目录下创建platform/huawei_security/include目录,将securec.h、securectype.h安全函数头文件拷贝到此路径。
Debug:sh build_cantian.sh
Release:修改bash Makefile.sh package为bash Makefile.sh package-release后执行sh build_cantian.sh
完成编译后,安装包生成在/tmp/cantian_new目录中
注:报错无法找到protobuf-c.h的解决方案
将protobuf-c目录下的protobuf-c.h头文件拷贝至library/protobuf/protobuf-c目录下
计算节点需要配置至少两个网络平面: Cantian引擎心跳网络:用部署Cantian引擎的数据库服务器间通信 NAS共享网络:用作共享存储NAS共享
[root@host ~]# mkdir /home/regress
[root@host ~]# chmod 755 /home/regress
[root@host ~]# cd /home/regress/[root@host regress]# tar -zxvf cantian_connector_x86_64_RELEASE_*.tgz
deploy_user: 数据库配置的“用户:用户组”,预安装时创建,例如:“ctdba:ctdba”。
cluster_id: 集群id,同一阵列中必须确保该id不重复。
cluster_name: Cantian引擎集群名,比如“cantian_cluster01”, **deploy_mode为"--dbstore"必填**
node_id: 部署Cantian引擎的数据库服务器ID,枚举:0|1,两个数据库服务器分别设置成0和1。
cantian_vlan_ip: 用户指定本地用于与存储建立连接的IP,属于RoCE存储网络,比如“172.16.55.4,172.16.66.4”,**deploy_mode为"--dbstore"必填**
storage_vlan_ip: 用户在存储上配置的VLAN IP,属于RoCE存储网络,比如“172.16.55.2,172.16.55.3,172.16.66.2,172.16.66.3”,**deploy_mode为"--dbstore"必填**
in_container: 是否容器化部署,默认为1,无需修改。
cms_ip:数据库服务器间通信IP,所有数据库服务器IP均需填入,属于Cantian引擎心跳网络,比如“192.168.20.2,192.168.20.3”。先填入node_id为0的数据库服务器的IP、再填入node_id为1的数据库服务器的IP。
kerberos_key:指定Kerberos认证的安全选项。取值包括:
sys:使用UNIX UID和GID进行身份认证,不进行Kerberos加密保护;
krb5:使用Kerberos v5进行身份认证;krb5i:使用Kerberos v5进行身份认证,并使用安全校验对NFS操作进行完整性检查,以防止数据篡改;
krb5p:使用Kerberos v5进行身份认证、完整性检查,并加密NFS流量以防止流量嗅探。这是最安全的设置,但也需要更多的性能开销;
Kerberos认证的性能从高到低为:krb5 > krb5i > krb5p。
在NFS Kerberos服务使用场景中,这里的“kerberos_key”字段取值需要和4.3.3.2-2时设置的“Kerberos5权限”、“Kerberos5i权限”和“Kerberos5p权限”相匹配。
例如,这里挂载NFS时,指定“kerberos_key”字段取值为“krb5i”,那为客户端设置权限时,至少需要设置“Kerberos5i权限”。
storage_dbstore_fs: cantian引擎使用的存储文件系统名称,比如“fs_storage”。每个文件系统,只能部署一个Cantian引擎。**deploy_mode为"--nas"需要存储打开NFS4.1协议**
storage_share_fs: cms共享数据使用的存储文件系统名称,使用NFS4.0协议挂载,因此需要存储打开NFS4.0。每个文件系统,只能部署一个Cantian引擎。
storage_archive_fs: 归档使用的存储文件系统名称,使用NFS4.1协议挂载,因此需要存储打开NFS4.1。每个文件系统,只能部署一个Cantian引擎。
storage_metadata_fs: mysql元数据使用的存储文件系统名称,使用NFS4.1协议挂载,因此需要存储打开NFS4.1。
share_logic_ip: 挂共享数据使用的逻辑IP,比如“172.16.77.2”。
archive_logic_ip: 挂载归档使用的逻辑IP,比如“172.16.77.2”。
metadata_logic_ip: 挂载mysql元数据使用的逻辑IP,比如“172.16.77.2”。
storage_logic_ip: 挂载cantian引擎使用的逻辑IP,比如“172.16.77.2”,**deploy_mode为"--nas"必填**
link_type: 访问存储dbstor的协议,“2”表示RDMA_1823,“1”表示RDMA,“0”表示TCP。默认使用“1”即可,**deploy_mode为"--dbstore"必填**
db_type: 数据库类型,“0”表示性能模式,“1”表示开启归档模式。默认值为“0”。
MAX_ARCH_FILES_SIZE: 归档的最大容量,建议设置为storage_archive_fs对应的归档使用的存储文件系统可用空间的90%。
deploy_mode: 部署模式,取值--nas:使用nas共享进行部署,--dbstore:使用dbstore模式进行部署
ca_path: ca证书存放路径,比如:/opt/certificate/ca.crt
crt_path: 证书存放路径, 比如:/opt/certificate/mes.crt
key_path: 证书key存储路径,比如:/opt/certificate/mes.key
[root@host ~]# sh /home/regress/cantian_connector/action/appctl.sh install /home/regress/cantian_connector/action/config_params.json
根据回显的提示,依次输入:
[root@host ~]# sh /home/regress/cantian_connector/action/appctl.sh install reserve
脚本运行完成后,最后回显“install success”即安装成功。 4. 两台数据库服务器上均完成Cantian引擎的安装后,执行以下命令启动Cantian引擎
[root@host ~]# sh /home/regress/cantian_connector/action/appctl.sh start
根据提示输入cantian_sys密码
[root@host ~]# sh /home/regress/cantian_connector/action/appctl.sh stop
[root@host ~]# sh /home/regress/cantian_connector/action/appctl.sh uninstall override
[root@host ~]# sh /home/regress/cantian_connector/action/appctl.sh uninstall override force
[root@host ~]# sh /home/regress/cantian_connector/action/appctl.sh backup
[root@host ~]# sh /home/regress/cantian_connector/action/appctl.sh stop
[root@host ~]# sh /home/regress/cantian_connector/action/appctl.sh uninstall reserve
依次登录所有计算节点执行巡检指令(以ctdba用户为例):
全部巡检项指令:su - ctdba -c "python3 /opt/cantian/action/inspection/inspection_task.py all"
部分巡检项指令:su - ctdba -c "python3 /opt/cantian/action/inspection/inspection_task.py [xxx,xxx,…]"
说明:
根据回显提示,输入ctclient数据库用户名、密码、IP和端口号:
执行结果如下:
[cantiandba@node0-78 ~]$ python /opt/cantian/action/inspection/inspection_task.py all
Please input user: SYS
Please input password:
2023-09-07 14:51:15 INFO [pid:4167258] [MainThread] [tid:139729935162240] [gs_check.py:597 run_check] Start to run CheckSession
2023-09-07 14:51:15 INFO [pid:4167258] [MainThread] [tid:139729935162240] [gs_check.py:599 run_check] finish to run CheckSession
2023-09-07 14:51:15 INFO [pid:4167264] [MainThread] [tid:140497172671360] [gs_check.py:597 run_check] Start to run CheckTransaction
2023-09-07 14:51:15 INFO [pid:4167264] [MainThread] [tid:140497172671360] [gs_check.py:599 run_check] finish to run CheckTransaction
2023-09-07 14:51:15 INFO [pid:4167270] [MainThread] [tid:139769953201024] [gs_check.py:597 run_check] Start to run CheckDBVersion
2023-09-07 14:51:15 INFO [pid:4167270] [MainThread] [tid:139769953201024] [gs_check.py:599 run_check] finish to run CheckDBVersion
2023-09-07 14:51:15 INFO [pid:4167276] [MainThread] [tid:140700553079680] [gs_check.py:597 run_check] Start to run CheckDRCResRatio
2023-09-07 14:51:15 INFO [pid:4167282] [MainThread] [tid:140069366741888] [cms_res_check.py:27 fetch_cms_hbtime] cms res check start!
2023-09-07 14:51:15 INFO [pid:4167282] [MainThread] [tid:140069366741888] [cms_res_check.py:49 fetch_cms_hbtime] cms res check succ!
2023-09-07 14:51:15 INFO [pid:4167288] [MainThread] [tid:139929375972224] [cms_stat_check.py:33 fetch_cms_stat] cms stat check start!
2023-09-07 14:51:16 INFO [pid:4167288] [MainThread] [tid:139929375972224] [cms_stat_check.py:65 fetch_cms_stat] cms stat check succ!
2023-09-07 14:51:16 INFO [pid:4167410] [MainThread] [tid:140576152152960] [cms_version_check.py:14 fetch_cms_version] cms version check start!
2023-09-07 14:51:16 INFO [pid:4167410] [MainThread] [tid:140576152152960] [cms_version_check.py:25 fetch_cms_version] cms version check succ!
2023-09-07 14:51:16 INFO [pid:4167415] [MainThread] [tid:140255170087808] [gs_check.py:597 run_check] Start to run CheckArchiveStatus
2023-09-07 14:51:18 INFO [pid:4167415] [MainThread] [tid:140255170087808] [gs_check.py:599 run_check] finish to run CheckArchiveStatus
Component: [ntp_server_check, cantian_status, db_version_check, cms_res_check, cms_stat_check, cms_version_check, archive_status_check] inspection execute success,
component: [session_used_check, long_transaction_check, drc_res_ratio_check ]inspection execute failed;
inspection result file is /opt/cantian/action/inspection/inspections_log/inspection_cantian_xxx_20230907145118
如果执行全部巡检或者部分巡检项涉及登录zsql数据库操作的,需要输入zsql数据库帐号、密码。不涉及登录zsql数据库操作的巡检无需输入以上信息。 查看巡检结果: 4. 巡检完成后,巡检结果将保存在目录“/opt/cantian/action/inspections_log”下,以“inspection_时间戳”命名,并且只保存最近十次的巡检结果文件。
当前支持MySQL-8.0.26,如果需要其它版本,请开发人员适配或联系cantian仓开发人员。
方法一:
install plugin ctc_ddl_rewriter soname 'ha_ctc.so'
install plugin CTC soname 'ha_ctc.so'
方法二:
/usr/local/mysql/bin/mysqld --defaults-file=/home/regress/cantian-connector-mysql/scripts/my.cnf --initialize-insecure --datadir=/data/data
/usr/local/mysql/bin/mysqld --defaults-file=/home/regress/cantian-connector-mysql/scripts/my.cnf --datadir=/data/data --plugin-dir=/usr/local/mysql/lib/plugin --plugin_load="ctc_ddl_rewriter=ha_ctc.so;ctc=ha_ctc.so;" --
check_proxy_users=ON --mysql_native_password_proxy_users=ON --default-storage-engine=CTC
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。