This topic describes the quick deployment commands of obd. You can deploy and start a specified component on the local server without specifying a configuration file.
You can use the -h or --help option in each command to view the help information of the command. You can also use the -v or --verbose option to view the detailed execution process of the command when an error occurs.
obd demo
You can use this command to deploy and start the specified component in OceanBase Database with the minimum specifications on your local server without specifying a configuration file. The deployment name is fixed to demo. After deployment, you can view the cluster list by running the obd cluster list command and manage the cluster by using other cluster commands, such as obd cluster display demo.
obd demo [-c/--components]
The following table describes the options.
Option |
Required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| -c/--components | No | string | oceanbase-ce,obproxy-ce,obagent,prometheus,grafana | The list of components to be deployed, separated by commas (,). |
By default, this command deploys the components with the minimum specifications in the home directory of the current user. The deployed component version is the latest version. The supported components are: oceanbase-ce, oceanbase, oceanbase-standalone, obproxy-ce, obproxy, obagent, grafana, prometheus, and ob-configserver.
Note
Starting from V2.9.0, you can use the obd demo command to deploy the ob-configserver component. Starting from V3.2.0, you can use the obd demo command to deploy the oceanbase-standalone component. Starting from V3.4.0, you can use the obd demo command to deploy the oceanbase and obproxy components.
Examples
You can use options to specify the deployment version and configuration. For example:
Specify components
Deploy OceanBase Database Community Edition and ODP
obd demo -c oceanbase-ce,obproxy-ceDeploy only obconfigserver
obd demo -c ob-configserver
Specify component versions
Deploy components with specified versions
obd demo -c oceanbase-ce,obproxy-ce --oceanbase-ce.version=4.3.2.0Deploy components with specified hash values
obd demo -c oceanbase-ce,obproxy-ce --oceanbase-ce.package_hash=f38723204d49057d3e062ffad778edc1552a7c114622bf2a86fea769fbd202ea
Specify component configurations
This example specifies the installation path and port of components. For more information about the related configuration items in the configuration file, see the Configuration item description section in Configuration file description.
Notice
This command supports only the first-level configuration items under global.
Specify the installation path of components
Deploy oceanbase-ce and obproxy-ce to the
/data/demodirectory and create the corresponding working directories for the components.obd demo -c oceanbase-ce,obproxy-ce --home_path=/data/demoSpecify the installation path of a specific component
Deploy oceanbase-ce to the home directory of the current user and create the corresponding working directory for the component. Deploy obproxy-ce to the
/data/demo/obproxy-cedirectory.obd demo -c oceanbase-ce,obproxy-ce --obproxy-ce.home_path=/data/demo/Specify the port of components
obd demo --oceanbase-ce.mysql_port=3881
obd perf
You can use this command to deploy and start the specified component on the specified server in the maximum specification without specifying a configuration file. The deployment name is fixed to perf. After the deployment, you can run the obd cluster list command to view the cluster list and see the cluster. You can also manage the cluster by using other cluster commands, such as obd cluster display perf.
Note
The obd pref command for deploying components in the maximum specification was introduced in V3.4.0 of OceanBase Database. In V4.0.0 and later, the command is updated to obd perf.
obd perf [-c/--components]
The following table describes the options.
Option |
Required |
Data type |
Default value |
Description |
|---|---|---|---|---|
| -c/--components | No | string | oceanbase-ce,obproxy-ce,obagent,prometheus,grafana | The list of components to be deployed. Separate the components with commas (,). The deployed components are in the latest version in the obd image library. The supported components are: oceanbase-ce, oceanbase, oceanbase-standalone, obproxy-ce, obproxy, obagent, grafana, prometheus, and ob-configserver. |
| --server | No | string | The current server | The IP address of the server where the OceanBase cluster is to be deployed. If not specified, the default value is the current server. |
| --username | No | string | The user who executes the command | The username for SSH connection. If not specified, the default value is the user who executes the command. The maximum specification deployment will be performed in the home directory of the specified user. |
| --password | No | string | Empty | The login password of the connection user. If the connection user on the target server is configured with a password and no SSH password-free connection is configured between the user who executes the command and the connection user on the target server, you must specify the user password by using this option. |
| --port | No | int | 22 | The port for SSH connection. |
| --key-file | No | string | Empty | The path of the private key file for SSH connection. You must configure an absolute path for password-free SSH authentication based on the private key. |
Examples
You can specify the deployment version and configuration by using options, for example:
Specify the deployment server
Specify the deployment server and connect by using a password
obd perf -c oceanbase-ce --server=10.10.10.1 --username=admin --password=******Specify the deployment server and connect by using a private key
obd perf -c oceanbase-ce --server=10.10.10.1 --username=admin --key-file=/home/admin/.ssh/id_rsaNote
If the private key file is in the default path (
~/.ssh/id_ rsa), you can omit the--key-fileoption in the command.
Specify the component
Deploy OceanBase Database Community Edition and ODP
obd perf -c oceanbase-ce,obproxy-ceDeploy only obconfigserver
obd perf -c ob-configserver
Specify the component version
Deploy the component in the specified version
obd perf -c oceanbase-ce,obproxy-ce --oceanbase-ce.version=4.3.2.0Deploy the component in the specified hash
obd perf -c oceanbase-ce,obproxy-ce --oceanbase-ce.package_hash=f38723204d49057d3e062ffad778edc1552a7c114622bf2a86fea769fbd202ea
Customize the component configuration
This section uses the installation path and port of the component as an example. For more information about the related parameters in the configuration file, see the Parameters section in Configuration file description.
Notice
This command only supports specifying the first-level parameters under global by using options.
Specify the installation path of the component
Deploy oceanbase-ce and obproxy-ce to the
/data/perfdirectory and create the corresponding working directories for the components.obd perf -c oceanbase-ce,obproxy-ce --home_path=/data/perfSpecify the installation path of the specific component
Deploy oceanbase-ce to the home directory and create the corresponding working directory for the component. Deploy obproxy-ce to the
/data/perf/obproxy-cedirectory.obd perf -c oceanbase-ce,obproxy-ce --obproxy-ce.home_path=/data/perf/Specify the port of the component
obd perf --oceanbase-ce.mysql_port=3881
