基于湖库一体架构,统一管理结构化、半结构化与非结构化等多模态数据,一个系统承载事务处理、实时分析与 AI 工作负载。
添加 OBProxy
更新时间:2026-04-17 09:08:46
您可以通过 OCP 或 OBD 添加新的 OBProxy 到已有的 OBProxy 集群中。
前提条件
已创建 OBProxy 集群,OBProxy 集群创建相关操作请参见 创建 OBProxy 集群。
通过 OCP 添加 OBProxy
登录 OCP。
OCP 的部署和使用,参见 OceanBase 云平台。
在左侧导航栏单击 OBProxy。
在集群列表中选择需要操作的 OBProxy 集群,进入 OBPRoxy 集群总览页面。
单击 添加 OBProxy。

在弹出框中填写 软件版本、SQL 端口、Exporter 端口、机房、机型、机器选择方式、主机 等信息。

参考下表填写信息:
参数 说明 SQL 端口 默认为 2883。 Exporter 端口 默认为 2884。 软件版本 选择要安装的 OBProxy 版本。 选择 OBProxy 主机 选择部署 OBProxy 所使用的主机,包括该主机的 机房、机型(可选)、机器选择方式、主机 IP。 单击 确定。
通过 OBD 添加 OBProxy
前提条件
已创建的 OBProxy 集群需是使用 OBD 创建的集群。
您已部署可供 OBProxy 连接的 OceanBase 集群。
操作步骤
从 GitHub 上下载对应的配置文件模板。
根据自身机器情况修改配置文件,配置文件各个模块的含义可参考 配置文件说明。
注意
您需在
rs_list配置项中按要求填写该 OBProxy 集群可访问的 OceanBase 集群 IP 和 mysql_port 端口。执行如下命令部署新集群。
obd cluster deploy <deploy_name> -c <deploy_config_path>其中,参数
deploy_name为部署集群名称,可以理解为配置文件的别名,deploy_config_path为配置文件名。在您执行了
obd cluster deploy命令之后,OBD 将检查您的目标机器是否有 OBProxy 安装包。如果没有安装包,OBD 将自动从 yum 源获取。参考下述步骤将新建集群的信息添加到原 OBProxy 集群中。
查看配置路径:
obd cluster list打开原集群配置文件,并添加新部署集群的配置:
vim .obd/cluster/<deploy_name>/config.yaml修改后的配置文件可参考如下文件:
## Only need to configure when remote login is required user: username: admin # password: your password if need key_file: /home/admin/.ssh/id_rsa.pub # port: your ssh port, default 22 # timeout: ssh connection timeout (second), default 30 obproxy-ce: servers: - name: z1 ip: xxx.xx.xxx.xx # 原集群 IP - name: z2 ip: xxx.xx.xxx.xx # 新集群 IP global: listen_port: 2883 # External port. The default value is 2883. prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884. home_path: /home/admin/obproxy # oceanbase root server list # format: ip:mysql_port;ip:mysql_port. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. rs_list: xxx.xx.xxx.xx:2881;xxx.xx.xxx.xx:2881;xxx.xx.xxx.xx:2881 enable_cluster_checkout: false # observer cluster name, consistent with oceanbase-ce's appname. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. cluster_name: obcluster skip_proxy_sys_private_check: true enable_strict_kernel_release: false # obproxy_sys_password: # obproxy sys user password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. # observer_sys_password: # proxyro user pasword, consistent with oceanbase-ce's proxyro_password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
执行如下命令再次启动集群:
obd cluster start <deploy_name>执行如下命令查看集群状态:
obd cluster display <deploy_name>出现如下结果即表示集群创建成功:
Get local repositories and plugins ok Open ssh connection ok Cluster status check ok Connect to obproxy ok +---------=----------------------------------------+ | obproxy | +---------=------+------+-----------------+--------+ | ip | port | prometheus_port | status | +----------------+------+-----------------+--------+ | 172.xxx.xxx.24 | 2883 | 2884 | active | | 172.xxx.xxx.25 | 2883 | 2884 | active | +-------------=--+------+-----------------+--------+
说明
上述步骤中使用的到 OBD 命令,详细信息可参考 集群命令组。