OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Migration Service

V4.2.13Community Edition

  • OMS Documentation
  • What's New
  • OMS Community Edition Introduction
    • What is OMS Community Edition?
    • Terms
    • OMS Community Edition HA
    • Architecture
      • Overview
      • Hierarchical functional system
      • Basic components
    • Limitations
  • Quick Start
    • Data migration process
    • Data synchronization process
  • Deploy OMS Community Edition
    • Deployment modes
    • System and network requirements
    • Memory and disk requirements
    • Prepare the environment
    • Deploy by using Docker
      • Single-node deployment
      • Single-region multi-node deployment
      • Multi-region multi-node deployment
      • Scale out
      • Check the deployment
      • Deploy a time-series database (Optional)
    • Deploy by using k8s
      • Single-node deployment
      • Single-region multi-node deployment
      • Multi-region multi-node deployment
      • Scale out
    • Integrate the OIDC protocol into OMS Community Edition to implement SSO
  • OMS Community Edition console
    • Log in to the console of OMS Community Edition
    • Overview
    • User center
      • Configure user information
      • Change your logon password
      • Log off
  • Data migration
    • Overview
    • Migrate data from a MySQL database to OceanBase Database Community Edition
    • Migrate data from HBase to OBKV
    • Migrate incremental data from OBKV to HBase
    • Migrate data from a Milvus database to OceanBase Database Community Edition
    • Migrate data from a Redis database to an OBKV-Redis database
    • Migrate data between tenants of OceanBase Database Community Edition
    • Migrate data in active-active disaster recovery scenarios
    • Migrate data from a TiDB database to OceanBase Database Community Edition
    • Migrate data from a PostgreSQL database to OceanBase Database Community Edition
    • Migrate data from Hive to OceanBase Database Community Edition
    • Migrate data from an ElasticSearch database to OceanBase Database Community Edition
    • Migrate data from OceanBase Database Community Edition to an ElasticSearch database
    • Migrate data from a MongoDB database to OceanBase Database Community Edition
    • Migrate data from a StarRocks database to OceanBase Database Community Edition
    • Migrate data from a Qdrant database to OceanBase Database Community Edition
    • Migrate data from a Doris database to OceanBase Database Community Edition
    • Migrate data from a ClickHouse database to OceanBase Database Community Edition
    • Manage data migration tasks
      • View details of a data migration task
      • Change the name of a data migration task
      • View and modify migration objects
      • Manage computing platforms
      • Use tags to manage data migration tasks
      • Perform batch operations on data migration tasks
      • Download and import settings of migration objects
      • Start and pause a data migration task
      • Release and delete a data migration task
    • Features
      • DML filtering
      • DDL synchronization
      • Configure matching rules for migration objects
      • Wildcard rules
      • Rename a database table
      • Use SQL conditions to filter data
      • Create and update a heartbeat table
      • Schema migration mechanisms
      • Schema migration operations
      • Set an incremental synchronization timestamp
      • Direct load
    • Supported DDL operations in incremental migration and limits
      • DDL synchronization from MySQL database to OceanBase Community Edition
        • Overview of DDL synchronization from a MySQL database to a MySQL-compatible tenant of OceanBase Database
        • CREATE TABLE
          • Create a table
          • Create a column
          • Create an index or a constraint
          • Create partitions
        • Data type conversion
        • ALTER TABLE
          • Modify a table
          • Operations on columns
          • Operations on constraints and indexes
          • Operations on partitions
        • TRUNCATE TABLE
        • RENAME TABLE
        • DROP TABLE
        • CREATE INDEX
        • DROP INDEX
        • DDL incompatibilities between MySQL database and OceanBase Community Edition
          • Overview
          • Incompatibilities of the CREATE TABLE statement
            • Incompatibilities of CREATE TABLE
            • Column types that are supported to create indexes or constraints
          • Incompatibilities of the ALTER TABLE statement
            • Incompatibilities of ALTER TABLE
            • Change the type of a constrained column
            • Change the type of an unconstrained column
            • Change the length of a constrained column
            • Change the length of an unconstrained column
            • Delete a constrained column
          • Incompatibilities of DROP INDEX operations
      • Supported DDL operations in incremental migration between MySQL-compatible tenants of OceanBase Database
      • Synchronize DDL operations from a PostgreSQL database to OceanBase Database
  • Data synchronization
    • Data synchronization overview
    • Create a task to synchronize data from OceanBase Database Community Edition to a Kafka instance
    • Create a task to synchronize data from OceanBase Database Community Edition to a RocketMQ instance
    • Manage data synchronization tasks
      • View details of a data synchronization task
      • Change the name of a data synchronization task
      • View and modify synchronization objects
      • Use tags to manage data synchronization tasks
      • Perform batch operations on data synchronization tasks
      • Download and import the settings of synchronization objects
      • Start and pause a data synchronization task
      • Release and delete a data synchronization task
    • Features
      • DML filtering
      • DDL synchronization
      • Configure matching rules for synchronization objects
      • Rename a topic
      • Use SQL conditions to filter data
      • Column filtering
      • Data format description
  • Create and manage data sources
    • Create data sources
      • Create an OceanBase-CE data source
      • Create a MySQL data source
      • Create a TiDB data source
      • Create a Kafka data source
      • Create a RocketMQ data source
      • Create a PostgreSQL data source
      • Create an HBase data source
      • Create a Qdrant data source
      • Create a Milvus data source
      • Create a Redis data source
      • Create a Hive data source
      • Create an ElasticSearch data source
      • Create a MongoDB data source
      • Create a StarRocks data source
      • Create a Doris data source
      • Create a ClickHouse data source
    • Manage data sources
      • View data source information
      • Copy a data source
      • Edit a data source
      • Delete a data source
      • Cache system views
    • Create a database user
    • User privileges
    • Enable binlogs for the MySQL database
  • OPS & Monitoring
    • O&M overview
    • Go to the overview page
    • Server
      • View server information
      • Update the quota
      • View server logs
      • Delete a server
    • Components
      • Store
        • Create a Store component
        • View details of a Store component
        • Update the configurations of a Store component
        • Start and pause a Store component
        • Delete a Store component
      • Incr-Sync
        • View details of an Incr-Sync component
        • Start and pause an Incr-Sync component
        • Migrate an Incr-Sync component
        • Update the configurations of an Incr-Sync component
        • Batch O&M
        • Delete an Incr-Sync component
      • Full-Import
        • View details of a Full-Import component
        • Pause a Full-Import component
        • Rerun and resume a Full-Import component
        • Update the configurations of a Full-Import component
        • Delete a Full-Import component
      • Full-Verification
        • View details of a Full-Verification component
        • Pause a Full-Verification component
        • Rerun and resume a Full-Verification component
        • Update the configurations of a Full-Verification component
        • Delete a Full-Verification component
      • Component parameters
        • Coordinator
        • Condition
        • Source Plugin
          • Overview
          • StoreSource
          • DataFlowSource
          • LogProxySource
          • KafkaSource (TiDB)
          • HBaseSource
          • HiveSource
          • ElasticSearchSource
          • MongoDBSource
        • Sink Plugin
          • Overview
          • JDBC-Sink
          • KafkaSink
          • DatahubSink
          • RocketMQSink
          • HBaseSink
          • HiveSink
        • Store parameters
          • Parameters of a MySQL store
          • Parameters of an OceanBase store
          • ElasticSearch Store
          • MongoDB Store
        • Parameters of the CM component
        • Parameters of the Supervisor component
        • Parameters of the Full-Verification component
    • O&M Task
      • View O&M tasks
      • Skip a task or subtask
      • Retry a task or subtask
  • System management
    • Permission Management
      • Overview
      • Manage users
      • Manage departments
    • Alert center
      • View task alerts
      • View system alerts
      • Manage alert settings
    • Associate with OCP clusters
    • System parameters
      • Modify system parameters
      • Modify HA configurations
    • SSO management
      • Overview
      • Create an SSO integration
      • Enable or disable an SSO integration
      • Edit an SSO integration
      • Delete an SSO integration
  • OMS Community Edition O&M
    • Manage OMS services
    • OMS logs
    • Component O&M
      • O&M operations for the Supervisor component
      • CLI-based O&M for the Connector component
      • O&M operations for the Store component
    • Component tuning
      • Full/Incremental data migration performance optimization
    • Set throttling
  • Reference Guide
    • API Reference
      • Overview
      • CreateProject
      • StartProject
      • StopProject
      • ResumeProject
      • ReleaseProject
      • DeleteProject
      • ListProjects
      • DescribeProject
      • DescribeProjectSteps
      • DescribeProjectStepMetric
      • DescribeProjectProgress
      • DescribeProjectComponents
      • ListProjectFullVerifyResult
      • StartProjectsByLabel
      • StopProjectsByLabel
      • CreateMysqlDataSource
      • CreateMySQLMasterSlaveDataSource
      • CreateOceanBaseDataSource
      • CreateKafkaDataSource
      • ListDataSource
      • DeleteDataSource
      • CreateLabel
      • ListAllLabels
      • ListFullVerifyInconsistenciesResult
      • ListFullVerifyCorrectionsResult
      • UpdateStore
      • UpdateFullImport
      • UpdateIncrSync
      • UpdateFullVerification
      • UploadFile
      • SubmitPreCheck
      • GetPreCheckResult
      • RetryPreCheck
    • OMS error codes
    • Alert Reference
      • oms_host_down
      • oms_host_down_migrate_resource
      • oms_host_threshold
      • oms_migration_failed
      • oms_migration_delay
      • oms_sync_failed
      • oms_sync_status_inconsistent
      • oms_sync_delay
    • Telemetry parameters
    • Create a trigger
  • Upgrade Guide
    • Overview
    • Single-node upgrade
    • Multi-node upgrade
    • Hot upgrade of OMS Community Edition
    • Upgrade the CDC library
    • FAQ
  • FAQ
    • General O&M
      • How do I modify the resource quotas of an OMS container?
      • Clear files in the Store component
      • How do I troubleshoot the OMS server down issue?
      • Deploy InfluxDB for OMS
      • Increase the disk space of the OMS host
    • Task diagnostics
      • What do I do when a store does not have data of the timestamp requested by the downstream?
      • What do I do when OceanBase Store failed to access an OceanBase cluster through RPC?
    • OPS & monitoring
      • What are the alert rules?
    • Data synchronization
      • FAQ about synchronization to a message queue
        • What are the strategies for ensuring the message order in incremental data synchronization to Kafka
      • Performance troubleshooting and tuning for data synchronization from OceanBase Community Edition to Kafka
    • Data migration
      • Full migration
        • How do I query the ID of a checker?
        • How do I query log files of the Checker component of OMS?
        • How do I query the verification result files of the Checker component of OMS?
        • Garbled characters in the Latin1 character set
        • What do I do if the target table does not exist?
        • What can I do when the full migration failed due to LOB fields?
        • What do I do if garbled characters cannot be written into OceanBase Database V3.1.2?
      • Incremental synchronization
        • How do I skip DDL statements?
        • How do I update allowlists and blocklists?
        • What are the application scope and limits of ETL?
    • Logon and password
      • What do I do if my logon password is locked?
    • Installation and deployment
      • How do I upgrade Store?
      • What do I do when the "Failed to fetch" error is reported?
      • Change port numbers for components
      • Switching between the primary and standby OMS MetaDBs

