This topic introduces how to deploy OceanBase Migration Service (OMS) by using the obd profile in the CentOS Linux 7.9 image based on the x86 architecture.
Description
Currently, OBD can only manage OMS Community Edition V4.2.11 and later versions.
Prerequisites
Before you begin, make sure that you meet the following prerequisites:
You have installed obd V4.0.0 or later. We recommend that you install the latest version. For more information, see Install obd.
The machine where the OMS is to be deployed meets the deployment requirements.
The Docker runtime environment is installed on the OMS server.
If you want OMS to collect and display monitoring data, you must deploy and configure a time series database. Currently, the only supported time series database is InfluxDB V1.8.
If you plan to deploy OMS separately, make sure to prepare a database to store metadata of the OMS Community Edition. The database can be MySQL or OceanBase Database, and it is recommended to use OceanBase Database Community Edition.
Remarks
To enhance system reliability, we recommend implementing a highly available database solution for MetaDB. This approach ensures stable 7x24 hours operation for OMS core services and minimizes the risk of business disruptions.
If OceanBase Database is deployed as MetaDB, make sure that the OBServer nodes support the AVX instruction set (only applicable to servers with the x86 architecture). You can run the
lscpu | grep Flags | grep avxcommand to check.Notes
When you use an x86-64 architecture server, the server does not need to support the AVX instruction set provided that the major version of OceanBase Database to be deployed is v2.2.21 or later.
- For V4.2.x versions, it is required to use V4.2.5.6 or later.
- For V4.3.x, V4.3.5.4 or later is required.
- For V4.4.x version, V4.4.1.0 or later must be provided.
If OceanBase Database is deployed on a server with an ARM architecture in an offline deployment scenario, check whether the underlying hardware of the OBServer nodes supports the LSE instruction set. You can run the
lscpu | grep Flags | grep atomicscommand to check whether the underlying hardware of the nodes support the LSE instruction set. If the underlying hardware does not support the LSE instruction set, you must download the OceanBase Database installation package that contains thenonlseparameter. Then, you can use theobd mirror clonecommand to upload the installation package to the local image library of obd.Remarks
OceanBase All in One does not contain OceanBase Database packages with the
nonlseoption.While deploying an OceanBase cluster as the MetaDB at the same time, ensure that the necessary component installation packages (such as OceanBase Database) are present in the obd image library.
If the server where you run
obdcan connect to the Internet, the community edition components will be automatically downloaded from the remote image repository. If it cannot, download all the installation packages from OceanBase Database Download Center and upload them to the local image repository ofobdby executing theobd mirror clonecommand. You can run theobd mirror list localcommand to view the installation packages in the local image repository.
Considerations
The HA feature is disabled by default in the OceanBase Migration Community Edition. To enable the HA feature, set the value of enable in the ha.config parameter to true in the OMS console after the service is deployed.
Procedure
Note
Operations guidance in this article are based on a CentOS Linux 7.9 image for an x86 architecture.
Step 1: Load the OMS Community Edition package.
Description
If you plan to deploy multiple OMS nodes, each node requires the following operations.
Obtain the OMS installation package.
You can download the OMS installation package from the OceanBase software download center. The OMS installation package is a file that starts with
omsand has the .tar.gz extension, for example,oms_4.2.11-ce.tar.gz.Load the downloaded OMS installation package into the local Docker repository.
[admin@test ~]$ sudo docker load -i oms_4.2.11-ce.tar.gzVerify that the load has been successful
[admin@test ~]$ sudo docker imagesThe output is as follows:
REPOSITORY TAG IMAGE ID CREATED SIZE reg.docker.alibaba-inc.com/oceanbase/oms-ce feature_4.2.11_ce 26f5f1554fc5 2 days ago 12.5GB
Step 2: Modify the configuration file
Create the configuration file
Run the following command to create a configuration file. The following example uses
oms-config.yaml. You can customize the file name.[admin@test ~]$ vim oms-config.yamlModify user information
The following sample code is provided for your reference. You can modify it according to your scenario.
## Only need to configure when remote login is required user: username: admin # password: your password if need key_file: /home/admin/.ssh/id_rsa # port: your ssh port, default 22 # timeout: ssh connection timeout (second), default 30usernameis the username of the user who logs into the target machine, and make sure your username has write permissions for the home directory.passwordandkey_fileare used for user verification, usually only one is required.Note
After the key path is specified, if your key does not contain a password, comment it out or delete the
passwordso that it is not considered a key password used for login, which could cause a verification error.Modify OceanBase Database configuration
You can copy the following sample and make necessary modifications based on your specific scenario.
oceanbase-ce: # version: 4.3.0.1 # release: 100000242024032211.el7 # package_hash: c4a03c83614f50c99ddb1c37dda858fa5d9b14b7 servers: - name: server1 ip: 10.10.10.1 - name: server2 ip: 10.10.10.2 - name: server3 ip: 10.10.10.3 global: appname: obcluster mysql_port: 2881 rpc_port: 2882 home_path: /home/admin/oceanbase data_dir: /home/admin/oceanbase/data redo_dir: /home/admin/oceanbase/redo obshell_port: 2886 scenario: htap cpu_count: 20 memory_limit: 64G system_memory: 30G log_disk_size: 192G datafile_size: 192GB datafile_maxsize: 32G enable_syslog_recycle: true enable_syslog_wf: false max_syslog_file_count: 4 root_password: ******** server1: zone: zone1 server2: zone: zone2 server3: zone: zone3For more information about the configuration items of OceanBase Database, see Configuration Item Description in Configuration file description.
Modify OMS configurations
You can copy the following contents and modify them based on your actual scenarios. For more information about the parameters, see Parameter Description in Configuration File Description.
oms: depends: - oceanbase-ce type: docker tag: feature_4.2.11_ce image_name: reg.docker.alibaba-inc.com/oceanbase/oms-ce servers: - name: server1 ip: 10.10.10.1 - name: server2 ip: 10.10.10.2 - name: server3 ip: 10.10.10.3 global: mount_path: /data/1/oms ghana_server_port: 8090 nginx_server_port: 8089 # tsdb_enabled: "true" # tsdb_password: "" # tsdb_service: "INFLUXDB" # tsdb_url: "10.10.10.1:8086" # tsdb_username: "admin" regions: - cm_location: 1 cm_is_default: true cm_region: hz cm_url: http://10.10.10.1:8088 cm_nodes: - 10.10.10.1 - 10.10.10.3 - cm_location: 2 cm_is_default: false cm_region: bj cm_url: http://10.10.10.2:8088 cm_nodes: - 10.10.10.2
Step 3: Deploy OMS
Deploy the OMS
[admin@test ~]$ obd cluster deploy oms -c oms-config.yamlIn the command,
omsis the name of the cluster, which you can customize according to your needs. After deployment is successful, the CLI will display the startup command, which is as follows:Open ssh connection ok install oceanbase-ce-4.4.1.0 for local ok +------------------------------------------------------------------------------------------------------+ | Packages | +--------------+-------------------+------------------------+------------------------------------------+ | Repository | Version/Tag | Release | Hash | +--------------+-------------------+------------------------+------------------------------------------+ | oms | feature_4.2.11_ce | - | 26f5f1554fc5 | | oceanbase-ce | 4.4.1.0 | 100000032025101610.el7 | 547ad7ed9d402424c6a41fc281a30f46bd836871 | +--------------+-------------------+------------------------+------------------------------------------+ Repository integrity check ok Load param plugin ok Open ssh connection ok Initializes observer work home ok Initializes oms mount path ok Parameter check ok Remote oceanbase-ce-4.4.1.0-100000032025101610.el7-547ad7ed9d402424c6a41fc281a30f46bd836871 repository install ok Remote oceanbase-ce-4.4.1.0-100000032025101610.el7-547ad7ed9d402424c6a41fc281a30f46bd836871 repository lib check ok oms deployed Please execute ` obd cluster start oms ` to start Trace ID: 0c9ae43e-bbbf-11f0-8e7f-00163e514885 If you want to view detailed obd logs, please run: obd display-trace 0c9ae43e-bbbf-11f0-8e7f-00163e514885Start the OMS
[admin@test ~]$ obd cluster start omsThe cluster information will be returned after the cluster is started. Sample output is as follows:
Wait for observer init ok +------------------------------------------------+ | oceanbase-ce | +--------------+---------+------+-------+--------+ | ip | version | port | zone | status | +--------------+---------+------+-------+--------+ | 10.10.10.1 | 4.4.1.0 | 2881 | zone1 | ACTIVE | | 10.10.10.2 | 4.4.1.0 | 2881 | zone2 | ACTIVE | | 10.10.10.3 | 4.4.1.0 | 2881 | zone3 | ACTIVE | +--------------+---------+------+-------+--------+ obclient -h10.10.10.1 -P2881 -uroot@sys -p'******' -Doceanbase -A cluster unique id: c121d9a7-cd68-567f-937a-6fcfaab80ef0-19a5dbbb699-00010404 +-----------------------------------------------------------+ | oms | +--------+-------------------+---------------+--------------+ | region | url | cm_is_default | nodes | +--------+-------------------+---------------+--------------+ | hz | 10.10.10.1:8089 | True | 10.10.10.1 | | bj | 10.10.10.2:8089 | False | 10.10.10.2 | +--------+-------------------+---------------+--------------+ obshell program health check ok display obshell dashboard ok +---------------------------------------------------------+ | obshell Dashboard | +--------------------------+------+--------------+--------+ | url | user | password | status | +--------------------------+------+--------------+--------+ | http://10.10.10.1:2886 | root | '******' | active | +--------------------------+------+--------------+--------+ oms running Trace ID: 7f71bf32-bbbf-11f0-b617-00163e514885 If you want to view detailed obd logs, please run: obd display-trace 7f71bf32-bbbf-11f0-b617-00163e514885
Related documents
After the deployment is successful, you can access the OMS console.
