首批通过分布式安全可靠测评,为关键业务系统打造
配置文件说明
更新时间:2026-03-04 17:10:37
本文介绍 obd 中的配置文件,以及配置文件中各个配置项的含义。
名词解释
obd
OceanBase Deployer,OceanBase 安装部署工具,简称为 obd。详细信息请参见 OceanBase 安装部署工具 文档。
ODP
OceanBase Database Proxy,OceanBase 数据库代理,是 OceanBase 数据库专用的代理服务器,简称为 ODP(又称为 OBProxy,后文统称为 ODP)。详细信息请参见官网 OceanBase 数据库代理 文档。
OBAgent
OBAgent 是 OceanBase 数据库监控采集框架,支持推、拉两种数据采集模式,可以满足不同的应用场景。
OCP Express
基于 Web 的 OceanBase 数据库 4.x 管理工具,融合在 OceanBase 数据库集群中,支持对数据库集群关键性能及基本数据库管理功能。
obconfigserver
OceanBase Configserver,obconfigserver 可提供 OceanBase 的元数据注册,存储和查询服务。详细信息请参见 ob-configserver。
oblogproxy
OceanBase 的增量日志代理服务,它可以与 OceanBase 建立连接并进行增量日志读取,为下游服务提供了变更数据捕获(CDC)的能力。详细信息请参见 OceanBase 日志代理服务文档。
说明
oblogproxy 自 V4.0.1 起变更为 obbinlog。
obbinlog
OceanBase Binlog 服务能收集 OceanBase 数据库的事务日志,并将其转换为 MySQL Binlog,主要用于实时数据订阅等场景。详细信息请参见 OceanBase Binlog 服务。
Grafana
Grafana 是一款开源的数据可视化工具,它可以将数据源中的各种指标数据进行可视化展示,以便更直观地了解系统运行状态和性能指标。详细信息可参见 Grafana 官网。
Prometheus
Prometheus 是一个开源的服务监控系统和时序数据库,其提供了通用的数据模型以及快捷数据采集、存储和查询接口。详细信息可参见 Prometheus 官网。
Alertmanager
Alertmanager 是一个开源的告警管理器,用于处理来自 Prometheus 等监控系统的告警,并提供告警的去重、分组、路由和静默等功能。详细信息可参见 Prometheus 官网。
OCP
OceanBase 云平台(OceanBase Cloud Platform,OCP)是一款为 OceanBase 集群量身打造的企业级管理平台,兼容 OceanBase 数据库所有主流版本。OCP 提供对 OceanBase 图形化管理能力,包括数据库及相关资源的全生命周期管理、监控告警、性能诊断、故障恢复、备份恢复等,旨在协助客户更加高效地管理 OceanBase 数据库,降低企业的 IT 运维成本和用户的学习成本。详细介绍可参见官网 OceanBase 云平台 文档。
获取配置文件示例
obd 提供了部署集群所需的配置文件示例,您可根据自身机器资源情况进行修改。
若您机器中的 obd 是通过直接下载的方式安装,则可在
/usr/obd/example目录下查看 obd 提供的配置文件示例。若您机器中的 obd 是通过解压 all-in-one 安装包的方式安装,则可在
~/.oceanbase-all-in-one/obd/usr/obd/example目录下查看 obd 提供的配置文件示例。您也可在 obd 的 GitHub 仓库 中查看配置文件示例。
说明
配置文件分为小规格开发和专业开发两种模式,两种模式的配置文件中配置项基本相同,配置的规格略有不同,您可根据实际资源条件进行选择。
小规格开发模式:适用于个人设备(内存不低于 8 GB),配置文件名中带有
mini或min标识。专业开发模式:适用于高配置 ECS 或物理服务器(可用资源不低于 16 核 64 GB)。
部署 OceanBase 数据库时常用的配置文件有如下几个。
| 配置文件 | 说明 | 包含组件 |
|---|---|---|
mini-local-example.yaml/local-example.yaml |
本地单机部署配置文件示例,无需配置用户信息,可在本地单机部署一个 OceanBase 数据库 | OceanBase 数据库 |
mini-single-example.yaml/single-example.yaml |
单机部署配置文件示例,需要配置用户信息,可在任意一台机器中单机部署一个 OceanBase 数据库 | OceanBase 数据库 |
mini-single-with-obproxy-example.yaml/single-with-obproxy-example.yaml |
单机部署 + ODP 配置文件示例 | OceanBase 数据库、ODP |
mini-distributed-example.yaml/distributed-example.yaml |
分布式部署配置文件示例 | OceanBase 数据库 |
mini-distributed-with-obproxy-example.yaml/distributed-with-obproxy-example.yaml |
分布式部署 + ODP 配置文件示例 | OceanBase 数据库、ODP |
default-components-min.yaml/default-components.yaml |
分布式部署 + ODP + OCP Express 配置样例 | OceanBase 数据库、ODP、OBAgent、OCP Express |
all-components-min.yaml/all-components.yaml |
分布式部署全部组件 | OceanBase 数据库、ODP、OBAgent、OCP Express、obconfigserver、oblogproxy、Prometheus、Grafana |
说明
若您计划部署 OCP Express,则无需部署 Prometheus 和 Grafana。
除上述配置文件之外,example 目录下有不同的文件夹存放不同的配置文件示例,以方便应对各种场景,具体内容如下。
alertmanager:该目录下的配置文件示例是为部署 Alertmanager 准备的,您可使用这些配置文件示例单独部署 Alertmanager,或同时部署 OceanBase 数据库、ODP、OBAgent、Prometheus 和 Alertmanager。
autodeploy:该目录下的配置文件示例是为 obd cluster autodeploy 命令准备的,您只需修改配置文件示例中的 IP 和目录,obd 会根据目标机器资源自动生成最大规格的完整配置并部署启动集群。
grafana:该目录下的配置文件示例是为部署 Grafana 准备的,您可使用这些配置文件示例单独部署 Grafana,或同时部署 Grafana 和 Prometheus。
obagent:该目录下的配置文件示例是为部署 OBAgent 准备的,您可根据自己希望部署的 OBAgent 版本选择对应的配置文件示例部署 OBAgent。
obbinlog-ce:该目录下的配置文件示例是为了部署 Binlog 服务准备的,您可使用这些配置文件示例选择单独部署 Binlog 服务,或同时部署 OceanBase 数据库 + ODP + obbinlog + obconfigserver。
ob-configserver:该目录下的配置文件示例是为部署 obconfigserver 准备的,您可使用这些配置文件示例单独部署 obconfigserver,或同时部署 OceanBase 数据库 + ODP + obconfigserver。
oblogproxy:该目录下的配置文件示例是为部署 oblogproxy 准备的,您可使用这些配置文件示例单独部署 oblogproxy,或同时部署 OceanBase 数据库、ODP、obconfigserver 和 oblogproxy。
obproxy:该目录下的配置文件示例是为部署 ODP 准备的,您可使用这些配置文件示例单独部署 ODP,或部署 OceanBase 数据库和 ODP。
oceanbase-3.x:该目录下的配置文件是适配 3.x 版本 OceanBase 数据库的配置文件示例。
ocp:该目录下的配置文件示例是为部署 OCP 准备的,您可使用这些配置文件示例单独部署 OCP,或同时部署 OceanBase 数据库、ODP 和 OCP。
ocp-express:该目录下的配置文件示例是为部署 OCP Express 准备的,您可使用这些配置文件示例单独部署 OCP Express。
prometheus:该目录下的配置文件示例是为部署 Prometheus 准备的,您可使用这些配置文件示例单独部署 Prometheus,或同时部署 OceanBase 数据库、OBAgent 和 Prometheus。
scale_out:该目录下的配置文件示例是为扩容和组件变更功能准备的,您可执行相关命令使用对应配置文件对组件进行扩容,或添加或移除对应组件。具体操作可参见 扩容与组件变更。
说明
scale_out 目录下仅提供了部分组件的配置文件示例,目前 obd 支持除 obbinlog-ce 外所有组件的新增,以及除 oblogproxy 和 obbinlog-ce 外其他组件的扩容。
配置文件格式
obd 中的配置文件有其固定格式,下面讲解配置文件中不同模块的含义。
# Only need to configure when remote login is required
# user: # ssh 登录配置
# username: your username
# password: your password if need
# key_file: your ssh-key file path if need
# port: your ssh port, default 22
# timeout: ssh connection timeout (second), default 30
oceanbase-ce: # 组件名,其下内容是对该组件的配置
servers: # 节点列表
- name: server1 # name 后可不填,不填默认节点名与 IP 相同,这里指该节点名为 server1
# Please don't use hostname, only IP can be supported
ip: 10.10.10.1
- name: server2
ip: 10.10.10.2
- name: server3
ip: 10.10.10.3
global: # 全局配置,同一组件中相同的配置可以写在这里
# 如果节点的配置中有与全局配置相同的配置项,则使用节点的配置
devname: eth0
......
# 省略具体配置项
# In this example, support multiple ob process in single node, so different process use different ports.
# If deploy ob cluster in multiple nodes, the port and path setting can be same.
server1: # 节点配置,这里是对 server1 节点的配置,也就是 10.10.10.1 这台服务器,节点的配置优先级是最高的。
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882.
# The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
home_path: /home/admin/observer
zone: zone1
server2: # 节点配置,这里是对 server2 节点的配置,也就是 10.10.10.2 这台服务器。
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882.
# The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
home_path: /home/admin/observer
zone: zone2
server3: # 节点配置,这里是对 server3 节点的配置,也就是 10.10.10.3 这台服务器。
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882.
# The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
home_path: /home/admin/observer
zone: zone3
各模块介绍如下。
| 模块名 | 说明 |
|---|---|
| user | 配置用户信息,建议使用 admin 用户。该模块下需关注的配置项介绍如下:
注意 |
| oceanbase-ce | 组件名,其下的内容是对该组件的配置。 |
| servers | 节点信息,每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,多个机器就指定多次,机器标识名不能重复。在机器 IP 不重复的情况下,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| global | 表示其下配置为全局配置,同一组件中相同的配置可以写在这里。如果节点的配置中有与全局配置相同的配置项,则使用节点中配置项的配置。 |
| server1 | 表示其下配置为节点配置,此处是以 server1 为例,您需修改为 servers 下配置的 name 名,这里表示对 10.10.10.1 这台服务器。
说明 |
配置项说明
本节介绍配置文件中的各个组件涉及到的配置项。
此处以 example/distributed-with-obproxy-example.yaml 文件中 oceanbase-ce 组件部分为例介绍部署 OceanBase 数据库时需注意的配置项。通过配置文件部署 OceanBase 数据库流程可参见 单机部署 OceanBase 数据库。
oceanbase-ce:
# version: 4.2.0.0
# package_hash: 1cbd1fde8c6d7695015265da09738478c97e0e2f908fca6745dc9cc531860e74
# tag: dev
servers:
- name: server1
# Please don't use hostname, only IP can be supported
ip: 10.10.10.1
- name: server2
ip: 10.10.10.2
- name: server3
ip: 10.10.10.3
global:
# Please set devname as the network adaptor's name whose ip is in the setting of severs.
# if set severs as "127.0.0.1", please set devname as "lo"
# if current ip is 192.168.1.10, and the ip's network adaptor's name is "eth0", please use "eth0"
# devname: eth0
# if current hardware's memory capacity is smaller than 50G, please use the setting of "mini-single-example.yaml" and do a small adjustment.
memory_limit: 64G # The maximum running memory for an observer
# The reserved system memory. system_memory is reserved for general tenants. The default value is 30G.
system_memory: 30G
datafile_size: 192G # Size of the data file.
datafile_next: 200G # the auto extend step. Please enter an capacity, such as 2G
datafile_maxsize: 1T # the auto extend max size. Please enter an capacity, such as 20G
log_disk_size: 192G # The size of disk space used by the clog files.
scenario: htap
production_mode: true
enable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true.
max_syslog_file_count: 4 # The maximum number of reserved log files before enabling auto recycling. The default value is 0.
# observer cluster name, consistent with obproxy's cluster_name
appname: obcluster
enable_auto_start: true
install_utils: true
root_password: ****** # root user password
proxyro_password: ****** # proxyro user password, consistent with obproxy's observer_sys_password, can be empty
# ocp_agent_monitor_username: ocp_monitor
# ocp_agent_monitor_password: ****** # The password for obagent monitor user
# In this example , support multiple ob process in single node, so different process use different ports.
# If deploy ob cluster in multiple nodes, the port and path setting can be same.
server1:
# local_ip: 10.10.10.1
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
obshell_port: 2886 # Operation and maintenance port for OceanBase Database.
# The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
home_path: /home/admin/observer
# The directory for data storage. The default value is $home_path/store.
# data_dir: /data
# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
# redo_dir: /redo
zone: zone1
server2:
# local_ip: 10.10.10.2
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
zone_region: hangzhou
zone_idc: idc1
# The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
home_path: /home/admin/observer
# The directory for data storage. The default value is $home_path/store.
# data_dir: /data
# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
# redo_dir: /redo
zone: zone2
server3:
# local_ip: 10.10.10.3
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
# The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
home_path: /home/admin/observer
# The directory for data storage. The default value is $home_path/store.
# data_dir: /data
# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
# redo_dir: /redo
zone: zone3
您需关注的配置项如下表所示,详细的配置项介绍可参见 OceanBase 数据库配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| version | 可选 | 默认部署最新版本 | 指定待部署组件版本,通常情况下不需要指定。 |
| package_hash | 可选 | 默认部署最新版本 | 指定待部署组件软件包 hash,通常情况下不需要指定。 |
| tag | 可选 | 无 | 指定待部署组件 tag,通常情况下不需要指定。当您为自己编译的 OceanBase 数据库安装包设置了 tag 时,可以使用 tag 来指定。 |
| servers | 必选 | 无 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,多个机器就指定多次,机器标识名不能重复。在机器 IP 不重复的情况下,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| devname | 可选 | 无 | 和 servers 里指定的 IP 对应的网卡,通过 ip addr 命令可以查看 IP 和网卡对应关系。
说明自 OceanBase 数据库 V4.2.0 版本起,不建议配置该配置项。 |
| local_ip | 可选 | 无 | 用于安装 OBServer 节点机器的 IP 地址。部署集群时,无需手动配置,obd 会自动获取 servers 模块配置的 IP 地址为该配置项赋值。OceanBase 数据库部署会首先根据 local_ip 配置项进行配置,不再关注 devname 配置项。详细介绍可参见 《OceanBase 数据库》中 local_ip 一文。
说明
|
| memory_limit | 可选 | 0 | observer 进程能从环境中获取的最大内存,未配置的情况下以 memory_limit_percentage 配置项为准,配置项详细介绍请参考 memory_limit 和 memory_limit_percentage。 |
| system_memory | 可选 | 0M | 保留的系统内存,该参数值会占用 memory_limit 的内存,未配置的情况下 OceanBase 数据库会自适应。 |
| datafile_size | 可选 | 0 | 指定对应节点数据文件(block_file)大小,未配置的情况下以 datafile_disk_percentage 配置项为准,详细介绍请参见 datafile_size 和 datafile_disk_percentage。 |
| datafile_next | 可选 | 0 | 控制磁盘空间的增长步长,用于设置自动扩容,未配置的情况下若要开启自动扩容功能可参见 配置磁盘数据文件的动态扩容。 |
| datafile_maxsize | 可选 | 0 | 限制磁盘空间的最大可用上限,用于设置自动扩容,未配置的情况下若要开启自动扩容功能可参见 配置磁盘数据文件的动态扩容。 |
| log_disk_size | 可选 | 0 | 用于设置 Redo 日志磁盘的大小,未配置的情况下以log_disk_percentage 配置项为准,详细介绍请参考 log_disk_size 和 log_disk_percentage。 |
| scenario | 可选 |
|
设置集群负载类型,未配置该配置项的情况下,会提供交互式选项供用户选择负载类型。可选值如下:
注意该配置项仅在待部署的 OceanBase 数据库版本号不小于 V4.2.5 时支持。 |
| production_mode | 必选 | true | 控制是否设置待部署集群为生产模式,默认为 true 表示集群为生产模式。配置为生产模式时,memory_limit 配置不得低于 16G,__min_full_resource_pool_memory(配置资源池最小内存限制)配置不得低于 2147483648。 |
| enable_syslog_wf | 可选 | true | 设置是否把 WARN 以上级别的系统日志打印到一个单独的日志文件中。 |
| max_syslog_file_count | 可选 | 0 | 设置在回收日志文件之前可以容纳的日志文件数量。值为 0 时表示不自动清理。 |
| appname | 可选 | 默认为部署名 | OceanBase 集群名,未配置时默认为部署命令里的部署名(deploy name)。 |
| enable_auto_start | 可选 | false | 控制是否开启 observer 进程自启动功能,配置为 true 时,若 OBServer 节点重启,会自动拉起 observer 进程。
说明配置该配置项时需确保部署环境非容器环境,且部署用户拥有 sudo 权限。 |
| install_utils | 可选 | false | 控制是否安装 oceanbase-ce-utils 包,安装 oceanbase-ce-utils 后可在 OceanBase 集群安装目录的 bin 目录下查看到 OceanBase Utils 的相关目录(如 ob_admin、ob_error、oblogminer)。配置为 true 时,不允许通过 obd cluster edit-config 命令修改该选项为 false,即不支持通过 obd 命令卸载 oceanbase-ce-utils。 |
| mysql_port | 必选 | 2881 | 设置 SQL 服务协议端口号,取值范围为 [1025, 65535],默认为 2881。 |
| rpc_port | 必选 | 2882 | 设置远程访问的协议端口号,是 observer 进程跟其他节点进程之间的 RPC 通信端口,取值范围为 [1025, 65535],默认为 2882。 |
| obshell_port | 必选 | 2886 | 设置 OceanBase 数据库运维端口,取值范围为 [1025, 65535],默认为 2886。 |
| zone_region | 可选 | default_region | 设置单个 Zone 的地域。 |
| zone_idc | 可选 | default_idc | 设置单个 Zone 的机房。 |
| home_path | 必选 | 无 | OceanBase 数据库安装路径。 |
| data_dir | 可选 | $home_path/store | 设置存储 SSTable 等数据的目录,建议配置为独立的磁盘。
说明 |
| redo_dir | 可选 | 默认与 data_dir 相同 |
部署 3.x 版本 OceanBase 数据库时,该配置项为 clog、ilog 和 slog 的目录。部署 4.x 版本 OceanBase 数据库时,该配置项为 clog 的目录。该配置项默认与 data_dir 值相同,建议配置为独立的磁盘。 |
| root_password | 可选 |
|
OceanBase 集群的超级管理员(root@sys)的密码,建议设置复杂的密码。使用 obd V2.1.0 及之后版本时,未设置的情况下会自动生成随机字符串,可在部署成功后通过 obd cluster edit-config 命令查看配置文件中对应的配置项获取密码。 |
| proxyro_password | 可选 |
|
ODP 连接 OceanBase 集群使用的账户名(proxyro@sys)的密码,配置后会在 OceanBase 数据库 sys 租户下创建一个 proxyro 用户。使用 obd V2.1.0 及之后版本时,未设置的情况下会自动生成随机字符串,可在部署成功后通过 obd cluster edit-config 命令查看配置文件中对应的配置项获取密码。 |
| ocp_agent_monitor_username | 可选 | ocp_monitor | OceanBase 数据库监控数据采集用户名,配置后会在 OceanBase 数据库 sys 租户下创建一个同名用户。 |
| ocp_agent_monitor_password | 可选 |
|
OceanBase 数据库监控数据采集用户的密码。使用 obd V2.1.0 及之后版本时,若部署 OceanBase 数据库的同时部署 OBAgent,未配置该配置项时会自动生成随机字符串,可在部署成功后通过 obd cluster edit-config 命令查看配置文件中对应的配置项获取密码。 |
| zone | 必选 | zone1 | OBServer 节点所在的 Zone 名字。 |
此处以 example/obproxy/obproxy-only-example.yaml 文件为例介绍部署 ODP 时需注意的配置项。
obproxy-ce:
servers:
- 10.10.10.4
global:
listen_port: 2883 # External port. The default value is 2883.
prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.
rpc_listen_port: 2885
enable_obproxy_rpc_service: true
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: 10.10.10.1:2881;10.10.10.2:2881;10.10.10.3:2881
# obproxy_config_server_url: http://10.10.10.1:9999/services?Action=GetObProxyConfig
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
client_session_id_version: 2 #This parameter is used to specify whether to use the new logic to generate the client session ID. The parameter type is integer. The value range is [1, 2] and the default value is 2 (use the new logic).
proxy_id: 5 #This parameter is used to set the ID for an ODP. The parameter type is integer. The default value is 0 and the value range is [0, 8191].
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 password, 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.
您需关注的配置项如下表所示,详细的配置项介绍可参见 ODP 配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| servers | 必选 | 无 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,多个机器就指定多次,机器标识名不能重复。在机器 IP 不重复的情况下,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| listen_port | 必选 | 2883 | ODP 监听端口,默认 2883。 |
| prometheus_listen_port | 必选 | 2884 | ODP prometheus 监听端口,默认 2884。 |
| rpc_listen_port | 可选 | 2885 | ODP 中 RPC 服务监听端口,默认为 2885。
说明该配置项仅在部署 ODP V4.3.0 及以后版本,并且 |
| enable_obproxy_rpc_service | 可选 | true | 控制是否启用 ODP RPC 服务,默认为 true 表示启用 RPC 服务,取值为 false 时表示停止 RPC 服务,此时 rpc_listen_port 配置将不生效。
说明
|
| home_path | 必选 | 无 | ODP 安装路径。 |
| rs_list | 可选 | 无 | OceanBase 集群的 OBServer 节点列表,格式为 ip:mysql_port;ip:mysql_port,使用 rs_list 配置部署的情况下您只可代理所配置的这一个集群。
注意
|
| obproxy_config_server_url | 可选 | 无 | obconfigserver 的 url,配置后可使用 ODP 代理 obconfigserver 中注册的所有集群。未部署 obconfigserver 且未配置依赖 ob-configserver 组件的情况下,您也可使用 rs_list 配置项。 |
| enable_cluster_checkout | 可选 | true | 控制是否需要校验 cluster name,开启后,ODP 会在登陆时发送集群名到 OBServer 节点进行检查。 |
| cluster_name | 可选 | 无 | 表示 ODP 可以代理的 OceanBase 集群的名字,当存在依赖项时,obd 将会从依赖项 oceanbase-ce 中获取该值。 |
| client_session_id_version | 可选 | 2 | 用于设置是否使用新的 Client Session ID 生成逻辑。仅可配置为 1 或 2,配置为 2 时使用新的 Client Session ID 生成逻辑。
说明obd 自 V2.7.0 起支持配置文件中配置 |
| proxy_id | 可选 | 0 | 用于设置标识 ODP 的 ID,以保障不同 ODP 生成的 Client Session ID 不会发生冲突。根据 client_session_id_version 配置项的取值不同,proxy_id 配置项的取值范围有如下两种情况。
说明obd 自 V2.7.0 起支持配置文件中配置 |
| enable_strict_kernel_release | 必选 | false | 是否需要校验 OS 内核,如果为 true,则ODP 仅支持 5u/6u/7u 版本的 RedHat。为 false 时不关心 Linux 内核版本的发布,ODP 可能不稳定。 |
| obproxy_sys_password | 可选 |
|
ODP 管理员账户(root@proxysys)的密码。使用 obd V2.1.0 及之后版本时,未设置的情况下会自动生成随机字符串,可在部署成功后通过 obd cluster edit-config 命令查看配置文件中对应的配置项获取密码。 |
| observer_sys_password | 可选 | 同时部署 OceanBase 数据库时默认与 proxyro_password 相同,单独部署时根据 obd 版本不同有如下两种情况:
|
ODP 连接 OceanBase 集群使用的账户名(proxyro@sys)的密码,配置密码需和 OceanBase 数据库中 proxyro_password 的值相同。若和 proxyro_password 的值不同,部署集群后无法使用 ODP 代理连接 OceanBase 数据库。 |
此处以 example/obagent/obagent-only-example.yaml 文件为例介绍部署 OBAgent 时需注意的配置项。
obagent:
servers:
- name: server1
# Please don't use hostname, only IP can be supported
ip: 10.10.10.1
- name: server2
ip: 10.10.10.2
- name: server3
ip: 10.10.10.3
global:
# The working directory for obagent. obagent is started under this directory. This is a required field.
home_path: /home/admin/obagent
# The port of monitor agent. The default port number is 8088.
monagent_http_port: 8088
# The port of manager agent. The default port number is 8089.
mgragent_http_port: 8089
# Log path. The default value is log/monagent.log.
log_path: log/monagent.log
# The log level of manager agent.
mgragent_log_level: info
# The total size of manager agent.Log size is measured in Megabytes. The default value is 30M.
mgragent_log_max_size: 30
# Expiration time for manager agent logs. The default value is 30 days.
mgragent_log_max_days: 30
# The maximum number for manager agent log files. The default value is 15.
mgragent_log_max_backups: 15
# The log level of monitor agent.
monagent_log_level: info
# The total size of monitor agent.Log size is measured in Megabytes. The default value is 200M.
monagent_log_max_size: 200
# Expiration time for monitor agent logs. The default value is 30 days.
monagent_log_max_days: 30
# The maximum number for monitor agent log files. The default value is 15.
monagent_log_max_backups: 15
# Username for HTTP authentication. The default value is admin.
http_basic_auth_user: admin
# Password for HTTP authentication. The default value is a random password.
# http_basic_auth_password: ******
monitor_user: ocp_monitor
# Monitor password for OceanBase Database. The default value is empty. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the ocp_agent_monitor_password in oceanbase-ce.
monitor_password:
# The SQL port for observer. The default value is 2881. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the mysql_port in oceanbase-ce.
sql_port: 2881
# The RPC port for observer. The default value is 2882. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the rpc_port in oceanbase-ce.
rpc_port: 2882
# Cluster name for OceanBase Database. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the appname in oceanbase-ce.
cluster_name: obcluster
# Cluster ID for OceanBase Database. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the cluster_id in oceanbase-ce.
cluster_id: 1
# The redo dir for Oceanbase Database. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the redo_dir in oceanbase-ce.
ob_log_path: /home/admin/observer/store
# The data dir for Oceanbase Database. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the data_dir in oceanbase-ce.
ob_data_path: /home/admin/observer/store
# The work directory for Oceanbase Database. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the home_path in oceanbase-ce.
ob_install_path: /home/admin/observer
# The log path for Oceanbase Database. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the {home_path}/log in oceanbase-ce.
observer_log_path: /home/admin/observer/log
# Monitor status for OceanBase Database. Active is to enable. Inactive is to disable. The default value is active. When you deploy an cluster automatically, obd decides whether to enable this parameter based on depends.
ob_monitor_status: active
server1:
# Zone name for your observer. The default value is zone1. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the zone name in oceanbase-ce.
zone_name: zone1
server2:
# Zone name for your observer. The default value is zone1. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the zone name in oceanbase-ce.
zone_name: zone2
server3:
# Zone name for your observer. The default value is zone1. When a depends exists, obd gets this value from the oceanbase-ce of the depends. The value is the same as the zone name in oceanbase-ce.
zone_name: zone3
您需关注的配置项如下表所示,详细的配置项介绍可参见 OBAgent 配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| servers | 必选 | 无 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,多个机器就指定多次,机器标识名不能重复。在机器 IP 不重复的情况下,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。
注意 |
| home_path | 必选 | 无 | 组件的工作目录。 |
| monagent_http_port | 必选 | 8088 | OBAgent 监控服务端口。 |
| mgragent_http_port | 必选 | 8089 | OBAgent 管理服务端口。 |
| log_path | 必选 | log/monagent.log | 日志路径。 |
| mgragent_log_level | 可选 | 无 | ob_mgragent 日志级别。 |
| mgragent_log_max_size | 可选 | 30 | ob_mgragent 日志文件大小,单位:MB。 |
| mgragent_log_max_days | 可选 | 30 | ob_mgragent 日志文件最大保留天数。 |
| mgragent_log_max_backups | 可选 | 15 | ob_mgragent 日志文件最大备份数。 |
| monagent_log_level | 可选 | info | ob_monagent 日志级别。 |
| monagent_log_max_size | 可选 | 200 | ob_monagent 日志文件大小,单位:MB。 |
| monagent_log_max_days | 可选 | 30 | ob_monagent 日志文件最大保留天数。 |
| monagent_log_max_backups | 可选 | 15 | ob_monagent 日志文件最大备份数。 |
| http_basic_auth_user | 必选 | admin | HTTP 服务认证用户名。 |
| http_basic_auth_password | 可选 | 随机字符串 | HTTP 服务认证密码,自定义情况下要求密码长度最少为一个字符,可包含数字(0~9)、大写字母(A~Z)、小写字母(a~z)、特殊符号(~^*{}[]_-+)。未配置的情况下,obd 会自动生成随机字符串。可在部署成功后通过 obd cluster edit-config 命令查看配置文件中对应的配置项获取密码。 |
| monitor_user | 可选 | ocp_monitor | OceanBase 数据库监控数据采集用户名,配置后会在 OceanBase 数据库 sys 租户下创建一个同名用户。同时部署 OceanBase 数据库并配置依赖 oceanbase-ce 组件的情况下,系统优先使用 ocp_agent_monitor_username 配置项的值进行部署。 |
| monitor_password | 可选 | 空 | OceanBase 数据库监控数据采集用户的密码。同时部署 OceanBase 数据库并配置依赖 oceanbase-ce 组件的情况下,系统优先使用 ocp_agent_monitor_password 配置项的值进行部署。 |
| sql_port | 可选 | 2881 | OBServer 节点的 SQL 端口,其值需和 OceanBase 数据库中 mysql_port 配置项相同。 |
| rpc_port | 可选 | 2882 | OBServer 节点的 RPC 端口,其值需和 OceanBase 数据库中 rpc_port 配置项相同。 |
| cluster_name | 可选 | obcluster | OceanBase 数据库的集群名,其值需和 oceanbase-ce 组件下的 appname 配置项相同。 |
| cluster_id | 可选 | 1 | OceanBase 数据库 ID,其值需和 oceanbase-ce 组件下的 cluster_id 配置项相同。 |
| ob_log_path | 可选 | 无 | OBServer 节点日志盘路径,其值需和 oceanbase-ce 组件下的 redo_dir 配置项相同。 |
| ob_data_path | 可选 | 无 | OBServer 节点数据盘路径,其值需和 oceanbase-ce 组件下的 data_dir 配置项相同。 |
| ob_install_path | 可选 | 无 | OBServer 节点安装目录,其值需和 oceanbase-ce 组件下的 home_path 配置项相同。 |
| observer_log_path | 可选 | 无 | OBServer 节点安装目录下的日志路径,其值需和 oceanbase-ce 组件下的 {home_path}/log 相同。 |
| ob_monitor_status | 必选 | active | OceanBase 监控指标采集状态,active 表示开启,inactive 表示关闭。 |
| zone_name | 可选 | zone1 | OBServer 节点所在的 Zone 名字。 |
此处以 example/ocp-express/ocp-express-only.yaml 文件为例介绍部署 OCP Express 时需注意的配置项。通过配置文件部署 OCP Express 流程可参见 使用命令行部署 OCP Express。
ocp-express:
servers:
- name: server1
ip: 10.10.10.1
global:
# The working directory for ocp express. ocp express is started under this directory. This is a required field.
home_path: /home/admin/ocp-express
log_dir: /home/admin/ocp-express/log # The log directory of ocp express server. The default value is {home_path}/log.
memory_size: 1G # The memory size of ocp-express server. The recommend value is 512MB + (expect node num + expect tenant num) * 60MB.
jdbc_url: jdbc:oceanbase://IP:PORT/meta_db # jdbc connection string to connect to the meta db
jdbc_username: user_name@tenant_name # username to connect to meta db
jdbc_password: '<meta db password>' # password to connect to meta db
port: 8180 # The http port to use.
cluster_name: obcluster # the cluster name of oceanbase cluster. Refer to the configuration item appname of oceanbase
ob_cluster_id: 1 # the cluster id of oceanbase cluster. Refer to the configuration item cluster_id of oceanbase
root_sys_password: <password for root@sys> # the pass of oceanbase cluster. Refer to the configuration item cluster_id of oceanbase
agent_username: <obagent> # The username of obagent
agent_password: <password> # The password of obagent
logging_file_total_size_cap: 10GB # The total log file size of ocp-express server
# logging_file_max_history: 1 # The maximum of retention days the log archive log files to keep. The default value is unlimited
server_addresses: # The cluster info for oceanbase cluster
- address: 127.0.0.1 # The address of oceanbase server
svrPort: 2882 # The rpc port of oceanbase server
sqlPort: 2881 # The mysql port of oceanbase server
withRootServer: true # Is the oceanbase server a root server of cluster.
agentMgrPort: 8089 # The port of obagent manager process
agentMonPort: 8088 # The port of obagent monitor process
您需关注的配置项如下表所示,详细的配置项介绍可参见 OCP Express 配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| servers | 必选 | 无 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,多个机器就指定多次,机器标识名不能重复。在机器 IP 不重复的情况下,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| home_path | 必选 | 无 | 组件的工作目录。 |
| log_dir | 可选 | {home_path}/log | OCP Express 服务器的日志目录,默认值为 home_path 参数下的 log。 |
| memory_size | 必选 | 无 | OCP Express 服务器的内存容量,推荐算法为:memory_size = 512M +(期望的节点数 * 期望的租户数)* 60MB 期望的租户数需要包含 sys 和 ocp meta 租户本身。 |
| jdbc_url | 可选 | 无 | 连接 meta 租户的 JDBC 连接字符串,请确保连接串中使用到的数据库已创建。当 OCP Express 单独部署时该配置项为必选项。 |
| jdbc_username | 可选 | 无 | 连接 meta 租户的用户名,请确保该用户已创建。当 OCP Express 单独部署时该配置项为必选项。
说明: |
| jdbc_password | 必选 | 无 | 连接 meta 租户的用户密码。 |
| port | 必选 | 8180 | 访问 OCP Express 的 HTTP 端口。 |
| cluster_name | 可选 | obcluster | OceanBase 集群的集群名称,需和 oceanbase-ce 组件中的 appname 配置项相同。当 OCP Express 单独部署时该配置项为必选项。 |
| ob_cluster_id | 可选 | 无 | OceanBase 集群的集群 ID,需和 oceanbase-ce 组件中的 cluster_id 配置项相同。当 OCP Express 单独部署时该配置项为必选项。 |
| root_sys_password | 可选 | 无 | OceanBase 集群中 root@sys 用户的密码。当 OCP Express 单独部署时该配置项为必选项。 |
| agent_username | 必选 | 无 | OBAgent 的用户名。 |
| agent_password | 必选 | 无 | OBAgent 的密码。 |
| logging_file_total_size_cap | 必选 | 1GB | 日志文件总大小,默认为 1GB。
注意: |
| server_addresses->address | 必选 | 无 | OBServer 节点的 IP 地址。 |
| server_addresses->svrPort | 必选 | 无 | OBServer 节点的 rpc 端口,需和 oceanbase-ce 组件中对应节点的 rpc_port 配置项相同。 |
| server_addresses->sqlPort | 必选 | 无 | OBServer 节点的 mysql 端口,需和 oceanbase-ce 组件中对应节点的 mysql_port 配置项相同。 |
| server_addresses->agentMgrPort | 必选 | 无 | OBAgent 管理进程的端口,需根据 OBAgent 中实际设置的端口进行修改。 |
| server_addresses->agentMonPort | 必选 | 无 | OBAgent 监控进程的端口,需根据 OBAgent 中实际设置的端口进行修改。 |
此处以 example/ob-configserver/ob-configserver-only-example.yaml 文件为例介绍部署 obconfigserver 时需注意的配置项。通过配置文件部署 obconfigserver 流程可参见 使用命令行部署 obconfigserver。
ob-configserver:
servers:
- 127.0.0.1
global:
listen_port: 8080 # The port of ob-configserver web
# server_ip: 0.0.0.0 # Listen to the ob-configserver server IP。When you want to listen to the specified IP address,use it.
home_path: /home/admin/ob-configserver # The working directory for prometheus. ob-configserver is started under this directory. This is a required field.
## log config
# log_level: info # Log printing level of ob-configserver。The default value is `info`
# log_maxsize: 30 # The total size of manager ob-configserver.Log size is measured in Megabytes.The default value is 30
# log_maxage:7 # The days of manager expired ob-configserver.Log retention days. The default value is 7
# log_maxbackups: 10 #The number of manager expired ob-configserver.Log. The default value is 10
# log_localtime: true # Switch of ob-configserver.Log naming with localtime. The default value is true
# log_compress: true # Compress ob-configserver.Log switch. The default value is true
## vip config, configserver will generate url with vip_address and port and return it to the client
## do not use some random value that can't be connected
# vip_address: "10.10.10.1"
# vip_port:8080
## storage config
# storage:
## database type, support sqlite3 or mysql
## sqlite3 Usage:
# database_type: sqlite3
# connection_url: "/home/admin/ob-configserver/.data.db?cache=shared&_fk=1" # connection_url can be empty When database_type used sqlite3
## mysql Usage:
# database_type: mysql
# connection_url: "user:password@tcp(ip:port)/metadb?parseTime=true"
您需关注的配置项如下表所示,详细的配置项介绍可参见 obconfigserver 配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| servers | 必选 | 无 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,多个机器就指定多次,机器标识名不能重复。在机器 IP 不重复的情况下,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| listen_port | 必选 | 8080 | obconfigserver 服务监听的端口。 |
| server_ip | 必选 | 0.0.0.0 | 监听访问服务的 IP,只监听指定的 IP,如果有白名单需求,可以修改此项。 |
| home_path | 必选 | 无 | 组件的工作目录。 |
| log_level | 必选 | info | obconfigserver 打印的日志级别,默认为 INFO 级别。obconfigserver 的日志级别从低到高依次为 Debug(调试)、Info(信息)、Warn(告警)、Error(错误)、Fatal(致命)。 |
| log_maxsize | 必选 | 30 | obconfigserver 日志的大小,单位 MB,默认值为 30。 |
| log_maxage | 必选 | 7 | obconfigserver 日志保留过期文件最长时间间隔,默认值 7 天。 |
| log_maxbackups | 必选 | 10 | obconfigserver 最多能保留的过期日志个数。 |
| log_localtime | 必选 | true | 控制是否使用本地时间来命名日志,默认为 true。 |
| log_compress | 必选 | true | 控制是否开启滚动日志压缩,默认为 true。 |
| vip_address | 可选 | 无 | VIP 的 IP 地址,仅在使用 VIP 时配置。 |
| vip_port | 可选 | 无 | VIP 的端口号,仅在使用 VIP 时配置。 |
| database_type | 必选 | sqlite3 | 元数据库的数据库类型,可取值为 mysql 或 sqlite3,取值为 mysql 时可以选择使用 MySQL 数据库或 OceanBase 数据库作为 obconfigserver 的元数据库。 |
| connection_url | 可选 | $home_path/.data.db?cache=shared&_fk=1 | 元数据库的路径,当 database_type 取值为 mysql 时,该配置项为必填项。当 database_type 取值为 sqlite3 时,若不配置则使用默认值;若您自行配置,请填写绝对路径。 |
此处以 example/oblogproxy/oblogproxy-only-example.yaml 文件为例介绍部署 oblogproxy 时需注意的配置项。通过配置文件部署 oblogproxy 流程可参见 通过命令行部署 oblogproxy。
oblogproxy:
version: 2.0.0
servers:
- 192.168.1.1
global:
home_path: /home/admin/oblogproxy
service_port: 2983 # External port. The default value is 2983.
ob_sys_username: "" # A user under the sys tenant of oceanbase-ce, oblogproxy communicates with oceanbase-ce using this user.,default ''
ob_sys_password: "" # ob_sys_username`s password, default ''
#binlog_dir: /home/admin/oblogproxy/run # The directory for binlog file. The default value is $home_path/run.
#binlog_mode: true # enable binlog mode, default true
您需关注的配置项如下表所示,详细的配置项介绍可参见 oblogproxy 配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| version | 可选 | 默认部署最新版本 | 指定待部署组件版本,通常情况下不需要指定。 |
| servers | 必选 | 无 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,也可以使用 - <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| home_path | 必选 | 无 | oblogproxy 的安装路径。 |
| service_port | 必选 | 2983 | oblogproxy 服务监听端口。 |
| ob_sys_username | 可选 | 默认为空 | oblogproxy 与 OceanBase 数据库通信的用户名,需要是 sys 租户下的用户,需提前创建。此处的用户名仅需配置 user_name,不需要包含集群名称或租户名称。 |
| ob_sys_password | 可选 | 默认为空 | ob_sys_username 配置项对应用户的密码,需与 OceanBase 数据库中对应用户的密码保持一致。 |
| binlog_dir | 可选 | $home_path/run | Binlog 服务目录根路径,需配置为绝对路径。 |
| binlog_mode | 可选 | true | 控制是否开启 Binlog 模式。 |
其他 oblogproxy 相关配置项可参见《OceanBase 日志代理服务》文档中 配置文件 一文,需要注意如下几点:
使用 obd 部署 oblogproxy 时,obd 中的
binlog_dir配置项对应 oblogproxy 原本的binlog_log_bin_basename配置项。使用 obd 部署 oblogproxy 时,
binlog_mode配置项的默认值为true。使用 obd 部署 oblogproxy 时,
ob_sys_username和ob_sys_password配置项需配置为明文。
此处以 example/obbinlog-ce/obbinlog-ce-only-example.yaml 文件为例介绍部署 obbinlog 时需注意的配置项。通过配置文件部署 obbinlog 流程可参见 部署 Binlog 服务。
obbinlog-ce:
version: 4.0.1
servers:
- name: server1
ip: 10.10.10.1
- name: server2
ip: 10.10.10.2
global:
home_path: /home/admin/obbinlog
service_port: 2983 # External port. The default value is 2983.
prometheus_port: 2984 # The Prometheus port. The default value is 2984.
meta_host: 10.10.10.1 # meta support ob/mysql
meta_port: 2881
meta_username: root@binlog # need tenant exist, if db is mysql, use root or other
meta_password: ******
meta_db: test
# init_schema: true # init meta db, default true
您需关注的配置项如下表所示,详细的配置项介绍可参见 obbinlog 配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| version | 可选 | 镜像库中最新版本 | 指定待部署组件版本,通常情况下不需要指定。 |
| servers | 必选 | 无 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,也可以使用 - <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| home_path | 必选 | 无 | obbinlog 的安装路径。 |
| service_port | 必选 | 2983 | Binlog 服务监听端口。 |
| prometheus_port | 必选 | 2984 | Binlog 服务 Prometheus 监听端口。 |
| meta_host |
|
无 | Binlog 服务元数据库的连接 IP。
说明支持使用 OceanBase 数据库或 MySQL 数据库充当元数据库。 |
| meta_port |
|
无 | Binlog 服务元数据库的连接端口。 |
| meta_username |
|
无 | Binlog 服务元数据库的连接用户名,需确保配置的用户在元数据中已存在。 |
| meta_password |
|
无 | meta_username 用户对应密码。 |
| meta_db |
|
无 | Binlog 服务元数据库中使用的 database 名,需确保配置的 database 在元数据库中已存在。 |
| init_schema | 可选 | true | 控制是否初始化元数据库。初始化元数据库会在元数据库中创建所需的表,具体介绍可参见官网《OceanBase Binlog 服务》文档 元数据信息。 |
此处以 example/prometheus/prometheus-only-example.yaml 文件为例介绍部署 Prometheus 时需注意的配置项。通过配置文件部署 Prometheus 流程可参见 为现有集群增加白屏监控。
prometheus:
servers:
- 10.10.10.4
global:
# The working directory for prometheus. prometheus is started under this directory. This is a required field.
home_path: /home/admin/prometheus
address: 0.0.0.0 # The ip address to bind to. Along with port, corresponds to the `web.listen-address` parameter.
port: 9090 # The http port to use. Along with address, corresponds to the `web.listen-address` parameter.
enable_lifecycle: true # Enable shutdown and reload via HTTP request. Corresponds to the `web.enable-lifecycle` parameter.
data_dir: /home/admin/prometheus/data # Base path for metrics storage. Corresponds to the `storage.tsdb.path` parameter.
# basic_auth_users: # Usernames and passwords that have full access to the web server via basic authentication. Corresponds to the `basic_auth_users` parameter.
# <username>: <password> # The format of `basic_auth_users` : the key is the user name and the value is the password.
# web_config: # Content of Prometheus web service config file. The format is consistent with the file. However, `basic_auth_users` cannot be set in it. Please set `basic_auth_users` above if needed. Corresponds to the `web.config.file` parameter.
# tls_server_config:
# # Certificate and key files for server to use to authenticate to client.
# cert_file: <filename>
# key_file: <filename>
config: # Configuration of the Prometheus service. The format is consistent with the Prometheus config file. Corresponds to the `config.file` parameter.
rule_files:
- rules/*rules.yaml
scrape_configs:
- job_name: prometheus
metrics_path: /metrics
scheme: http
static_configs:
- targets:
- localhost:9090
- job_name: node
basic_auth:
username: ********
password: ********
metrics_path: /metrics/node/host
scheme: http
file_sd_configs: # Set the targets to be collected by reading local files. The example is to collect targets corresponding to all yaml files in the 'targets' directory under $home_path.
- files:
- 'targets/*.yaml'
- job_name: ob_basic
basic_auth:
username: ********
password: ********
metrics_path: /metrics/ob/basic
scheme: http
file_sd_configs:
- files:
- 'targets/*.yaml'
- job_name: ob_extra
basic_auth:
username: ********
password: ********
metrics_path: /metrics/ob/extra
scheme: http
file_sd_configs:
- files:
- 'targets/*.yaml'
- job_name: agent
basic_auth:
username: **********
password: ********
metrics_path: /metrics/stat
scheme: http
file_sd_configs:
- files:
- 'targets/*.yaml'
# additional_parameters: # Additional parameters for Prometheus service, among which `web.listen-address`, `web.enable-lifecycle`, `storage.tsdb.path`, `config.file` and `web.config.file` cannot be set. Please set them in the corresponding configuration above if needed.
# - log.level: debug
您需关注的配置项如下表所示,详细的配置项介绍可参见 Prometheus 配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| servers | 必选 | 无 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,多个机器就指定多次,机器标识名不能重复。在机器 IP 不重复的情况下,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| home_path | 必选 | 无 | 组件的工作目录。 |
| address | 必选 | 0.0.0.0 | Prometheus 监听地址。 |
| port | 必选 | 9090 | Prometheus 监听端口。 |
| enable_lifecycle | 必选 | true | 控制是否启用通过 HTTP 请求关闭和重新加载的功能。 |
| data_dir | 可选 | 无 | 指标存储的基本路径。 |
| basic_auth_users | 可选 | 无 | Prometheus Web 服务的认证信息,键名为用户名,值为密码。 |
| web_config | 可选 | 无 | Prometheus 的 Web 服务配置,可在其下配置服务器用于向客户端进行身份验证的证书和密钥文件。 |
| config | 可选 | 无 | Prometheus 的配置,格式与 Prometheus 配置文件一致。对应于 config.file 参数。 |
| additional_parameters | 可选 | 无 | Prometheus 启动参数。 |
此处以 example/grafana/grafana-only-example.yaml 文件为例介绍部署 Grafana 时需注意的配置项。通过配置文件部署 Grafana 流程可参见 为现有集群增加白屏监控。
grafana:
servers:
- 10.10.10.4
global:
home_path: /home/admin/grafana
login_password: ******** # Grafana login password.
data_dir: # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used).$data_dir can be empty. The default value is $home_path/data.
logs_dir: # Directory where grafana can store logs, can be empty. The default value is $data_dir/log.
plugins_dir: # Directory where grafana will automatically scan and look for plugins, can be empty. The default value is $data_dir/plugins.
provisioning_dir: # folder that contains provisioning config files that grafana will apply on startup and while running, can be empty. The default value is $home_path/conf/provisioning.
temp_data_lifetime: 24h # How long temporary images in data directory should be kept. Supported modifiers h (hours), m (minutes), Use 0 to never clean up temporary files, can be empty. The default value is 24h.
log_max_days: 7 # Expired days of log file(delete after max days), can be empty. The default value is 7.
# domain: # The public facing domain name used to access grafana from a browser, can be empty. The default value is $server.ip.
# port: # The http port to use, can be empty. The default value is 3000.
# # list of datasources to insert/update depending on what's available in the database, can be empty.
# # For more parameter settings, please refer to https://grafana.com/docs/grafana/latest/administration/provisioning/#datasources
# datasources:
# name: # name of the datasource. Required and should not be 'OB-Prometheus'
# type: # datasource type. Required
# access: # access mode. direct or proxy. Required
# url: # the url of datasource
# list of dashboards providers that load dashboards into Grafana from the local filesystem, can be empty.
# For more information, please refer to https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards
# providers:
# name: # an unique provider name. Required and should not be 'OceanBase Metrics'
# type: # provider type. Default to 'file'
# options:
# path: # path to dashboard files on disk. Required when using the 'file' type
# # customize your Grafana instance by adding/modifying the custom configuration as follows
# # for more information, please refer to https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#configure-grafana
# # Here, setting parameters is required for format conversion.
# # For example, if the original grafana configuration format is
# #
# # [section1.section2]
# # key1 = value1
# # key2 = value2
# #
# # Then when writing the configuration below, you need to write it as
# #
# # section1:
# # section2:
# # key1: value1
# # key2: value2
# #
# # Here we only list one item, because there are more than 500 items. Please add them according to your own needs.
# customize_config:
# # original grafana configuration format is
# # [server]
# # protocol = http
# server:
# protocol: http
您需关注的配置项如下表所示,详细的配置项介绍可参见 Grafana 配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| servers | 必选 | 无 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,多个机器就指定多次,机器标识名不能重复。在机器 IP 不重复的情况下,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| home_path | 必选 | 无 | 组件的工作目录。 |
| login_password | 必选 |
|
Grafana 登录密码,可在部署成功后通过 obd cluster edit-config 命令查看配置文件中对应的配置项获取密码。 |
| data_dir | 可选 | $home_path/data | Grafana 用来存储 sqlite3、临时文件、会话等路径。 |
| logs_dir | 可选 | $data_dir/log | Grafana 用来存放日志的目录。 |
| plugins_dir | 可选 | $data_dir/plugins | Grafana 自动扫描并查找插件的目录。 |
| provisioning_dir | 可选 | $home_path/conf/provisioning | 包含 Grafana 将在启动和运行时应用的配置文件的文件夹。 |
| temp_data_lifetime | 可选 | 24h | Grafana 数据目录中的临时图像保留时间。支持的单位有 h(小时)、m(分钟),配置为 0 时表示从不清理临时文件。 |
| log_max_days | 可选 | 7 | 日志文件的过期天数阈值,日志文件存放天数达到该值后删除对应日志文件。 |
此处以 example/alertmanager-only-example.yaml 文件为例介绍部署 Alertmanager 时需要注意的配置项。推荐通过 obd 白屏页面部署 Alertmanager,详细操作可参见 部署 OceanBase 集群。
alertmanager:
servers:
- 192.168.1.5
global:
home_path: /home/admin/alertmanager
# log_dir: /home/admin/alertmanager/log # alertManager log storage directory
# data_retention: 120h #alertmanager how long to keep data form, corresponds to the `data.retention` parameter.
# address: 0.0.0.0 # The ip address to bind to. Along with port, corresponds to the `web.listen-address` parameter.
# port: 9093 # The http port to use. Along with address, corresponds to the `web.listen-address` parameter.
# data_dir: /home/admin/alertmanager/data # Base path for data storage. Corresponds to the `storage.path` parameter.
# basic_auth_users: # Usernames and passwords that have full access to the web server via basic authentication. Corresponds to the `web.config.fil` parameter.
# <username>: <password> # The format of `basic_auth_users` : the key is the user name and the value is the password.
# web_config: # Content of alertmanager web service config file. The format is consistent with the file. However, `basic_auth_users` cannot be set in it. Please set `basic_auth_users` above if needed. Corresponds to the `web.config.file` parameter.
# tls_server_config:
# # Certificate and key files for server to use to authenticate to client.
# cert_file: <filename>
# key_file: <filename>
# receivers: #one or more notification list
# - test #User-defined notification name
# - test2
# alertmanager_config: # This field is a user-defined alertmanager configuration and conflicts with receivers
# route:
# group_by: [ 'alertname' ]
# group_wait: 30s
# group_interval: 5m
# repeat_interval: 1h
# receiver: 'yourname'
# receivers:
# - name: 'yourname'
# webhook_configs:
# - url: 'http://127.0.0.1:5001/'
# additional_parameters: #Additional parameters for Alertmanager service, among which `web.listen-address`, `web.enable-lifecycle`, `storage.tsdb.path`, `config.file` and `web.config.file` cannot be set. Please set them in the corresponding configuration above if needed.
# - log.level: debug
# test: # The same as the name of the receivers configured by the user
# receiver_type: webhook # alrtmanager notification type
# webhook_url: http://localhost:6766
# test2: # The same as the name of the receivers configured by the user
# receiver_type: email
# to: "to email"
# from: "from email"
# smarthost: "smtp.xx.com:xxx"
# auth_username: "email name"
# auth_password: xxx
# require_tls: true
# send_resolved: true
您需关注的配置项如下表所示,详细的配置项介绍可参见 Alertmanager 配置项。
| 配置项 | 是否必选 | 默认值 | 说明 |
|---|---|---|---|
| servers | 必选 | 无 | 指定部署组件的机器,目前仅支持在部署 Alertmanager 时配置单台机器。可通过 - name: 机器标识名(换行)ip: 机器 IP 格式指定,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| home_path | 必选 | 无 | 组件的工作目录。 |
| log_dir | 可选 | ${home_path}/log | 日志存储目录。 |
| data_dir | 可选 | ${home_path}/data | 数据存储目录,对应 Alertmanager 原生配置中的 storage.path 配置。 |
| receivers | 可选 | 无 | 通知的接收者列表,自定义接收名,配置后需在下文配置对应接收名的接收类型及对应信息。具体介绍可参见下文 receivers。
说明未配置 |
| address | 可选 | 0.0.0.0 | Alertmanager web 页面的访问地址。 |
| port | 可选 | 9093 | Alertmanager 的监听端口。 |
| data_retention | 可选 | 120h | 数据表单保存时长,超过设置值后数据表单将被删除。对应 Alertmanager 原生配置中的 data.retention 参数。 |
| basic_auth_users | 可选 | admin: *****其中, admin 为用户名,***** 为随机生成的密码 |
设置访问 web 服务器的用户名和密码,明文配置账密,通过 <username>: <password> 格式配置。对应 Alertmanager 原生配置中的 web.config.fil 参数。 |
| web_config | 可选 | 无 | 认证相关配置,可在其下配置服务器用于向客户端进行身份验证的证书和密钥文件。对应 Alertmanager 原生配置中的 web.config.file 参数。 |
| alertmanager_config | 可选 | 无 | 用户自定义的 alertmanager 配置,完全兼容 Alertmanager 原生配置项。
说明未配置 |
| additional_parameters | 可选 | 无 | 额外的启动参数,需要添加的启动参数可以使用该配置项配置,支持单个键值对(Key-Value)结构或者字符串。 |
receivers
在 receivers 中配置通知列表后,需要根据接收类型配置接收信息,支持设置为如下几种接收类型:
discord:将告警发送到 Discord 服务器,具体配置信息可参见 discord_config。email:通过 SMTP 协议发送邮件通知,具体配置信息可参见 email_config。msteams:将告警发送到 Microsoft Teams(传统版本),具体配置信息可参见 msteams_config。msteamsv2:将告警发送到 Microsoft Teams(v2 版本),具体配置信息可参见 msteamsv2_config。jira:将告警自动创建为 Jira 问题(Issue),具体配置信息可参见 jira_config。opsgenie:通过 Opsgenie 发送告警通知(支持自动分派和值班排班),具体配置信息可参见 opsgenie_config。pagerduty:通过 PagerDuty 发送告警通知(支持紧急联系人分派),具体配置信息可参见 pagerduty_config。pushover:通过 Pushover 发送移动端通知(支持 iOS/Android),具体配置信息可参见 pushover_config。rocketchat:将告警发送到 Rocket.Chat,具体配置信息可参见 rocketchat_config。sns:通过 AWS SNS 发送告警(支持 SMS、邮件、Lambda 等),具体配置信息可参见 sns_config。telegram:通过 Telegram 发送告警消息,具体配置信息可参见 telegram_config。victorops:通过 VictorOps(现为 Splunk On-Call)发送告警,具体配置信息可参见 victorops_config。webex:将告警发送到 Cisco Webex,具体配置信息可参见 webex_config。webhook:自定义 Webhook 接口(最灵活的方式),具体配置信息可参见 webhook_config。wechat:通过企业微信发送告警,具体配置信息可参见 wechat_config。
各个接收类型中必填字段介绍如下:
| 接收类型 | 字段名 | 默认值 | 说明 |
|---|---|---|---|
| discord | webhook_url | 无 | Discord webhook 的 URL,与 webhook_url_file 互斥,两者仅支持配置其一。 |
| webhook_url_file | 无 | Discord webhook 的 URL 的文件路径,配置后将从文件中读取 Discord webhook 的 URL。与 webhook_url 互斥,两者仅支持配置其一。 |
|
| to | 无 | 收件人的电子邮件地址,允许以逗号分隔的 RFC5322 兼容电子邮件地址列表。 | |
| from | 无 | 发件人的邮箱地址。 | |
| smarthost | 无 | 发送电子邮件的 SMTP 主机,包含端口号。 | |
| auth_username | 无 | SMTP 身份验证信息,使用 CRAM-MD5、LOGIN 和 PLAIN 进行 SMTP 身份验证。 | |
| auth_password | 无 | SMTP 身份验证信息,与 auth_password_file 互斥,两者仅支持配置其一。 |
|
| auth_password_file | 无 | SMTP 身份验证信息的文件路径,配置后将从文件中读取 SMTP 身份验证信息。与 auth_password 互斥,两者仅支持配置其一。 |
|
| msteams | webhook_url | 无 | Microsoft Teams Webhook URL,与 webhook_url_file 互斥,两者仅支持配置其一。 |
| webhook_url_file | 无 | Microsoft Teams Webhook URL 的文件路径,配置后将从文件中读取 Microsoft Teams Webhook URL。与 webhook_url 互斥,两者仅支持配置其一。 |
|
| msteamsv2 | webhook_url | 无 | 传入的 webhook 的 URL,与 webhook_url_file 互斥,两者仅支持配置其一。 |
| webhook_url_file | 无 | 传入的 webhook 的 URL 的文件路径,配置后将从文件中读取 webhook 的 URL。与 webhook_url 互斥,两者仅支持配置其一。 |
|
| jira | api_url | 无 | Jira 实例的 URL,必须包括完整的 API 路径。 |
| project | 无 | Jira 项目标识。 | |
| opsgenie | api_key | 无 | 与 Opsgenie API 通信时使用的 API 密钥,与 api_key_file 互斥,两者仅支持配置其一。 |
| api_key_file | 无 | 与 Opsgenie API 通信时要使用的 API 密钥的文件路径,配置后将从文件中读取与 Opsgenie API 通信时要使用的 API 密钥。与 api_key 互斥,两者仅支持配置其一。 |
|
| api_url | https://api.opsgenie.com/ | Opsgenie API 请求的目标主机地址。 | |
| pagerduty | routing_key | 无 | PagerDuty 路由密钥,仅在使用 PagerDuty 集成类型 Events API v2 时需要配置。如需配置,该配置项与 routing_key_file 互斥,两者仅支持配置其一。 |
| routing_key_file | 无 | PagerDuty 路由密钥的文件路径,仅在使用 PagerDuty 集成类型 Events API v2 时需要配置。如需配置,该配置项与 routing_key 互斥,两者仅支持配置其一。 |
|
| service_key | 无 | PagerDuty 服务密钥,仅当使用 PagerDuty 的集成类型 Prometheus 时需要配置。如需配置,该配置项与 service_key_file 互斥,两者仅支持配置其一。 |
|
| service_key_file | 无 | PagerDuty 服务密钥的文件路径,仅当使用 PagerDuty 的集成类型 Prometheus 时需要配置。如需配置,该配置项与 service_key 互斥,两者仅支持配置其一。 |
|
| url | https://events.pagerduty.com/v2/enqueue | API 请求发送到的目标 URL。 | |
| pushover | user_key | 无 | 收件人用户的密钥,与 user_key_file 互斥,两者仅支持配置其一。 |
| user_key_file | 无 | 收件人用户密钥的文件路径,配置后将从文件中读取收件人用户密钥。与 user_key 互斥,两者仅支持配置其一。 |
|
| token | 无 | 注册的应用程序的 API 令牌,与 token_file 互斥,两者仅支持配置其一。 |
|
| token_file | 无 | 注册的应用程序的 API 令牌的文件路径,配置后将从文件中读取应用程序的 API 令牌。与 token 互斥,两者仅支持配置其一。 |
|
| rocketchat | token | 无 | 发送方令牌,与 token_file 互斥,两者仅支持配置其一。 |
| token_file | 无 | 发送方令牌的文件路径,配置后将从文件中读取发送方令牌。与 token 互斥,两者仅支持配置其一。 |
|
| token_id | 无 | 发送方 token_id,与 token_id_file 互斥,两者仅支持配置其一。 |
|
| token_id_file | 无 | 发送方 token_id 的文件路径,配置后将从文件中读取发送方 token_id。与 token_id 互斥,两者仅支持配置其一。 |
|
| sns | topic_arn | 无 | SNS 主题 ARN,格式如:arn:aws:sns:us-east-2:698519295917:my-topic。如果不指定此值,则必须为 phone_number 或 target_arn 指定一个值。 |
| phone_number | 无 | 通过短信发送时的电话号码(E.164 格式)。如果不指定此值,则必须为 topic_arn 或 target_arn 指定一个值。 |
|
| target_arn | 无 | 移动平台端点 ARN(用于移动推送通知)。如果不指定此值,则必须为 topic_arn 或 phone_number 指定一个值。 |
|
| telegram | bot_token | 无 | Telegram 机器人令牌,与 bot_token_file 互斥,两者仅支持配置其一。 |
| bot_token_file | 无 | Telegram 机器人令牌的文件路径,配置后将从文件中读取 Telegram 机器人令牌。与 bot_token 互斥,两者仅支持配置其一。 |
|
| chat_id | 无 | 发送消息的聊天 ID。 | |
| victorops | api_key | 无 | 与 VictorOps API 对话时使用的 API 密钥,与 api_key_file 互斥,两者仅支持配置其一。 |
| api_key_file | 无 | 与 VictorOps API 对话时使用的 API 密钥的文件路径,与 api_key 互斥,两者仅支持配置其一。 |
|
| routing_key | 无 | 用于将警报映射到团队的密钥。 | |
| webhook | url | 无 | 向其发送 HTTP POST 请求的端点,与 url_file 互斥,两者仅支持配置其一。 |
| url_file | 无 | 向其发送 HTTP POST 请求的端点的文件路径,配置后将从文件中读取发送 HTTP POST 请求的端点。与 url 互斥,两者仅支持配置其一。 |
|
| api_secret | 无 | 与微信 API 对话时使用的 API 键。 | |
| corp_id | 无 | 用于身份验证的公司 ID。 | |
| webex | room_id | 无 | 发送消息的 Webex Teams 会议室的 ID。 |
此处以 example/ocp-server/ocp-only-example.yaml 文件为例介绍部署 OCP 时需注意的配置项。推荐通过 obd 白屏页面部署 OCP,详细操作可参见 通过图形化界面部署 OCP。
ocp-server-ce:
servers:
- 10.10.10.1
global:
home_path: /home/admin/ocp
memory_size: 8G
port: 8080
soft_dir: /home/admin/ocp/software # Directory used to store packages
log_dir: /home/admin/ocp/logs # Directory used to temporary store downloaded logs
# admin_password: ****** # Password of ocp's admin user
jdbc_url: jdbc:oceanbase://10.10.10.1:2881/meta_database # Jdbc url of meta obcluster
jdbc_username: root@sys
jdbc_password: ********
# ocp_site_url: http://10.10.10.1:8080
# OCP meta tenant definition, including tenant name, cpu and memory
ocp_meta_tenant:
tenant_name: ocp_meta
max_cpu: 2.0
memory_size: 2G
ocp_meta_username: root # User to use under ocp meta tenant
ocp_meta_password: ****** # Password used to connect to ocp meta tenant
ocp_meta_db: meta_database # Database used to store ocp meta data
# OCP monitor tenant definition, including tenant name, cpu and memory
ocp_monitor_tenant:
tenant_name: ocp_monitor
max_cpu: 2.0
memory_size: 2G
ocp_monitor_username: root # User to use under ocp monitor tenant
ocp_monitor_password: ****** # Password used to connect to ocp meta tenant
ocp_monitor_db: monitor_database # Database used to store ocp meta data
您需关注的配置项如下表所示,详细的配置项介绍可参见 OCP 配置项。
说明
重新部署会清空集群中的数据,如需修改表格中 修改后生效方式 为 重新部署 的配置项请先做好备份。
依赖 OceanBase 数据库部署 OCP 时(使用
distributed-with-obproxy-and-ocp-example.yaml配置文件),obd 会依赖 OceanBase 数据库组件下的配置获取 OCP 元数据库的信息,此时配置jdbc_xxx这三个配置项会报错。
| 配置项 | 是否必选 | 默认值 | 修改后生效方式 | 说明 |
|---|---|---|---|---|
| servers | 必选 | 无 | 重新部署 | 每台机器需要用 - name: 机器标识名(换行)ip: 机器 IP 指定,多个机器就指定多次,机器标识名不能重复。在机器 IP 不重复的情况下,也可以使用 - <ip> (换行)- <ip> 的格式指定,此时 - <ip> 的格式相当于 - name: 机器 IP(换行)ip: 机器 IP。 |
| home_path | 必选 | 无 | 重新部署 | 组件的工作目录。 |
| memory_size | 可选 | 2G | 重启进程 | ocp-server 进程使用的内存大小。 |
| port | 必选 | 8080 | 重启进程 | OCP 的服务监听端口。 |
| soft_dir | 可选 | ~/ocp-server/lib | 重新部署 | OCP 中存放软件包(如 OBProxy、OBAgent 等)的目录。 |
| log_dir | 可选 | $home_path/log | 重新部署 | OCP 的日志存放目录。 |
| admin_password | 必选 | 随机字符串 | 重启进程 | OCP 管理员账号的登录密码。 |
| jdbc_url | 可选 | 无 | 重启进程 | OCP 元数据库的 JDBC 连接串。 |
| jdbc_username | 可选 | 无 | 重启进程 | OCP 元数据库的登录用户,格式为 user_name@tenant_name。单独部署 OCP 时必须配置为 root@sys。
说明单独部署 OCP 时,该配置项为必选项。 |
| jdbc_password | 可选 | 无 | 重启进程 | OCP 元数据库的登录密码。 |
| ocp_site_url | 可选 | 无 | 重启进程 | 外部访问 OCP 网站的地址,要求以 http/https 开始,包含 VIP 地址/域名/端口的网址,且结尾不含斜杠 /。未配置的情况下,外部访问 OCP 的网址默认为根据配置文件中配置的服务器 IP(servers)和端口(port)信息生成的网址。 |
| ocp_meta_tenant | 必选 | tenant_name: meta_tenant max_cpu: 1 memory_size: 2147483648 |
重新部署 | OCP 元信息租户信息,obd 将根据这里的配置为 OCP 创建元信息租户。
|
| ocp_meta_username | 可选 | meta | 重启进程 | 连接 OCP 元信息租户的用户名。 |
| ocp_meta_password | 必选 |
|
重启进程 | ocp_meta_username 对应用户名的密码。 |
| ocp_meta_db | 可选 | meta_database | 重新部署 | 存放 OCP 元信息的 database 名。 |
| ocp_monitor_tenant | 必选 | tenant_name: monitor_tenant max_cpu: 1 memory_size: 2147483648 |
重新部署 | OCP 监控数据租户信息,obd 将根据这里的配置为 OCP 创建监控数据租户。
|
| ocp_monitor_username | 可选 | monitor_user | 重启进程 | 连接 OCP 监控数据租户的用户名。 |
| ocp_monitor_password | 必选 |
|
重启进程 | ocp_monitor_username 对应用户名的密码。 |
| ocp_monitor_db | 可选 | monitor_database | 重新部署 | 存放 OCP 监控数据的 database 名。 |