Download PDF

OMS Documentation What's New What is OMS Community Edition? Terms OMS Community Edition HA Overview Hierarchical functional system Basic components Limitations Data migration process Data synchronization process Deployment modes System and network requirements Memory and disk requirements Prepare the environment Single-node deployment Single-region multi-node deployment Multi-region multi-node deployment Scale out Check the deployment Deploy a time-series database (Optional) Single-node deployment Single-region multi-node deployment Multi-region multi-node deployment Scale out Integrate the OIDC protocol into OMS Community Edition to implement SSO Log in to the console of OMS Community Edition Overview Configure user information Change your logon password Log off Overview Migrate data from a MySQL database to OceanBase Database Community Edition Migrate data from HBase to OBKV Migrate incremental data from OBKV to HBase Migrate data from a Milvus database to OceanBase Database Community Edition Migrate data from a Redis database to an OBKV-Redis database Migrate data between tenants of OceanBase Database Community Edition Migrate data in active-active disaster recovery scenarios Migrate data from a TiDB database to OceanBase Database Community Edition Migrate data from a PostgreSQL database to OceanBase Database Community Edition Migrate data from Hive to OceanBase Database Community Edition Migrate data from an ElasticSearch database to OceanBase Database Community Edition Migrate data from OceanBase Database Community Edition to an ElasticSearch database Migrate data from a MongoDB database to OceanBase Database Community Edition Migrate data from a StarRocks database to OceanBase Database Community Edition Migrate data from a Qdrant database to OceanBase Database Community Edition Migrate data from a Doris database to OceanBase Database Community Edition Migrate data from a ClickHouse database to OceanBase Database Community Edition View details of a data migration task Change the name of a data migration task View and modify migration objects Manage computing platforms Use tags to manage data migration tasks Perform batch operations on data migration tasks Download and import settings of migration objects Start and pause a data migration task Release and delete a data migration task DML filtering DDL synchronization Configure matching rules for migration objects Wildcard rules Rename a database table Use SQL conditions to filter data Create and update a heartbeat table Schema migration mechanisms Schema migration operations Set an incremental synchronization timestamp Direct load Supported DDL operations in incremental migration between MySQL-compatible tenants of OceanBase Database Synchronize DDL operations from a PostgreSQL database to OceanBase Database Data synchronization overview Create a task to synchronize data from OceanBase Database Community Edition to a Kafka instance Create a task to synchronize data from OceanBase Database Community Edition to a RocketMQ instance View details of a data synchronization task Change the name of a data synchronization task View and modify synchronization objects Use tags to manage data synchronization tasks Perform batch operations on data synchronization tasks Download and import the settings of synchronization objects Start and pause a data synchronization task Release and delete a data synchronization task DML filtering DDL synchronization Configure matching rules for synchronization objects Rename a topic Use SQL conditions to filter data Column filtering Data format description Create an OceanBase-CE data source Create a MySQL data source Create a TiDB data source Create a Kafka data source Create a RocketMQ data source Create a PostgreSQL data source Create an HBase data source Create a Qdrant data source Create a Milvus data source Create a Redis data source Create a Hive data source
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Migration Service
  3. V4.2.13
