用obd命令联系安装OCP Express时根据官方文档场景三来配置的https://www.oceanbase.com/docs/community-obd-cn-1000000000634917#MetaDB%20%E8%B5%84%E6%BA%90
最后deploy时报错
[ERROR] OBD-1009: server1(10.195.88.84) ocp-express need config: [‘ocp_meta_tenant’]
配置文件如下:
#Only need to configure when remote login is required
user:
username: oceanbase
password: Qaz123456
#key_file: /home/admin/.ssh/id_rsa
#port: your ssh port, default 22
#timeout: ssh connection timeout (second), default 30
obagent:
servers:
#Please don’t use hostname, only IP can be supported
- 10.195.88.84
global:
#The working directory for obagent. obagent is started under this directory. This is a required field.
home_path: /home/oceanbase/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 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: Qaz123456
#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: obtetst
#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: /oradata/oceanbase/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: /oradata/oceanbase/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/oceanbase/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/oceanbase/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
10.195.88.84:
#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
10.10.10.2:
#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
10.10.10.3:
#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
ocp-express:
depends:
- obagent
servers:
- name: server1
ip: 10.195.88.84
global:
# The working directory for ocp-express. ocp-express is started under this directory. This is a required field.
home_path: /home/oceanbase/ocp-server
log_dir: /oradata/oceanbase/ocp-server/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://10.195.88.84:2881/ocpdatabase # jdbc connection string to connect to the meta db
jdbc_username: ocpuser@meta_db # username to connect to meta db
jdbc_password: ‘Qaz123456’ # 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: QPIODUJD
logging_file_total_size_cap: 10GB # The total log file size of ocp-express server
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