obd has multiple levels of commands. You can use the -h or --help option at each level to view the help information of subcommands. Similarly, when an error occurs during the execution of subcommands at each level, you can use the -v or --verbose option to view the detailed execution process of the command.
The smallest unit for operating on a deployment configuration in obd is a deployment configuration. A deployment configuration is a yaml file that contains all the configuration information for the entire deployment, including server login information, component configuration information, and component server lists.
Before you use obd to start a deployment, you need to register the deployment configuration of the deployment to obd. You can use the obd seekdb deploy -c <config> command to import a deployment configuration.
obd seekdb install
Use this command to interactively deploy seekdb.
obd seekdb install [options]
The options are described in the following table. If no options are specified, the deployment will be performed in standalone mode.
Option Name |
Required? |
Data Type |
Default Value |
Description |
|---|---|---|---|---|
| --standby | No | bool | false | This option does not require a value. If specified in the command, it indicates that the deployment will be performed in standby mode for seekdb. |
| --primary | No | bool | false | This option does not require a value. If specified in the command, it indicates that the deployment will be performed in primary mode for seekdb. When deployed in primary mode, the RPC feature will be automatically enabled for data synchronization with the standby instance. |
obd seekdb deploy
Use this command to deploy seekdb based on the configuration in a YAML file. You can directly deploy it using the deploy name registered in obd, or you can provide the yaml configuration information for deployment.
obd seekdb deploy <deploy name> [options]
# example
obd seekdb deploy myseekdb -c myseekdb.yaml
The deploy name parameter specifies the deployment name, which can be considered an alias for the configuration file.
The options are described in the following table:
Option Name |
Required? |
Data Type |
Default Value |
Description |
|---|---|---|---|---|
| -c/--config | No | string | None | Specifies the path of the required YAML file. obd uses the specified YAML file for deployment and registers the deployment configuration in obd. If deploy name exists, it will override the configuration.If this option is not used, obd will look up the registered configuration information based on deploy name. |
| -f/--force | No | bool | false | This option does not require a value. If specified in the command, obd will forcibly clear the working directory. If the component requires an empty working directory and this option is not used, an error will be returned if the working directory is not empty. |
| -C/--clean | No | bool | false | This option does not require a value. If specified in the command, obd will determine whether the working directory (home_path) belongs to the current user. If it does, obd will clear the working directory. |
| -U/--ulp/ --unuselibrepo | No | bool | false | This option does not require a value. If specified in the command, obd will prohibit automatic handling of dependencies. If this option is not specified, obd will search for related lib images and install them when dependencies are missing. |
| -A/--act/--auto-create-tenant | No | bool | false | This option is not supported. The command will have no effect whether or not this option is specified. |
obd seekdb list
Use this command to display the status of all seekdb instances registered in obd.
obd seekdb list
The status of seekdb instances registered in obd can be one of the following:
configured: Indicates that the configuration file for the seekdb instance is included in obd, but the instance has not been deployed yet. In this case, you can execute theobd seekdb deploycommand to deploy the instance.deployed: Indicates that the seekdb instance has been deployed, but it has not been started yet. In this case, you can execute theobd seekdb startcommand to start the instance.running: Indicates that the seekdb instance is running.stopped: Indicates that some components of the seekdb instance have been stopped. In this case, you can execute theobd seekdb startcommand to start the instance.destroyed: Indicates that the seekdb instance has been destroyed.
obd seekdb display
You can run this command to view the status of the specified seekdb instance.
obd seekdb display <deploy name> [options]
# example
obd seekdb display myseekdb
The deploy name parameter specifies the deployment name, which can be considered an alias for the configuration file.
The following table describes the options.
Option |
Required |
Data Type |
Default Value |
Description |
|---|---|---|---|---|
| --epk/--encryption-passkey | No | string | Empty string | If an encryption key is set for obd, the password-related information in the output of the display command for the seekdb instance will be in an encrypted state. If you want to output the plaintext password, you can configure this option in the command to specify the key for verification. |
| -g/--graph | No | bool | false | This option does not require a value. If you configure this option in the command, the primary-standby instance topology diagram will be displayed. |
obd seekdb destroy
You can run this command to destroy the deployed seekdb instance. If the seekdb instance is running, the command will first attempt to execute stop, and then execute destroy if successful.
obd seekdb destroy <deploy name> [-f] [--confirm]
# example
obd seekdb destroy myseekdb -f
The deploy name parameter specifies the deployment name, which can be considered an alias for the configuration file.
The following table describes the options.
Option |
Required |
Data Type |
Default Value |
Description |
|---|---|---|---|---|
| -f/--force-kill | No | bool | false | This option does not require a value. If you configure this option in the command, obd will check whether any processes are running before executing the destroy command. If any processes are still running in the working directory, obd will directly stop the execution of the obd seekdb destroy command. If you configure this option in the command, obd will forcibly stop any running processes in the working directory and then execute the obd seekdb destroy command. |
| --confirm | No | bool | false | This option does not require a value. If you configure this option in the command, obd will prompt you to confirm whether to destroy the seekdb instance. |
| --igs/--ignore-standby | No | bool | false | If the seekdb instance has a standby instance, the obd seekdb destroy command will be forcibly executed. After the primary instance is destroyed, the standby instance will no longer be usable. |
obd seekdb restart
You can run this command to restart a running seekdb instance. By default, the restart is performed without parameters.
obd seekdb restart <deploy name>
# example
obd seekdb restart myseekdb --wp
The deploy name parameter specifies the deployment name, which can be considered an alias for the configuration file.
The following table describes the options.
Option |
Required |
Data Type |
Default Value |
Description |
|---|---|---|---|---|
| -s/--servers | No | string | Empty string | Specifies the list of machines to restart. You need to configure this option to the name value corresponding to servers in the yaml file. If the name value is not configured for servers, you can use the ip value. Separate multiple values with commas (,). |
| --wp/--with-parameter | No | bool | false | This option does not require a value. If you configure this option in the command, the configuration items that need to be restarted will take effect. |
obd seekdb start
You can run this command to start the instance of seekdb that has been deployed. If the command is successful, the status of the instance of seekdb is printed.
obd seekdb start <deploy name> [flags]
# example
obd seekdb start myseekdb -S
The deploy name parameter specifies the name of the deployed instance, which can be considered an alias for the configuration file.
The following table describes the options.
Option |
Required |
Data Type |
Default Value |
Description |
|---|---|---|---|---|
| -s/--servers | No | string | Empty string | The option specifies the list of servers to be started. The value must be the name value corresponding to servers in the yaml file. If the name value is not configured for servers, you can use the ip value. Separate multiple values with commas (,). If not all servers of the component are started, the start operation does not perform bootstrap. |
| --wop/--without-parameter | No | bool | false | This option does not require a value. If you specify this option, the deployed instance of seekdb is started without parameters. This option is not effective for the first start of a node. |
| -S/--strict-check | No | bool | false | Some components perform checks before they are started. If the check fails, obd issues an alert but does not stop the process. Specify this option in the command to enable the feature that exits the process immediately after a check fails. We recommend that you enable this option to avoid start failures caused by insufficient resources. |
obd seekdb stop
You can run this command to stop a running instance of seekdb.
obd seekdb stop <deploy name>
# example
obd seekdb stop myseekdb -s server1
The deploy name parameter specifies the name of the deployed instance, which can be considered an alias for the configuration file. If you want to stop only one node of the instance of seekdb, you can use the -s/--servers option to specify the list of servers to be stopped. The value must be the name value corresponding to servers in the yaml file. If the name value is not configured for servers, you can use the ip value. Separate multiple values with commas (,).
obd seekdb takeover
You can run this command to take over a non-obd-deployed instance of seekdb. For more information, see Take over a cluster in the Take over an instance of seekdb section.
obd seekdb takeover <deploy name> [options]
# example
obd seekdb takeover myseekdb -h 10.10.10.1 -P 2881 -p ****** --ssh-user=admin --ssh-password=*******
The deploy name parameter specifies the name of the instance after takeover. After the takeover is successful, obd manages the instance of seekdb by using the specified name.
The following table describes the options.
Option |
Required |
Data Type |
Default Value |
Description |
|---|---|---|---|---|
| -h/--host | Yes | string | 127.0.0.1 | The IP address for connecting to the instance of seekdb to be taken over. |
| -P/--mysql-port | Yes | int | 2881 | The port for connecting to the instance of seekdb to be taken over. |
| -p/--root-password | No | string | Empty string | The login password of the root user in the instance of seekdb.
NoticeDo not enclose the password in quotation marks when you configure the password. Otherwise, obd will consider the quotation marks as part of the password. |
| --ssh-user | No | string | The current user | The user for starting the nodes of the instance of seekdb. |
| --ssh-password | No | string | Empty string | The password corresponding to --ssh-user, which is used for remotely connecting to the node of the instance of seekdb. |
| --ssh-port | No | int | 22 | The SSH remote port. |
| -t/--ssh-timeout | No | int | 30 | The timeout period for SSH connection, in seconds. |
| --ssh-key-file | No | string | Empty string | The path of the private key file. You must specify an absolute path for the private key file. This option is used for password-free SSH authentication based on the private key. |
obd seekdb switchover
You can run this command to switch the roles between the primary instance and one of the standby instances if the primary instance is available. For more information, see Role switching and decoupling.
obd seekdb switchover <standby deploy name>
# example
obd seekdb switchover seekdb-standby
The standby deploy name parameter specifies the name of the standby instance.
obd seekdb failover
You can use this command to convert a standby instance to a primary instance when the primary instance is unavailable. For more information about how to use this command, see Role switching and decoupling.
obd seekdb failover <standby deploy name>
# example
obd seekdb failover seekdb-standby
The standby deploy name parameter specifies the deployment name of the standby instance. You must specify the deployment name of the standby instance.
obd seekdb decouple
You can use this command to decouple a standby instance from its primary instance and convert the standby instance to an independent instance. For more information about how to use this command, see Role switching and decoupling.
obd seekdb decouple <standby deploy name>
# example
obd seekdb decouple seekdb-standby
The standby deploy name parameter specifies the deployment name of the standby instance.