iconOceanBase Migration Service
V 4.2.13Community Edition
Enterprise Edition
  • V 4.3.2
  • V 4.3.1
  • V 4.3.0
  • V 4.2.5
  • V 4.2.4
  • V 4.2.3
  • V 4.0.2
  • V 3.4.0
Community Edition
  • V 4.2.13
  • V 4.2.12
  • V 4.2.11
  • V 4.2.10
  • V 4.2.9
  • V 4.2.8
  • V 4.2.7
  • V 4.2.6
  • V 4.2.5
  • V 4.2.4
  • V 4.2.3
  • V 4.2.1
  • V 4.2.0
  • V 4.0.0
  • V 3.3.1

Scale out

Last Updated:2026-04-16 07:09:24  Updated
share
What is on this page
Scale out a single node to multiple nodes
Scale out a single region to multiple regions

folded

share

This topic describes how to scale out a single region and a single node.

Scale out a single node to multiple nodes

When you scale out a single node to multiple nodes, the configuration files differ from those for a single-node deployment. This topic uses the example of scaling out a single node to two nodes.

  • cm_nodes needs to be scaled out from one node to two nodes.

    "cm_nodes":
        - "oms-0.oms-service.omsregion-1.svc"
        - "oms-1.oms-service.omsregion-1.svc" # The new node
    
  • The value of the replicas parameter changes from 1 to 2.

    apiVersion: apps/v1
    kind: StatefulSet
    metadata:
    name: oms
    namespace: oms
    labels:
        app: oms
    spec:
    replicas: 2  # The value changes from 1 to 2.
    

