This topic describes how to deploy seekdb on a single server by using obd.
Prerequisites
Before you start, make sure that you meet the following conditions:
The server where you want to deploy the database meets the requirements described in Prepare the server and has been configured as described in Prepare for deployment.
You have installed obd V4.3.0 or later, and the server where obd is installed can access the server where you want to deploy the database by using SSH. For more information, see Install obd. We recommend that you install the latest version.
Notice
If you plan to deploy the database on an obd node, we recommend that you configure password-free SSH login for the server.
The obd image library contains the installation packages of the components required for deployment (seekdb and seekdb-libs), and the versions of the components are V1.2.0 or later.
If the server where obd is installed can access the Internet, the required components will be automatically downloaded from the remote image library. If the server where obd is installed cannot access the Internet, you can download the installation package of the components from the OceanBase Download Center and execute the
obd mirror clonecommand to upload the installation package to the local image library of obd. After the installation package is uploaded, you can execute theobd mirror list localcommand to view the installation packages in the local image library.
Procedure
Notice
The following steps are performed in the CentOS 7.9 x86 architecture. The steps may vary in other environments.
Execute the obd seekdb install command to start the interactive deployment process. In the interactive installation process, configure the following parameters.
Select the installation mode
Currently, three installation modes are supported: Standalone (single-node mode), Primary (primary instance mode), and Standby (standby instance mode).
Standalone modePrimary instance modeStandby instance modeBy default, the standalone mode is used to deploy seekdb if no options are specified.
obd seekdb installAfter the command is executed, configure the following parameters for the seekdb instance:
#Set the deployment name, which must be unique. Instance name [myseekdb]: #Enter the IP address of the machine where seekdb is to be installed. The default value is the IP address of the local machine. Server IP [10.10.10.1]: #Select the user for deployment. The default value is the current user. Username [admin]: #Set the SSH port. The default value is 22. SSH port [22]: #Enter the password of the user for deployment. The default value is empty. #This parameter is displayed only in non-local deployment. If you have configured password-free login, you can directly press Enter to skip this parameter. Password (default empty): #Set the installation directory of seekdb. The user specified for deployment must have read and write permissions on the directory. Seekdb installation directory [/home/admin/myseekdb]: #Set the directory for storing data such as SSTables. The user specified for deployment must have read and write permissions on the directory. Data directory (data_dir, optional) [/data/1]: #Set the directory for storing logs. The user specified for deployment must have read and write permissions on the directory. Redo log directory (redo_dir, optional) [/data/log1]: #Set the SQL port of seekdb. MySQL port [2881]: #Set the OBShell port of seekdb. OBShell port [2886]: #Specify whether to enable the automatic startup of the Seekdb service when the system boots up. The default value is no. #This parameter is displayed only in non-container environments. If you enable the automatic startup, make sure that the deployment user has sudo privileges. Otherwise, the deployment will fail. Do you want to enable the SEEK_DB_PLACEHOLDER_e6110f5f070a454dbf790bce2bff984d service to start automatically when the system boots up? (y/yes or n/no) [no]:You can specify the
--primaryoption to deploy seekdb in the primary instance mode. When you deploy in the primary instance mode, you must configure the RPC port and enable the RPC feature to allow the standby instance to synchronize information.obd seekdb install --primaryAfter the command is executed, configure the following parameters for the seekdb instance:
#Set the deployment name, which must be unique. Instance name [myseekdb_primary]: #Enter the IP address of the machine where seekdb is to be installed. The default value is the IP address of the local machine. Server IP [10.10.10.1]: #Select the user for deployment. The default value is the current user. Username [admin]: #Set the SSH port. The default value is 22. SSH port [22]: #Enter the password of the user for deployment. The default value is empty. #This parameter is displayed only in non-local deployment. If you have configured password-free login, you can directly press Enter to skip this parameter. Password (default empty): #Set the installation directory of seekdb. The user specified for deployment must have read and write permissions on the directory. Seekdb installation directory [/home/admin/myseekdb_primary]: #Set the directory for storing data such as SSTables. The user specified for deployment must have read and write permissions on the directory. Data directory (data_dir, optional) [/data/1]: #Set the directory for storing logs. The user specified for deployment must have read and write permissions on the directory. Redo log directory (redo_dir, optional) [/data/log1]: #Set the SQL port of seekdb. MySQL port [2881]: #Set the RPC port of seekdb. RPC port [2882]: #Set the OBShell port of seekdb. OBShell port [2886]: #Specify whether to enable the automatic startup of the Seekdb service when the system boots up. The default value is no. #This parameter is displayed only in non-container environments. If you enable the automatic startup, make sure that the deployment user has sudo privileges. Otherwise, the deployment will fail. Do you want to enable the SEEK_DB_PLACEHOLDER_9755b1609a8743bbab80b55b63cc159d service to start automatically when the system boots up? (y/yes or n/no) [no]:You can use the
--standbyoption to deploy the instance in standby mode. When deploying in standby mode, you must configure the information of the primary instance, that is, the instance with the identifier seekdb.obd seekdb install --standbyAfter you execute the preceding command, configure the information of the instance with the identifier seekdb as described in the following example:
# Set the deployment name. The deployment name must be unique. Instance name [myseekdb_standby]: # Select the primary instance with the identifier seekdb. If multiple instances with the identifier seekdb exist, you can use the up and down arrow keys to select one. ┌────────────────────────────┐ │ Select primary cluster │ ├────────────────────────────┤ │ ▸ myseekdb_primary │ └────────────────────────────┘ ↑↓ move Enter confirm q quit Connect to primary (10.10.10.1:2881) ok # If the RPC feature is not enabled for the selected primary instance, a warning message is displayed, and an optional solution is provided. [WARN] Primary enable_rpc_service is not enabled. # You can use the up and down arrow keys to select Modify primary instance configuration and restart (Restart now) to modify the primary instance configuration and restart it, or Exit to exit the deployment process without modifying the configuration. ┌─────────────────────────────────────────────────────────────────────────┐ │ Choose action │ ├─────────────────────────────────────────────────────────────────────────┤ │ ▸ Restart now (enable in config, then stop and start primary cluster) │ │ ○ Exit (exit without changing config) │ └─────────────────────────────────────────────────────────────────────────┘ ↑↓ move Enter confirm q quit # To restart the primary instance, you must enter y. Otherwise, the preceding selection is repeated. # Restarting the primary instance may affect the running business. Proceed with caution. Restarting the primary instance may affect the running business. Do you want to restart it? (y/yes or n/no) [no]: # Enter the IP address of the server where you want to install the instance with the identifier seekdb. By default, the IP address of the current server is used. Server IP [10.10.10.1]: # Select the user for deployment. By default, the current user is used. Username [admin]: # Set the SSH port. By default, the port is 22. SSH port [22]: # Enter the password of the user for deployment. By default, the password is empty. # This field is displayed only when the instance is deployed on a server other than the local server. If you have configured password-free login, you can press Enter to skip this step. Password (default empty): # Set the installation directory of the instance with the identifier seekdb. Make sure that the configured user has read and write permissions for the directory. Seekdb installation directory [/home/admin/myseekdb_standby]: # Set the directory for storing data such as SSTables. Make sure that the configured user has read and write permissions for the directory. Data directory (data_dir, optional) [/data/1]: # Set the directory for storing logs. Make sure that the configured user has read and write permissions for the directory. Redo log directory (redo_dir, optional) [/data/log1]: # Set the SQL port of the instance with the identifier seekdb. MySQL port [2881]: # Set the RPC port of the instance with the identifier seekdb. RPC port [2882]: # Set the OBShell port of the instance with the identifier seekdb. OBShell port [2886]: # Specify whether to enable the automatic startup feature. By default, this feature is disabled. # This field is displayed only when the instance is deployed on a server other than the local server. If you want to enable the automatic startup feature, make sure that the deployment user has the sudo permission. Otherwise, an error is returned. Do you want to enable the Seekdb service to start automatically when the system boots up? (y/yes or n/no) [no]:Select the deployment mode.
┌───────────────────────┐ │ Select mode │ ├───────────────────────┤ │ ○ Dev (development) │ │ ▸ Prod (production) ││ └───────────────────────┘ ↑↓ move Enter confirm q quitIf you select
Devmode, the system directly outputs the configuration information. After you confirm the configuration information, the deployment starts. This mode uses fewer resources. If you selectProdmode, you must set the maximum memory value of the instance with the identifier seekdb and select a memory strategy.# Set the maximum memory value for seekdb. obd will generate a value range and default value based on the resources of the seekdb node. SeekDB Max Memory (Configurable Range[5, 31], unit: G) [28]: # Use the up and down arrow keys to select the memory strategy. ┌──────────────────────────────────────────────────────────┐ │ Memory strategy │ ├──────────────────────────────────────────────────────────┤ │ ▸ Balanced (Reduce memory usage when possible) │ │ ○ Performance (Use more memory to enhance performance) │ └──────────────────────────────────────────────────────────┘ ↑↓ move Enter confirm q quitConfirm the configuration
After completing the above configuration, the program will display the configuration you just set. You need to confirm whether these configurations are correct. Here is an example:
--- Config summary --- 1. IP = 10.10.10.1 2. User = admin 3. ssh_port = 22 4. home_path = /home/admin/myseekdb_primary 5. data_dir = /data/1 6. redo_dir = /data/log1 7. mysql_port = 2881 8. rpc_port = 2882 9. obshell_port = 2886 10. memory_limit = 15G 11. memory_hard_limit = 28G 12. datafile_size = 147G 13. max_syslog_file_count = 1024 14. log_disk_size = 46G 15. auto_start = False Confirm config? (y/yes or n/no to modify) [yes]:Note
- In the primary instance deployment mode, if the
memory_limitvalue is less than 6 GB, the following warning will be displayed:memory_limit is below 6G. For a primary cluster this is small; standby sync may be slow. Consider 6G or more if you plan heavy replication.. - When creating a standby instance, the
log_disk_sizeof the corresponding primary instance must be at least three times the value ofmax(primary memory_limit, standby memory_limit). If it is less than this value, obd will automatically update thelog_disk_sizeof the primary instance.
You need to enter
yornat the confirmation prompt: If you entery, the program will start deploying seekdb based on the configuration; if you entern, you need to select the configuration to modify and set a new value. After setting the new value, all configurations will be displayed again for your confirmation. Here is an example, selecting to modify theredo_dirconfiguration:┌───────────────────────────┐ │ Select item to edit │ ├───────────────────────────┤ │ ○ IP │ │ ○ User │ │ ○ ssh_port │ │ ○ home_path │ │ ○ data_dir │ │ ▸ redo_dir │ │ ○ mysql_port │ │ ○ rpc_port │ │ ○ obshell_port │ │ ○ memory_limit │ │ ○ memory_hard_limit │ │ ○ datafile_maxsize │ │ ○ max_syslog_file_count │ │ ○ log_disk_size │ │ ○ auto_start │ └───────────────────────────┘ ↑↓ move Enter confirm q back # Set a new value for redo_log. New value (current: /data/log1) [/data/log1]: /data/log2 Updated redo_dir = /data/log2- In the primary instance deployment mode, if the
Deployment successful
After the deployment of seekdb is successful, the program will display the deployment status of the instance and the corresponding connection string. The specific information is as follows:
Start seekdb ok seekdb program health check ok Connect to seekdb 10.10.10.1:2881 ok obshell start ok obshell program health check ok obshell bootstrap ok Check RPC TLS status ok Connect to seekdb 10.10.10.1:2881 ok Wait for seekdb init ok +--------------------------------+ | seekdb | +---------------+---------+------+ | ip | version | port | +---------------+---------+------+ | 10.10.10.1 | 1.2.0.0 | 2881 | +---------------+---------+------+ obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A myseekdb_primary running
Step 1: Modify the configuration file
OBProxy provides example files. If OBProxy is installed by direct download, you can view the configuration file of OBProxy in the /usr/obd/example/seekdb directory, such as seekdb.
If obd is installed by decompressing the All-in-One installation package, you can view the example configuration files in the ~/.oceanbase-all-in-one/obd/usr/obd/example directory.
Description
A complete deployment example of seekdb is provided at the end of this topic in Sample configuration file. You can directly copy and modify it.
You need to modify the parameters in the configuration files based on your environment.
Create a configuration file
vim myseekdb.yamlConfigure user information
## 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 30The
usernameis the login username for the target machine where seekdb is installed. Ensure that the user has the appropriate read and write permissions for the following directory. Thepasswordandkey_fileare both used for user authentication. Typically, only one of them needs to be filled in.Warning
After you configure the key path, if your key does not require a password, comment out or delete the
passwordparameter to prevent it from being considered as the key password for login, which can cause verification failure.Configure the IP address, port, and related directories of seekdb, and configure the memory-related parameters and root user password.
seekdb: servers: - 10.10.10.1 global: home_path: /home/admin/myseekdb data_dir: /data/1 redo_dir: /data/log1 mysql_port: 2881 rpc_port: 2882 obshell_port: 2886 memory_limit: 12G memory_hard_limit: 20G datafile_size: 100G datafile_maxsize: 300G cpu_count: 8 max_syslog_file_count: 1024 log_disk_size: 30G enable_auto_start: false production_mode: false root_password: ******** enable_rpc_service: true log_disk_utilization_threshold: 80For more information about the parameters in the configuration file, see Parameter Description in Configuration File Description. In addition, keep the following points in mind:
If the password is not specified in the configuration file, OBOD generates a random password automatically. After the deployment succeeds, you can run the
obd cluster edit-configcommand to view the corresponding parameter in the configuration file to obtain the password.Setting
enable_auto_starttotrueenables the observer process to start automatically at boot. This feature requires the deployment user to have sudo privileges and the deployment environment to be non-container based.
Step 2: Deploy an instance of seekdb
Note
For more information about the commands in this topic, see seekdb Commands.
Deploy the instance of seekdb.
[admin@test001 ~]$ obd seekdb deploy myseekdb -c myseekdb.yamlThe example uses a deployment name of
myseekdband a configuration file name ofmyseekdb.yamlas placeholders. You can customize the deployment name and specify the required configuration file based on your specific needs.This command checks if the directory in the configuration file is empty. If not, it will report an error. If you are sure that all content in the directory can be deleted, you can add the
-foption to forcibly empty the directory.Start the seekdb instance
[admin@test001 ~]$ obd seekdb start myseekdbAfter the instance is started, the deployment status and corresponding connection strings are output, specifically as follows:
Wait for seekdb init ok +--------------------------------+ | seekdb | +---------------+---------+------+ | ip | version | port | +---------------+---------+------+ | 10.10.10.1 | 1.2.0.0 | 2881 | +---------------+---------+------+ obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A myseekdb running
Verify deployment results
Go to the list of the seekdb instances.
Execute the
obd seekdb listcommand to view the instance list of the seekdb cluster. The output shows a running instance namedmyseekdb_primaryof the seekdb type.+--------------------------------------------------------------------------------+ | SeekDB Cluster List | +------------------+-------------------------------------------+-----------------+ | Name | Configuration Path | Status (Cached) | +------------------+-------------------------------------------+-----------------+ | myseekdb_primary | /home/admin/.obd/cluster/myseekdb_primary | running | +------------------+-------------------------------------------+-----------------+View the status of the seekdb instance.
[admin@test001 ~]$ obd seekdb display myseekdb_primaryOutput is as follows:
Get local repositories and plugins ok Open ssh connection ok Connect to seekdb 10.10.10.1:2881 ok Wait for seekdb init ok +--------------------------------+ | seekdb | +---------------+---------+------+ | ip | version | port | +---------------+---------+------+ | 10.10.10.1 | 1.2.0.0 | 2881 | +---------------+---------+------+ obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -AConnect to the instance of seekdb
You can copy the connection string displayed in
obd seekdb displayto connect to the instance of seekdb.obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -AThe output is as follows, indicating that the root user has successfully logged in to the instance named seekdb.
Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221489761 Server version: OceanBase 4.3.5.3 seekdb (r1.2.0.0) (Built 200000212026032314-50f34cacb66d188d8fb030696f4c2e987d1648c3 Mar 23 2026) Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. obclient(root@(none))[oceanbase]>
Related operations
You can run the following commands to manage the seekdb instance deployed by using obd. For more information, see seekdb commands.
View the list of seekdb instances.
obd seekdb listView the status of the seekdb instance named
myseekdb.obd seekdb display myseekdbModify the parameters of the seekdb instance.
obd supports the
obd clustercommand group to manage seekdb instances. You can run the following command to open the configuration file and modify the seekdb instance configuration.obd cluster edit-config myseekdbAfter you modify the configuration and save the changes, obd will inform you how to make the changes take effect. You can copy the command output by obd. The output after you save the changes is as follows:
Search param plugin and load ok Search param plugin and load ok Parameter check ok Save deploy "myseekdb" configuration Use `obd cluster reload myseekdb` to make changes take effect.You can copy and run the
obd cluster reload myseekdbcommand in the output to make the changes take effect.Stop the seekdb instance named
myseekdb.obd seekdb stop myseekdbDestroy the seekdb instance named
myseekdb.obd seekdb destroy myseekdb
Sample configuration file
user:
username: admin
#password: ********
key_file: /home/admin/.ssh/id_rsa
seekdb:
servers:
- 10.10.10.1
global:
home_path: /home/admin/myseekdb
data_dir: /data/1
redo_dir: /data/log1
mysql_port: 2881
rpc_port: 2882
obshell_port: 2886
memory_limit: 12G
memory_hard_limit: 20G
datafile_size: 100G
datafile_maxsize: 300G
cpu_count: 8
max_syslog_file_count: 1024
log_disk_size: 30G
enable_auto_start: false
production_mode: false
root_password: ********
enable_rpc_service: true
log_disk_utilization_threshold: 80
