Modify the configuration file

2023-08-22 02:46:05  Updated

Before you install OceanBase Cloud Platform (OCP) Community Edition, you must modify the configuration file.

Prerequisites

  • The ocp-4.0.0-ce.tar.gz software package is obtained. For more information, see Prepare for the installation.
  • The address in the file cannot be 127.0.0.1, localhost, or a host name.
  • If the central control server is accessible from both public and private IP addresses, we recommended that you configure a private IP address to increase the file transmission speed.
  • You have applied for and bound a virtual IP address (VIP) if it is needed.

Procedure

  1. Upload the ocp-4.0.0-ce.tar.gz package to any directory of the central control server and decompress it. The package contains the following files:

    • ocp_installer.sh: the OCP installation script.
    • ocp.tar.gz: the OCP image file.
    • ocp-installer.tar.gz: the OCP installer image file.
    • config.yaml: the OCP configuration file.
  2. Modify the config.yaml file. You need to modify the following configurations in the configuration file based on your actual deployment environment:

    • MetaDB configurations
    • Secure Shell (SSH) authentication configurations
    • OCP configurations
    • Other configurations
    
    # # In a precheck, the resources and environment of the host are checked to make sure that the central control server meets the deployment requirements. We do not recommend that you skip the precheck. However, if the host resources are limited or you deploy OCP for a test, you can skip the precheck.
    precheck_ignore: false
    
    # MetaDB configurations.
    # If you set the create_metadb_cluster parameter to true, a separate OceanBase cluster is created as the OCP MetaDB.
    create_metadb_cluster: false
    
    # You can use the clean_metadb_cluster parameter to specify whether to delete the OCP MetaDB when OCP is uninstalled. If this parameter is not specified, the system makes the decision based on the value of the create_metadb_cluster parameter.
    clean_metadb_cluster: false
    
    # Configurations of the OCP MetaDB
    ob_cluster:
        name: obcluster
        home_path: /home/admin/oceanbase
        root_password: '******'
        # The data storage directory. We recommend that you set a dedicated data storage directory.
        data_path: /data/1
        # The directory of clogs, ilogs, and slogs. We recommend that you set a dedicated log directory.
        redo_path: /data/log1
        sql_port: 2881
        rpc_port: 2882
        # All zones of the OCP MetaDB.
        zones:
            # The zone name.
          - name: zone1
            # All servers in the zone.
            servers:
              - xxx.xxx.xxx.xxx
         ## Other custom parameters for deploying OceanBase clusters, the following is a list of commonly used parameters. If you need to add other parameters, you can add the corresponding `key` `value` configuration
          # custom_config:
          #   - key: devname
          #     value: eth0
          #   - key: cpu_count
          #     value: 0
          #   - key: memory_limit
          #     value: 0G
          #   - key: system_memory
          #     value: 30G
          #   - key: __min_full_resource_pool_memory
          #     value: 5368709120
          #   - key: datafile_maxsize
          #     value: 0
          #   - key: datafile_next
          #     value: 0
        # Configurations of the OCP MetaDB tenant and user.
        meta:
            # The tenant name.
            tenant: meta_tenant
            # The username.
            user: meta_user
            # The user password.
            password: ******
            # The name of the OCP MetaDB.
            database: meta_database
            # CPU cores of the tenant.
            cpu: 2
            # The memory size of the tenant, in GB.
            memory: 4
    
        # Configurations of the tenant and user of the monitor database.
        monitor:
            # The tenant name.
            tenant: monitor_tenant
            # The username.
            user: monitor_user
            # The user password.
            password: ******
            # The name of the monitor database.
            database: monitor_database
            # CPU cores of the tenant.
            cpu: 4
            # The memory size of the tenant, in GB.
            memory: 8
    
    # OBProxy configurations.
    obproxy:
        # The installation path of the OBProxy.
        home_path: /home/admin/obproxy
        # The listening port of the OBProxy.
        port: 2883
        # The IP address of the server on which the OBProxy is deployed.
        servers:
          - xxx.xxx.xxx.xxx
        # The VIP. If multiple OBProxies are deployed, a VIP is required for load balancing. In this case, if you do not specify a VIP, the IP address of an OBProxy is used.
        # vip:
        #   address: xxx.xxx.xxx.xxx
        #   port: 2883
    
    ## SSH authentication configurations
    ssh:
        port: 22
        user: root
        # The authentication method. Valid values: password and key.
        auth_method: password
        timeout: 10
        password: ******
    
    # The OCP configurations.
    ocp:
        # The name of the OCP container.
        name: 'ocp'
    
        # The port number and log path of the OCP process.
        process:
            # The listening port of the OCP process.
            port: 8080
            # The path of the OCP log files on the central control server.
            log_dir: /tmp/ocp/log
        # The IP address of the host where OCP is deployed.
        servers:
          - xxx.xxx.xxx.xxx
        # Limits on resources for the OCP container.
        resource:
            cpu: 4
            # The maximum memory available, in GB.
            memory: 8
        # The VIP of OCP. If you do not specify this parameter, the IP address of an OCP host is used.
        # vip:
        #   address: xxx.xxx.xxx.xxx
        #   port: 8080
        # OCP authentication configurations, which are used for OCP upgrade.
        auth:
            user: admin
            password: ******
        options:
            # enable front-end tracking, non-business sensitive data such as system information, user behavior, and front-end anomalies will be collected to improve the product experience and stability
            enable_web_tracking: true
        # Configurations of the OCP MetaDB. If you specify to create a separate MetaDB by setting the create_metadb_cluster parameter to true, the following configurations are used.
        metadb:
            host: xxx.xxx.xxx.xxx
            port: 2883
            meta_user: meta_user@meta_tenant#obcluster
            meta_password: ******
            meta_database: meta_database
            monitor_user: monitor_user@monitor_tenant#obcluster
            monitor_password: ******
            monitor_database: monitor_database
    

Contact Us