The steps to scale out a single node to multiple nodes are as follows:

  1. Enter the k8s environment and prepare the configuration file.

    The following is an example of the configuration file for scaling out a single node to multiple nodes. Replace the parameters with their actual values as needed.

    apiVersion: v1
    kind: Namespace
    metadata:
    name: omsregion-1
    ---
    apiVersion: v1
    kind: ConfigMap
    metadata:
    name: oms-config
    namespace: omsregion-1
    data:
    config.yaml: |
        "apsara_audit_enable": "false"
        "apsara_audit_sls_access_key": ""
        "apsara_audit_sls_access_secret": ""
        "apsara_audit_sls_endpoint": ""
        "apsara_audit_sls_ops_site_topic": ""
        "apsara_audit_sls_user_site_topic": ""
        "cm_is_default": !!bool "true"
        "cm_location": "0"
        # The node address in the format of ${pod_name}.${service_name}.${namespace_name}.svc.
        # The pod name is the name in kind: StatefulSet plus -ID, where the ID starts from 0. For example, in a single-node deployment, if replicas is 1, the pod name is oms-0.
        # The service name is the name in the first kind: Service.
        # The namespace name is the name in kind: Namespace.
        "cm_nodes":
        - "oms-0.oms-service.omsregion-1.svc"
        - "oms-1.oms-service.omsregion-1.svc"
        "cm_region": "hangzhou"
        "cm_region_cn": "Hangzhou"
        "cm_server_port": "8088"
        # The format is http://${service_name}.${namespace_name}.svc:8088.
        "cm_url": "http://oms-service.omsregion-1.svc:8088"
        "drc_cm_db": "cm_db_name"
        "drc_cm_heartbeat_db": "cm_hb_name"
        "drc_rm_db": "rm_db_name"
        "ghana_server_port": "8090"
        "init_db": "true"
        "nginx_server_port": "8089"
        "oms_meta_host": "xxx.xxx.xxx.1"
        "oms_meta_password": "oms_meta_password"
        "oms_meta_port": "2881"
        "oms_meta_user": "xxx@tenant_name"
        "sshd_server_port": "2023"
        "supervisor_server_port": "9000"
        "tsdb_enabled": "true"
        "tsdb_password": "tsdb_password"
        "tsdb_service": "INFLUXDB"
        "tsdb_url": "xxx.xxx.xxx.2:8086"
        "tsdb_username": "tsdb_username"
    ---
    apiVersion: v1
    kind: Service
    metadata:
    name: oms-service
    namespace: omsregion-1
    spec:
    clusterIP: None
    selector:
        app: oms
    ---
    apiVersion: v1
    kind: Service
    metadata:
    name: oms-service-nodeport
    namespace: omsregion-1
    spec:
    type: NodePort
    selector:
        app: oms
    ports:
        - name: nginx
        protocol: TCP
        port: 8089
        targetPort: 8089
        - name: ghana
        protocol: TCP
        port: 8090
        targetPort: 8090
        - name: cm
        protocol: TCP
        port: 8088
        targetPort: 8088
        - name: sshd
        protocol: TCP
        port: 2023
        targetPort: 2023
    ---
    apiVersion: apps/v1
    kind: StatefulSet
    metadata:
    name: oms
    namespace: omsregion-1
    labels:
        app: oms
    spec:
    replicas: 2
    serviceName: "oms-service"
    selector:
        matchLabels:
        app: oms
    template:
        metadata:
        labels:
            app: oms
        spec:
        initContainers:
        - name: copy-config
            image: busybox:1.35
            command: ['sh', '-c', 'cp /config-ro/config.yaml /work/config.yaml']
            volumeMounts:
            - name: config-volume
            mountPath: /config-ro
            readOnly: true
            - name: writable-config
            mountPath: /work
        containers:
        - name: oms
            image: ${OMS_IMAGE}
            env:
            - name: POD_NAME
            valueFrom:
                fieldRef:
                fieldPath: metadata.name
            - name: OMS_HOST_IP
            # The value of POD_NAME is the name of the current Pod, which remains unchanged. oms-service.omsregion-1 should be modified based on the actual ${service_name} and ${namespace_name}.
            value: $(POD_NAME).oms-service.omsregion-1.svc
            - name: HOST_DOCKER_VERSION
            value: "20.10.7"
            ports:
            - containerPort: 8088
            - containerPort: 8089
            - containerPort: 8090
            - containerPort: 9000
            - containerPort: 2023
            volumeMounts:
            - name: writable-config
            mountPath: /home/admin/conf/config.yaml
            subPath: config.yaml
            - name: logs-volume
            mountPath: /home/admin/logs
            - name: store-volume
            mountPath: /home/ds/store
            - name: run-volume
            mountPath: /home/ds/run
        volumes:
        - name: config-volume
            configMap:
            name: oms-config
        - name: writable-config
            emptyDir: {}
    # The disk capacity configuration. You can increase the sizes of the following three mounted disks as needed.
    # We recommend that you set the size of logs-volume to at least 200 GiB.
    # We recommend that you set the size of store-volume to at least 500 GiB. The store-volume stores incremental data, so we recommend that you set a larger size for it.
    # We recommend that you set the size of run-volume to at least 300 GiB.
    volumeClaimTemplates:
    - metadata:
        name: logs-volume
        spec:
        accessModes: [ "ReadWriteOnce" ]
        storageClassName: "local-path"
        resources:
            requests:
            storage: 200Gi
    - metadata:
        name: store-volume
        spec:
        accessModes: [ "ReadWriteOnce" ]
        storageClassName: "local-path"
        resources:
            requests:
            storage: 500Gi
    - metadata:
        name: run-volume
        spec:
        accessModes: [ "ReadWriteOnce" ]
        storageClassName: "local-path"
        resources:
            requests:
            storage: 300Gi
    
  2. Install OMS Community Edition.

    For example, if the configuration file is named oms-k8s-statefulset.yaml, the installation command is as follows.

    kubectl apply -f oms-k8s-statefulset.yaml
    

