This topic describes the configuration files in OceanBase Deployer (obd) and the parameters in the configuration files.
Terms
obd
obd is a tool used to install and deploy OceanBase Database. For more information, see obd documentation.
OceanBase Database Proxy (ODP)
ODP, also referred to as OBProxy, is a proxy server for OceanBase Database. For more information, see ODP documentation.
OBAgent
OceanBase Agent (OBAgent) is a data monitoring and collection framework for OceanBase Database. The framework supports both pushing and pulling modes for data collection in different scenarios.
OCP Express
OceanBase Cloud Platform (OCP) Express is a web-based management tool for OceanBase Database V4.x. Integrated with an OceanBase cluster, OCP Express allows you to view key performance metrics of the cluster and perform basic database management operations on the cluster. For more information, see OCP Express documentation.
obconfigserver
obconfigserver allows you to register, store, and query metadata of OceanBase Database. For more information, see ob-configserver.
oblogproxy
oblogproxy is a proxy service for managing incremental logs of OceanBase Database. It connects to OceanBase Database and reads incremental logs. It provides the change data capture (CDC) capability for downstream services.
Grafana
Grafana is an open source data visualization tool that visualizes various metrics in data sources to help you understand the system running status and performance. For more information, visit the official website of Grafana.
Prometheus
Prometheus is an open source service monitoring system and time series database. It provides common data models and APIs for fast data collection, storage, and query. For more information, visit the official website of Prometheus.
OceanBase Cloud Platform (OCP)
OCP is an enterprise-level management platform tailored for OceanBase Database. OCP is compatible with all mainstream versions of OceanBase Database. OCP provides a management GUI for full-lifecycle management of databases and resources, monitoring and alerting, performance diagnostics, fault recovery, and backup and restore. It aims to help you efficiently manage OceanBase Database and reduce the IT O&M costs and learning costs. For more information, see OCP documentation.
Sample configuration files
obd provides sample configuration files required for cluster deployment. You can modify and use them based on your server resources.
If you have installed obd by downloading the RPM package for obd, you can view the sample configuration files in the
/usr/obd/exampledirectory.If you have installed obd by using the all-in-one installation package, you can view the sample configuration files in the
~/.oceanbase-all-in-one/obd/usr/obd/exampledirectory.You can also view the sample configuration files on GitHub.
Note
Two types of configuration files are available: one for the small-scale development mode and the other for the professional development mode. The configuration files for the two modes contain the same parameters but different parameter values. You can select a file type based on your resource conditions.
The small-scale development mode applies to individual devices with at least 8 GB of memory. The name of a configuration file of this type is prefixed with
miniorminThe professional development mode applies to advanced Elastic Compute Service (ECS) instances or physical servers with at least 16 CPU cores and 64 GB of memory.
The following table describes the general configuration files used in OceanBase Database deployment.
| Configuration file | Description | Component |
|---|---|---|
mini-local-example.yaml/local-example.yaml |
Sample configuration files for the local standalone deployment of OceanBase Database. You can deploy OceanBase Database on a single local server without configuring user information. | OceanBase Database |
mini-single-example.yaml/single-example.yaml |
Sample configuration files for the standalone deployment of OceanBase Database. You can deploy OceanBase Database on any server by configuring user information. | OceanBase Database |
mini-single-with-obproxy-example.yaml/single-with-obproxy-example.yaml |
Sample configuration files for the standalone deployment of OceanBase Database and ODP. | OceanBase Database and ODP |
mini-distributed-example.yaml/distributed-example.yaml |
Sample configuration files for the distributed deployment of OceanBase Database. | OceanBase Database |
mini-distributed-with-obproxy-example.yaml/distributed-with-obproxy-example.yaml |
Sample configuration files for the distributed deployment of OceanBase Database and ODP. | OceanBase Database and ODP |
default-components-min.yaml/default-components.yaml |
Sample configuration files for the distributed deployment of OceanBase Database, ODP, and OCP Express. | OceanBase Database, ODP, OBAgent, and OCP Express |
all-components-min.yaml/all-components.yaml |
Sample configuration files for the distributed deployment of OceanBase Database and all other components. | OceanBase Database, ODP, OBAgent, OCP Express, obconfigserver, oblogproxy, Prometheus, and Grafana |
Note
If you plan to deploy OCP Express, you do not need to deploy Prometheus or Grafana.
In addition to the preceding sample configuration files, the example directory provides more sample configuration files for different scenarios in the following subdirectories:
autodeploy: The sample configuration files in this directory are intended for the obd cluster autodeploy command. You need to only modify the IP address and directories in a sample configuration file. obd will automatically generate complete configurations with the highest specifications and deploy and start the cluster based on the resources on the target server.
grafana: The sample configuration files in this directory are intended for Grafana. You can use a sample configuration file to deploy Grafana separately or deploy both Grafana and Prometheus.
ob-configserver: The sample configuration files in this directory are intended for obconfigserver. You can use a sample configuration file to deploy obconfigserver separately or deploy OceanBase Database, ODP, and obconfigserver at a time.
obagent: The sample configuration files in this directory are intended for OBAgent. You can select a sample configuration file based on the version of OBAgent to deploy.
oblogproxy: The sample configuration files in this directory are intended for oblogproxy. You can use a sample configuration file to deploy oblogproxy separately or deploy OceanBase Database, ODP, obconfigserver, and oblogproxy at a time.
obproxy: The sample configuration files in this directory are intended for ODP. You can use a sample configuration file to deploy ODP separately or deploy both OceanBase Database and ODP.
oceanbase-3.x: The sample configuration files in this directory are intended for OceanBase Database V3.x.
ocp: The sample configuration files in this directory are intended for OCP. You can use a sample configuration file to deploy OCP separately or deploy OceanBase Database, ODP, and OCP at a time.
ocp-express: The sample configuration files in this directory are intended for OCP Express. You can use a sample configuration file to deploy OCP Express separately.
prometheus: The sample configuration files in this directory are intended for Prometheus. You can use a sample configuration file to deploy Prometheus separately or deploy OceanBase Database, OBAgent, and Prometheus at a time.
scale_out: The sample configuration files in this directory are intended for scale-out and component changes. You can run related commands to scale out components or add or remove a component by using corresponding configuration files. For more information, see Scale out a cluster and change cluster components.
Note
The scale_out directory stores only the sample configuration files of some components. Note that obd supports changes of all components and scale-out of all components other than oblogproxy.
Configuration file format
Configuration files in obd have a fixed format. Modules in a configuration file are described as follows:
# Only need to configure when remote login is required
# user: # SSH logon configuration.
# 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: # The name of the component to deploy. The following are the configurations of this component.
servers: # The node list.
- name: server1 # This parameter can be left empty. In this case, the node name is the same as the IP address. In this example, the node name is 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 global configurations. You can write the identical configurations here.
# If a parameter has different values in the node configurations and global configurations, the value in the node configurations prevails.
devname: eth0
......
# Parameters are omitted here.
# 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: # The node configurations. In this example, the configurations of the server1 node with the IP address 10.10.10.1 are written here. The node configurations have the highest priority.
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: # The node configurations. In this example, the configurations of the server2 node with the IP address 10.10.10.2 are written here.
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: # The node configurations. In this example, the configurations of the server3 node with the IP address 10.10.10.3 are written here.
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
The following table describes the modules.
| Module | Description |
|---|---|
| user | User information is configured in this module. We recommend that you specify the admin user. Pay attention to the following parameters in this module:
Notice |
| oceanbase-ce | The name of the component to deploy. The following are the configurations of this component. |
| servers | Node information is configured in this module. Each server is specified in the format of - name: server identifier(line break)ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the format of - <ip>(line break)- <ip>. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address. |
| global | Global configurations are written in this module. If a parameter has different values in the node configurations and global configurations, the value in the node configurations prevails. |
| server1 | Node configurations are written in this module. The server1 node with the IP address 10.10.10.1 is used as an example here. You must change the node name to the value specified by the name parameter in the servers module.
Note |
Parameters
This section describes the parameters of different components in configuration files.
This section takes the configurations of the oceanbase-ce component in the distributed-with-obproxy-example.yaml configuration file in the example directory as an example to describe the key parameters for deploying OceanBase Database. For more information about how to deploy OceanBase Database by using a configuration file, see Deploy OceanBase Database on a single OBServer node.
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
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.
# 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
The following table describes the key parameters. For more information about the parameters, see plugins/oceanbase/4.2.2.0/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| version | No | Latest version | The version of the component to deploy. Generally, you do not need to specify this parameter. The latest version is deployed by default. |
| package_hash | No | Latest version | The software package HASH value of the component to deploy. Generally, you do not need to specify this parameter. The latest version is deployed by default. |
| tag | No | None | The tag of the component to deploy. Generally, you do not need to specify this parameter. If you have set a tag for the OceanBase Database installation package that you compiled earlier, you can use the tag to specify the installation package. |
| servers | Yes | None | The servers. Specify each server in the format of - name: server identifier(line break)ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the format of - <ip> (line break)- <ip>. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address. |
| devname | No | None | The network interface cards (NICs) corresponding to the IP addresses specified in servers. You can view the mappings between IP addresses and NICs by using the ip addr command.
NoteWe recommend that you do not specify this parameter in OceanBase Database V4.2.0 and later. |
| local_ip | No | None | The IP addresses of the servers where OceanBase Database is installed. When you deploy an OceanBase cluster, obd automatically assigns the IP addresses specified for the servers parameter to this parameter. The value of this parameter overwrites that of the devname parameter during the deployment. For more information, see local_ip in OceanBase Database documentation.
Note
|
| memory_limit | No | 0 | The maximum memory that the observer process can obtain from the environment. If this parameter is not specified, the memory_limit_percentage parameter takes effect. For more information, see memory_limit and memory_limit_percentage. |
| system_memory | No | 0M | The reserved system memory, which is a part of memory_limit. If this parameter is not specified, OceanBase Database reserves memory for the system in adaptive mode. |
| datafile_size | No | 0 | The size of the data file block_file on the corresponding OBServer node. If this parameter is not specified, the datafile_disk_percentage parameter takes effect. For more information, see datafile_size and datafile_disk_percentage. |
| datafile_next | No | 0 | The auto scaling step of disk space. For information about how to enable auto scaling when this parameter is not specified, see Configure automatic scale-out of disk space for data files. |
| datafile_maxsize | No | 0 | The maximum disk space allowed for auto scaling. For information about how to enable auto scaling when this parameter is not specified, see Configure automatic scale-out of disk space for data files. |
| log_disk_size | No | 0 | The size of the redo log disk. If this parameter is not specified, the log_disk_percentage parameter takes effect. For more information, see log_disk_size and log_disk_percentage. |
| scenario | No |
|
The load type of the OceanBase cluster. If this parameter is not specified, obd provides interactive options for you to select a load type. Valid values:
NoticeThis parameter is available in OceanBase Database V4.3.0 and later. |
| production_mode | Yes | true | Specifies whether to enable the production mode for the cluster. The default value true indicates to enable the production mode. When the cluster is in production mode, the value of the memory_limit parameter must not be less than 16G, and the value of the __min_full_resource_pool_memory parameter must not be less than 2147483648. The __min_full_resource_pool_memory parameter specifies the minimum memory size for the resource pool. |
| enable_syslog_wf | No | true | Specifies whether to print system logs above the WARN level to a separate log file. |
| max_syslog_file_count | No | 0 | The maximum number of system log files that can be retained. The value 0 indicates to disable automatic recycling. |
| appname | No | Name of the deployed cluster | The name of the OceanBase cluster. If this parameter is not specified, the value of the deploy name parameter in the deployment command is used by default. |
| mysql_port | Yes | 2881 | The SQL port number. The value range is [1025, 65535]. |
| rpc_port | Yes | 2882 | The Remote Procedure Call (RPC) port number, which is used for communication between the observer process and other node processes. The value range is [1025, 65535]. |
| obshell_port | Yes | 2886 | The O&M port of OceanBase Database. The value range is [1025, 65535]. |
| home_path | Yes | None | The installation path of OceanBase Database. |
| data_dir | No | $home_path/store | The directory for storing SSTables and other data. We recommend that you use a separate disk.
Note |
| redo_dir | No | Same as data_dir |
In OceanBase Database V3.x, the value of this parameter is the directory where clogs, ilogs, or slogs are stored. In OceanBase Database V4.x, the value of this parameter is the directory where clogs are stored. By default, the value of this parameter is the same as that of data_dir. We recommend that you use a separate disk. |
| root_password | No |
|
The password of the super administrator (root@sys) of the OceanBase cluster. We recommend that you set a complex password. If you do not specify this parameter in obd V2.1.0 or later, a random string is automatically generated. After deployment, you can run the obd cluster edit-config command to view the password in the configuration file. |
| proxyro_password | No |
|
The password of the account (proxyro@sys) used by ODP to connect to the OceanBase cluster. After you specify this parameter, a proxyro user will be created in the sys tenant of OceanBase Database. If you do not specify this parameter in obd V2.1.0 or later, a random string is automatically generated. After deployment, you can run the obd cluster edit-config command to view the password in the configuration file. |
| ocp_agent_monitor_username | No | ocp_monitor | The username for collecting monitoring data of OceanBase Database. After you specify this parameter, a user with the same username will be created in the sys tenant of OceanBase Database. |
| ocp_agent_monitor_password | No |
|
The password for collecting monitoring data of OceanBase Database. When you use obd V2.1.0 or later to deploy OceanBase Database and OBAgent at a time, if you do not specify this parameter in obd, a random string is automatically generated. After deployment, you can run the obd cluster edit-config command to view the password in the configuration file. |
| zone | Yes | zone1 | The name of the zone to which the OBServer node belongs. |
This section takes the obproxy-only-example.yaml configuration file in the example/obproxy directory as an example to describe the key parameters for deploying 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.
The following table describes the key parameters. For more information about the parameters, see plugins/obproxy/3.1.0/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | The servers. Specify each server in the format of - name: server identifier(line break)ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the format of - <ip> (line break)- <ip>. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address. |
| listen_port | Yes | 2883 | The listening port of ODP. |
| prometheus_listen_port | Yes | 2884 | The Prometheus listening port of ODP. |
| rpc_listen_port | No | 2885 | The RPC service listening port of ODP.
NoteThis parameter is available in ODP V4.3.0 and later. It takes effect when the value of the |
| enable_obproxy_rpc_service | No | true | Specifies whether to enable the RPC service of ODP. The default value true indicates to enable the RPC service. The value false indicates to disable the RPC service. When the value of this parameter is false, the rpc_listen_port parameter does not take effect.
Note
|
| home_path | Yes | None | The installation path of ODP. |
| rs_list | No | None | The OBServer node list of the OceanBase cluster, in the ip:mysql_port;ip:mysql_port format. If ODP is configured by using the RootService list, ODP can serve as a proxy only for the configured cluster.
NoticeYou need to only configure either |
| obproxy_config_server_url | No | None | The URL of obconfigserver. After this parameter is specified, ODP can serve as a proxy for all clusters registered with obconfigserver. If obconfigserver is not deployed and the ob-configserver dependency is not configured, you can also specify the rs_list parameter. |
| enable_cluster_checkout | No | true | Specifies whether to verify the cluster name. If you set the value to true, ODP sends the cluster name to the OBServer node for verification during logon. |
| cluster_name | No | None | The name of the OceanBase cluster for which ODP can serve as a proxy. If a dependency exists, obd obtains this value from the oceanbase-ce dependency. |
| client_session_id_version | No | 2 | Specifies whether to use the new logic for generating client session IDs. Valid values are 1 and 2. The value 2 specifies to use the new logic for generating client session IDs.
NoteYou can set the |
| proxy_id | No | 0 | The ID of ODP. It ensures that client session IDs generated by different ODP nodes do not conflict. The value range of proxy_id varies based on the value of client_session_id_version.
NoteYou can set the |
| enable_strict_kernel_release | Yes | false | Specifies whether to verify the kernel of the operating system. The value true indicates that ODP supports only RedHat 5u, 6u, and 7u. The value false indicates that the Linux kernel version is not verified. In this case, ODP may be unstable. |
| obproxy_sys_password | No |
|
The password of the ODP administrator account (root@proxysys). If you do not specify this parameter in obd V2.1.0 or later, a random string is automatically generated. After deployment, you can run the obd cluster edit-config command to view the password in the configuration file. |
| observer_sys_password | No | If ODP and OceanBase Database are deployed at a time, the default value of this parameter is the same as that of the proxyro_password parameter. If ODP is deployed separately, the default value of this parameter is either of the following based on the version of obd:
|
The password of the account (proxyro@sys) used by ODP to connect to the OceanBase cluster. This password must be the same as the value of proxyro_password configured in OceanBase Database. Otherwise, you cannot connect to the OceanBase cluster by using ODP. |
This section takes the obagent-only-example.yaml configuration file in the example/obagent directory as an example to describe the key parameters for deploying 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
The following table describes the key parameters. For more information about the parameters, see plugins/obagent/1.3.0/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | The servers. Specify each server in the format of - name: server identifier(line break)ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the format of - <ip> (line break)- <ip>. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address.
Notice |
| home_path | Yes | None | The working directory of OBAgent. |
| monagent_http_port | Yes | 8088 | The port for the monitoring service of OBAgent. |
| mgragent_http_port | Yes | 8089 | The port for the management service of OBAgent. |
| log_path | Yes | log/monagent.log | The log path. |
| mgragent_log_level | No | None | The log level for the management service of OBAgent. |
| mgragent_log_max_size | No | 30 | The log file size for the management service of OBAgent, in MB. |
| mgragent_log_max_days | No | 30 | The maximum number of days that the log files of the management service of OBAgent can be retained. |
| mgragent_log_max_backups | No | 15 | The maximum number of backups allowed for the log files of the management service of OBAgent. |
| monagent_log_level | No | info | The log level for the monitoring service of OBAgent. |
| monagent_log_max_size | No | 200 | The log file size for the monitoring service of OBAgent, in MB. |
| monagent_log_max_days | No | 30 | The maximum number of days that the log files of the monitoring service of OBAgent can be retained. |
| monagent_log_max_backups | No | 15 | The maximum number of backups allowed for the log files of the monitoring service of OBAgent. |
| http_basic_auth_user | Yes | admin | The username for HTTP service authentication. |
| http_basic_auth_password | No | Random string | The password for HTTP service authentication. It must contain at least one character, and can contain digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Supported special characters are ~^*{}[]_-+. If no password is specified, obd automatically generates a random password. After deployment, you can run the obd cluster edit-config command to view the password in the configuration file. |
| monitor_user | No | ocp_monitor | The username for collecting monitoring data of OceanBase Database. After you specify this parameter, a user with the same username is created in the sys tenant of OceanBase Database. If OBAgent and OceanBase Database are deployed at a time and the oceanbase-ce dependency is configured, the value of the ocp_agent_monitor_username parameter is preferentially used. |
| monitor_password | No | Empty | The password for collecting monitoring data of OceanBase Database. If OBAgent and OceanBase Database are deployed at a time and the oceanbase-ce dependency is configured, the value of the ocp_agent_monitor_password parameter is preferentially used. |
| sql_port | No | 2881 | The SQL port of the OBServer node. The value must be the same as that of the mysql_port parameter in OceanBase Database. |
| rpc_port | No | 2882 | The RPC port of the OBServer node. The value must be the same as that of the rpc_port parameter in OceanBase Database. |
| cluster_name | No | obcluster | The name of the OceanBase cluster. The value must be the same as that of the appname parameter in the oceanbase-ce component. |
| cluster_id | No | 1 | The ID of the OceanBase cluster. The value must be the same as that of the cluster_id parameter in the oceanbase-ce component. |
| ob_log_path | No | None | The log disk path of the OBServer node. The value must be the same as that of the redo_dir parameter in the oceanbase-ce component. |
| ob_data_path | No | None | The data disk path of the OBServer node. The value must be the same as that of the data_dir parameter in the oceanbase-ce component. |
| ob_install_path | No | None | The installation directory of the OBServer node. The value must be the same as that of the home_path parameter in the oceanbase-ce component. |
| observer_log_path | No | None | The log path in the installation directory of the OBServer node. The value must be the same as that of the {home_path}/log parameter in the oceanbase-ce component. |
| ob_monitor_status | Yes | active | The metric collection status of OceanBase Database. The value active specifies to enable metric collection. The value inactive specifies to disable metric collection. |
| zone_name | No | zone1 | The name of the zone to which the OBServer node belongs. |
This section takes the ocp-express-only.yaml configuration file in the example/ocp-express directory as an example to describe the key parameters for deploying OCP Express. For more information about how to deploy OCP Express by using a configuration file, see Deploy OCP Express by using commands.
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
The following table describes the key parameters. For more information about the parameters, see plugins/ocp-express/4.1.0/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | The servers. Specify each server in the format of - name: server identifier(line break)ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the format of - <ip> (line break)- <ip>. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address. |
| home_path | Yes | None | The working directory of OCP Express. |
| log_dir | No | {home_path}/log | The log directory of OCP Express. The default value is the log directory in the path specified by the home_path parameter. |
| memory_size | Yes | None | The memory capacity of the OCP Express server. The recommended value is calculated as follows: memory_size = 512 MB + (Expected number of nodes × Expected number of tenants) × 60 MB.The sys tenant and OCP meta tenant must be included in this formula. |
| jdbc_url | No | None | The Java Database Connectivity (JDBC) connection string for connecting to the meta tenant. Make sure that the database specified in the connection string has been created. If OCP Express is deployed separately, this parameter is required. |
| jdbc_username | No | None | The name of the user for connecting to the meta tenant. Make sure that this user has been created. If OCP Express is deployed separately, this parameter is required.
Note: |
| jdbc_password | Yes | None | The password of the user for connecting to the meta tenant. |
| port | Yes | 8180 | The HTTP port for accessing OCP Express. |
| cluster_name | No | obcluster | The name of the OceanBase cluster, which must be the same as the value of the appname parameter in the oceanbase-ce component. If OCP Express is deployed separately, this parameter is required. |
| ob_cluster_id | No | None | The ID of the OceanBase cluster, which must be the same as the value of the cluster_id parameter in the oceanbase-ce component. If OCP Express is deployed separately, this parameter is required. |
| root_sys_password | No | None | The password of the root@sys user in the OceanBase cluster. If OCP Express is deployed separately, this parameter is required. |
| agent_username | Yes | None | The username of OBAgent. |
| agent_password | Yes | None | The password of OBAgent. |
| logging_file_total_size_cap | Yes | 1GB | The total size of log files.
Notice: |
| server_addresses->address | Yes | None | The IP address of the OBServer node. |
| server_addresses->svrPort | Yes | None | The RPC port of the OBServer node, which must be the same as the value of the rpc_port parameter of the corresponding node in the oceanbase-ce component. |
| server_addresses->sqlPort | Yes | None | The MySQL port of the OBServer node, which must be the same as the value of the mysql_port parameter of the corresponding node in the oceanbase-ce component. |
| server_addresses->agentMgrPort | Yes | None | The port for the management process of OBAgent, which must be modified based on the actual settings in OBAgent. |
| server_addresses->agentMonPort | Yes | None | The port for the monitoring process of OBAgent, which must be modified based on the actual settings in OBAgent. |
This section takes the ob-configserver-only-example.yaml configuration file in the example/ob-configserver directory as an example to describe the key parameters for deploying obconfigserver. For more information about how to deploy obconfigserver by using a configuration file, see Deploy and use 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"
The following table describes the parameters. For more information, see plugins/ob-configserver/1.0.0/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | The servers. Specify each server in the format of - name: server identifier(line break)ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the format of - <ip> (line break)- <ip>. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address. |
| listen_port | Yes | 8080 | The listening port of obconfigserver. |
| server_ip | Yes | 0.0.0.0 | The server IP address to listen to. You can specify an allowlist of server IP addresses as needed. |
| home_path | Yes | None | The working directory of obconfigserver. |
| log_level | Yes | info | The log level of obconfigserver. Valid log levels include DEBUG, INFO, WARN, ERROR, and FATAL. |
| log_maxsize | Yes | 30 | The maximum log size of obconfigserver, in MB. |
| log_maxage | Yes | 7 | The maximum retention period for expired log files of obconfigserver, in days. |
| log_maxbackups | Yes | 10 | The maximum number of expired log files of obconfigserver that can be retained. |
| log_localtime | Yes | true | Specifies whether to name log files based on the local time. |
| log_compress | Yes | true | Specifies whether to enable cyclic log expression. |
| vip_address | No | None | The virtual IP address (VIP). You need to specify this parameter only when a VIP is used. |
| vip_port | No | None | The port number of the VIP. You need to specify this parameter only when a VIP is used. |
| database_type | Yes | sqlite3 | The database type of the MetaDB. Valid values are mysql and sqlite3. When the value is mysql, you can select MySQL Database or OceanBase Database as the MetaDB of obconfigserver. |
| connection_url | No | $home_path/.data.db?cache=shared&_fk=1 | The URL for connecting to the MetaDB. If the value of database_type is mysql, this parameter is required. If the value of database_type is sqlite3 and you do not specify this parameter, the default value is used. If you want to specify this parameter, make sure that the specified value is an absolute path. |
This section takes the oblogproxy-only-example.yaml configuration file in the example/oblogproxy directory as an example to describe the key parameters for deploying oblogproxy. For more information about how to deploy oblogproxy by using a configuration file, see Deploy oblogproxy by using the CLI.
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
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| version | No | Latest version | The version of the component to deploy. Generally, you do not need to specify this parameter. The latest version is deployed by default. |
| servers | Yes | None | The servers. Specify each server in the format of - name: server identifier(line break)ip: server IP address. You can also specify the server in the - <ip> format. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address. |
| home_path | Yes | None | The installation path of oblogproxy. |
| service_port | Yes | 2983 | The listening port of oblogproxy. |
| ob_sys_username | No | Empty | The username used for communication between oblogproxy and OceanBase Database. You must create the user in the sys tenant before the deployment. You do not need to include the cluster name or tenant name in the username. |
| ob_sys_password | No | Empty | The password of the user specified by the ob_sys_username parameter. The password must be consistent with that of the corresponding user of the OceanBase Database. |
| binlog_dir | No | $home_path/run | The absolute path of the binlog service. |
| binlog_mode | No | true | Specifies whether to enable the binlog service. |
Take note of the following considerations:
When you deploy oblogproxy by using obd, the
binlog_dirparameter in the configuration file of obd is equivalent to thebinlog_log_bin_basenameparameter in the configuration file of oblogproxy.When you deploy oblogproxy by using obd, the default value of the
binlog_modeparameter istrue.When you deploy oblogproxy by using obd, you must specify the
ob_sys_usernameandob_sys_passwordparameters in plaintext.
This section takes the prometheus-only-example.yaml configuration file in the example/prometheus directory as an example to describe the key parameters for deploying Prometheus. For more information about how to configure Prometheus by using a configuration file, see Add GUI-based monitoring for an existing cluster.
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
The following table describes the key parameters. For more information about the parameters, see plugins/prometheus/2.37.1/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | The servers. Specify each server in the format of - name: server identifier(line break)ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the format of - <ip> (line break)- <ip>. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address. |
| home_path | Yes | None | The working directory of Prometheus. |
| address | Yes | 0.0.0.0 | The listening address of Prometheus. |
| port | Yes | 9090 | The listening port of Prometheus. |
| enable_lifecycle | Yes | true | Specifies whether to enable the feature of disabling and reloading by using HTTP requests. |
| data_dir | No | None | The data directory. |
| basic_auth_users | No | None | The web service authentication information of Prometheus. The key is the username and the value is the password. |
| web_config | No | None | The web service configurations of Prometheus. You can specify the certificate and key files used by the server to authenticate the client. |
| config | No | None | The configurations of Prometheus, in the same format as the Prometheus configuration file. The value corresponds to the value of the config.file parameter. |
| additional_parameters | No | None | The startup parameters of Prometheus. |
This section takes the grafana-only-example.yaml configuration file in the example/grafana directory as an example to describe the key parameters for deploying Grafana. For more information about how to deploy Grafana by using a configuration file, see Add GUI-based monitoring for an existing cluster.
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
The following table describes the key parameters. For more information about the parameters, see plugins/grafana/7.5.17/parameter.yaml on GitHub.
| Parameter | Required? | Default value | Description |
|---|---|---|---|
| servers | Yes | None | The servers. Specify each server in the format of - name: server identifier(line break)ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the format of - <ip> (line break)- <ip>. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address. |
| home_path | Yes | None | The working directory of Grafana. |
| login_password | Yes |
|
The password for logging on to Grafana. After deployment, you can run the obd cluster edit-config command to view the password in the configuration file. |
| data_dir | No | $home_path/data | The directory where Grafana stores sqlite3 data, temporary files, and session files. |
| logs_dir | No | $data_dir/log | The directory where Grafana stores logs. |
| plugins_dir | No | $data_dir/plugins | The directory that Grafana automatically scans to search for plug-ins. |
| provisioning_dir | No | $home_path/conf/provisioning | The path to the configuration files that are applied when Grafana is started and running. |
| temp_data_lifetime | No | 24h | The retention period for temporary images in the data directory of Grafana. Supported units are h (hours) and m (minutes). The value 0 indicates that temporary files are not cleaned up. |
| log_max_days | No | 7 | The maximum retention period for log files. Expired log files are deleted. |
This section takes the ocp-only-example.yaml configuration file in the example/ocp-server directory as an example to describe the key parameters for deploying OCP. We recommend that you deploy OCP by using the GUI of obd. For more information, see Deploy OCP through the GUI.
ocp-server-ce:
servers:
- 10.10.10.1
global:
home_path: /home/admin/ocp
memory_size: 8G
port: 8080
soft_dir: /home/admin/software # Directory used to store packages
log_dir: /home/admin/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/ocp_meta # 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
The following table describes the parameters. For more information, see OCP parameters.
Note
Redeployment clears the data of the cluster. If you want to change the Effective mode of modification to Redeployment, you must back up the data in advance.
If you separately deploy OCP by using the
ocp-only-example.yamlconfiguration file, the tenant information is populated on the GUI based on an existing tenant. If you create an OceanBase database as the MetaDB for OCP by using thedistributed-with-obproxy-and-ocp-example.yamlconfiguration file, obd creates a tenant based on the tenant information in the configuration file after OCP is deployed.
| Parameter | Required? | Default value | Effective mode of modification | Description |
|---|---|---|---|---|
| servers | Yes | None | Redeployment | The servers. Specify each server in the format of - name: server identifier(line break)ip: server IP address. Each server identifier must be unique. If the server IP addresses are unique, you can also specify the servers in the format of - <ip> (line break)- <ip>. In this case, - <ip> is equivalent to - name: server IP address (line break) ip: server IP address. |
| home_path | Yes | None | Redeployment | The working directory of OCP. |
| memory_size | No | 2G | Process restart | The size of memory for the ocp-server process. |
| port | Yes | 8080 | Process restart | The listening port of OCP. |
| soft_dir | No | ~/ocp-server/lib | Redeployment | The directory of OCP where software packages of components such as ODP and OBAgent are stored. |
| log_dir | No | $home_path/log | Redeployment | The directory of OCP where logs are stored. |
| admin_password | Yes | aaAA11__ | Process restart | The password of the administrator account of OCP. |
| jdbc_url | No | None | Process restart | The JDBC connection string of OCP MetaDB. |
| jdbc_username | No | None | Process restart | The logon username of OCP MetaDB, in the format of user_name@tenant_name. When OCP is deployed separately, this parameter must be set to root@sys.
NoteWhen OCP is deployed separately, this parameter is required. |
| jdbc_password | No | None | Process restart | The logon password of OCP MetaDB. |
| ocp_site_url | No | None | Process restart | The web URL of OCP for external access. The URL must start with http or https and not end with a slash (/). The URL consists of a VIP, a domain name, and a port number. By default, if this parameter is not configured, the OCP URL is generated based on the server IP address (specified by servers) and port number (specified by port) configured in the configuration file. |
| ocp_meta_tenant | Yes | tenant_name: meta_tenantmax_cpu: 1memory_size: 2147483648 | Redeployment | The information about the OCP meta tenant.
|
| ocp_meta_username | No | meta | Process restart | The username for connecting to the OCP meta tenant. |
| ocp_meta_password | Yes | oceanbase | Process restart | The password corresponding to the username specified by ocp_meta_username. |
| ocp_meta_db | No | meta_database | Redeployment | The database name of OCP MetaDB. |
| ocp_monitor_tenant | Yes | tenant_name: monitor_tenantmax_cpu: 1memory_size: 2147483648 | Redeployment | The information about the OCP monitor tenant.
|
| ocp_monitor_username | No | monitor_user | Process restart | The username for connecting to the OCP monitor tenant. |
| ocp_monitor_password | Yes | oceanbase | Process restart | The password corresponding to the username specified by ocp_monitor_username. |
| ocp_monitor_db | No | monitor_database | Redeployment | The database name of OCP MonitorDB. |