Scale out a single region to multiple regions

When you scale out a single region to multiple regions, you need to create a configuration file for the new region (you can copy the configuration file of the original region and modify it). The main modifications to the new region's configuration file are as follows:

  • The namespace name of the new region in k8s is different from that of the original region. For example, if the original region is named omsregion-1, the new region can be named omsregion-2.

    In addition, all instances of omsregion-1 in the original region's configuration file need to be replaced with omsregion-2.

  • The cm_is_default parameter in the new region's configuration file needs to be set to false.

    "cm_is_default": !!bool "false"
    
  • The ID value of the cm_location parameter in the new region's configuration file needs to be one more than the ID of the existing region. For example, if the ID of the original region is 0, the ID of the new region is 1.

    "cm_location": "1"
    

The following example shows how to scale out the Hangzhou region to the Hangzhou and Beijing regions.

  1. Enter the k8s environment and create a configuration file for the new region, Beijing.

    The following example shows the configuration file for scaling out a single region to multiple regions. Please replace the parameters with their actual values as needed.

    • Original Hangzhou region configuration file

      apiVersion: v1
      kind: Namespace
      metadata:
      name: omsregion-1
      ---
      apiVersion: v1
      kind: ConfigMap
      metadata:
      name: oms-config
      namespace: omsregion-1
      data:
      config.yaml: |
          "apsara_audit_enable": "false"
          "apsara_audit_sls_access_key": ""
          "apsara_audit_sls_access_secret": ""
          "apsara_audit_sls_endpoint": ""
          "apsara_audit_sls_ops_site_topic": ""
          "apsara_audit_sls_user_site_topic": ""
          "cm_is_default": !!bool "true"
          # The region code. Each region has a unique number.
          "cm_location": "0"
          # The node address, in the format of ${pod_name}.${service_name}.${namespace_name}.svc.
          # pod_name is the name in kind: StatefulSet plus -ID, where the ID starts from 0. For example, if replicas is 2 in a multi-node deployment, pod_name is oms-0 and oms-1.
          # service_name is the name in the first kind: Service.
          # namespace_name is the name in kind: Namespace.
          "cm_nodes":
          - "oms-0.oms-service.omsregion-1.svc"
          - "oms-1.oms-service.omsregion-1.svc"
          "cm_region": "hangzhou"
          "cm_region_cn": "Hangzhou"
          "cm_server_port": "8088"
          # The format is http://${service_name}.${namespace_name}.svc:8088.
          "cm_url": "http://oms-service.omsregion-1.svc:8088"
          "drc_cm_db": "cm_db_name"
          "drc_cm_heartbeat_db": "cm_hb_name"
          "drc_rm_db": "rm_db_name"
          "ghana_server_port": "8090"
          "init_db": "true"
          "nginx_server_port": "8089"
          "oms_meta_host": "xxx.xxx.xxx.1"
          "oms_meta_password": "oms_meta_password"
          "oms_meta_port": "2881"
          "oms_meta_user": "xxx@tenant_name"
          "sshd_server_port": "2023"
          "supervisor_server_port": "9000"
          "tsdb_enabled": "true"
          "tsdb_password": "tsdb_password"
          "tsdb_service": "INFLUXDB"
          "tsdb_url": "xxx.xxx.xxx.2:8086"
          "tsdb_username": "tsdb_username"
      ---
      apiVersion: v1
      kind: Service
      metadata:
      name: oms-service
      namespace: omsregion-1
      spec:
      clusterIP: None
      selector:
          app: oms
      ---
      apiVersion: v1
      kind: Service
      metadata:
      name: oms-service-nodeport
      namespace: omsregion-1
      spec:
      type: NodePort
      selector:
          app: oms
      ports:
          - name: nginx
          protocol: TCP
          port: 8089
          targetPort: 8089
          - name: ghana
          protocol: TCP
          port: 8090
          targetPort: 8090
          - name: cm
          protocol: TCP
          port: 8088
          targetPort: 8088
          - name: sshd
          protocol: TCP
          port: 2023
          targetPort: 2023
      ---
      apiVersion: apps/v1
      kind: StatefulSet
      metadata:
      name: oms
      namespace: omsregion-1
      labels:
          app: oms
      spec:
      replicas: 2
      serviceName: "oms-service"
      selector:
          matchLabels:
          app: oms
      template:
          metadata:
          labels:
              app: oms
          spec:
          # Add the node selector to specify the IDC where the OMS Community Edition is started.
          # Different regions require different labels on the nodes. For example, the Hangzhou region has zone=zone1.
          nodeSelector:
          zone: "zone1"
          initContainers:
          - name: copy-config
              image: busybox:1.35
              command: ['sh', '-c', 'cp /config-ro/config.yaml /work/config.yaml']
              volumeMounts:
              - name: config-volume
              mountPath: /config-ro
              readOnly: true
              - name: writable-config
              mountPath: /work
          containers:
          - name: oms
              image: ${OMS_IMAGE}
              env:
              - name: POD_NAME
              valueFrom:
                  fieldRef:
                  fieldPath: metadata.name
              - name: OMS_HOST_IP
              # POD_NAME indicates the name of the current Pod. Do not modify it. oms-service.omsregion-1 must be replaced with the actual ${service_name} and ${namespace_name}.
              value: $(POD_NAME).oms-service.omsregion-1.svc
              - name: HOST_DOCKER_VERSION
              value: "20.10.7"
              ports:
              - containerPort: 8088
              - containerPort: 8089
              - containerPort: 8090
              - containerPort: 9000
              - containerPort: 2023
              volumeMounts:
              - name: writable-config
              mountPath: /home/admin/conf/config.yaml
              subPath: config.yaml
              - name: logs-volume
              mountPath: /home/admin/logs
              - name: store-volume
              mountPath: /home/ds/store
              - name: run-volume
              mountPath: /home/ds/run
          volumes:
          - name: config-volume
              configMap:
              name: oms-config
          - name: writable-config
              emptyDir: {}
      # Disk capacity configuration. Adjust the sizes of the following three mount volumes as needed.
      # The minimum recommended size for logs-volume is 200 GiB.
      # The minimum recommended size for store-volume is 500 GiB. Store-volume stores incremental data, so we recommend that you increase the value.
      # The minimum recommended size for run-volume is 300 GiB.
      volumeClaimTemplates:
      - metadata:
          name: logs-volume
          spec:
          accessModes: [ "ReadWriteOnce" ]
          storageClassName: "local-path"
          resources:
              requests:
              storage: 200Gi
      - metadata:
          name: store-volume
          spec:
          accessModes: [ "ReadWriteOnce" ]
          storageClassName: "local-path"
          resources:
              requests:
              storage: 500Gi
      - metadata:
          name: run-volume
          spec:
          accessModes: [ "ReadWriteOnce" ]
          storageClassName: "local-path"
          resources:
              requests:
              storage: 300Gi
      
    • Beijing region configuration file

      apiVersion: v1
      kind: Namespace
      metadata:
      name: omsregion-2
      ---
      apiVersion: v1
      kind: ConfigMap
      metadata:
      name: oms-config
      namespace: omsregion-2
      data:
      config.yaml: |
          "apsara_audit_enable": "false"
          "apsara_audit_sls_access_key": ""
          "apsara_audit_sls_access_secret": ""
          "apsara_audit_sls_endpoint": ""
          "apsara_audit_sls_ops_site_topic": ""
          "apsara_audit_sls_user_site_topic": ""
          "cm_is_default": !!bool "false"
          # The region code. Each region has a unique number.
          "cm_location": "1"
          # The node address, in the format of ${pod_name}.${service_name}.${namespace_name}.svc.
          # pod_name is the name in kind: StatefulSet plus -ID, where the ID starts from 0. For example, if replicas is 2 in a multi-node deployment, pod_name is oms-0 and oms-1.
          # service_name is the name in the first kind: Service.
          # namespace_name is the name in kind: Namespace.
          "cm_nodes":
          - "oms-0.oms-service.omsregion-2.svc"
          - "oms-1.oms-service.omsregion-2.svc"
          "cm_region": "beijing"
          "cm_region_cn": "Beijing"
          "cm_server_port": "8088"
          # The format is http://${service_name}.${namespace_name}.svc:8088.
          "cm_url": "http://oms-service.omsregion-2.svc:8088"
          "drc_cm_db": "cm_db_name"
          "drc_cm_heartbeat_db": "cm_hb_name"
          "drc_rm_db": "rm_db_name"
          "ghana_server_port": "8090"
          "init_db": "true"
          "nginx_server_port": "8089"
          "oms_meta_host": "xxx.xxx.xxx.1"
          "oms_meta_password": "oms_meta_password"
          "oms_meta_port": "2881"
          "oms_meta_user": "xxx@tenant_name"
          "sshd_server_port": "2023"
          "supervisor_server_port": "9000"
          "tsdb_enabled": "true"
          "tsdb_password": "tsdb_password"
          "tsdb_service": "INFLUXDB"
          "tsdb_url": "xxx.xxx.xxx.2:8086"
          "tsdb_username": "tsdb_username"
      ---
      apiVersion: v1
      kind: Service
      metadata:
      name: oms-service
      namespace: omsregion-2
      spec:
      clusterIP: None
      selector:
          app: oms
      ---
      apiVersion: v1
      kind: Service
      metadata:
      name: oms-service-nodeport
      namespace: omsregion-2
      spec:
      type: NodePort
      selector:
          app: oms
      ports:
          - name: nginx
          protocol: TCP
          port: 8089
          targetPort: 8089
          - name: ghana
          protocol: TCP
          port: 8090
          targetPort: 8090
          - name: cm
          protocol: TCP
          port: 8088
          targetPort: 8088
          - name: sshd
          protocol: TCP
          port: 2023
          targetPort: 2023
      ---
      apiVersion: apps/v1
      kind: StatefulSet
      metadata:
      name: oms
      namespace: omsregion-2
      labels:
          app: oms
      spec:
      replicas: 2
      serviceName: "oms-service"
      selector:
          matchLabels:
          app: oms
      template:
          metadata:
          labels:
              app: oms
          spec:
          # Add the node selector to specify the IDC where the OMS Community Edition is started.
          # Different regions require different labels on the nodes. For example, the Beijing region has zone=zone2.
          nodeSelector:
          zone: "zone2"
          initContainers:
          - name: copy-config
              image: busybox:1.35
              command: ['sh', '-c', 'cp /config-ro/config.yaml /work/config.yaml']
              volumeMounts:
              - name: config-volume
              mountPath: /config-ro
              readOnly: true
              - name: writable-config
              mountPath: /work
          containers:
          - name: oms
              image: ${OMS_IMAGE}
              env:
              - name: POD_NAME
              valueFrom:
                  fieldRef:
                  fieldPath: metadata.name
              - name: OMS_HOST_IP
              value: $(POD_NAME).oms-service.omsregion-2.svc
              - name: HOST_DOCKER_VERSION
              value: "20.10.7"
              ports:
              - containerPort: 8088
              - containerPort: 8089
              - containerPort: 8090
              - containerPort: 9000
              - containerPort: 2023
              volumeMounts:
              - name: writable-config
              mountPath: /home/admin/conf/config.yaml
              subPath: config.yaml
              - name: logs-volume
              mountPath: /home/admin/logs
              - name: store-volume
              mountPath: /home/ds/store
              - name: run-volume
              mountPath: /home/ds/run
          volumes:
          - name: config-volume
              configMap:
              name: oms-config
          - name: writable-config
              emptyDir: {}
      # Disk capacity configuration. Adjust the sizes of the following three mount volumes as needed.
      # The minimum recommended size for logs-volume is 200 GiB.
      # The minimum recommended size for store-volume is 500 GiB. Store-volume stores incremental data, so we recommend that you increase the value.
      # The minimum recommended size for run-volume is 300 GiB.
      volumeClaimTemplates:
      - metadata:
          name: logs-volume
          spec:
          accessModes: [ "ReadWriteOnce" ]
          storageClassName: "local-path"
          resources:
              requests:
              storage: 200Gi
      - metadata:
          name: store-volume
          spec:
          accessModes: [ "ReadWriteOnce" ]
          storageClassName: "local-path"
          resources:
              requests:
              storage: 500Gi
      - metadata:
          name: run-volume
          spec:
          accessModes: [ "ReadWriteOnce" ]
          storageClassName: "local-path"
          resources:
              requests:
              storage: 300Gi
      
  2. Install the OMS Community Edition in the new region.

    For example, if the configuration file for the new region, Beijing, is named oms-k8s-statefulset-region-2, the installation command is as follows.

    kubectl apply -f oms-k8s-statefulset2.yaml
    

Previous topic

Multi-region multi-node deployment
Last

Next topic

Integrate the OIDC protocol into OMS Community Edition to implement SSO
Next
What is on this page
Scale out a single node to multiple nodes
Scale out a single region to multiple regions