obd demo
With the obd demo command, you can directly deploy and start a specified component on your local computer without loading the configuration file. The fixed name of the cluster deployed is demo. After the deployment, you can run the obd cluster list command to view the cluster in the cluster list. You can also run other cluster commands to manage the cluster, such as obd cluster display demo.
obd demo [-c/--components]
The following table describes the options in the command.
| Option | Required | Data type | Default value | Description |
|---|---|---|---|---|
| -c/--components | No | string | oceanbase-ce,obproxy-ce,obagent,prometheus,grafana | The list of components that are separated with commas (,). You can use this parameter to specify the components to be deployed. |
By default, this command deploys the minimum specifications in the home directory of the current user, and the latest versions are deployed by default. Components supported in this command are oceanbase-ce, obproxy-ce, obagent, grafana, prometheus, ob-configserver, and ocp-express.
Note
obd allows you to use the obd demo command to deploy the ocp-express component in V2.8.0 and later and deploy the ob-configserver component in V2.9.0 and later.
Examples
You can select the version and specify the configurations of a component to be deployed.
Specify components
Deploy OCP Express
OCP Express depends on OceanBase Database and OBAgent. When you use the
obd democommand to deploy OCP Express, you must also specifyoceanbase-ceandobagentin the command.obd demo -c oceanbase-ce,obagent,ocp-expressDeploy obconfigserver only
obd demo -c ob-configserver
Specify the version of components
Deploy components of the specified version
obd demo -c oceanbase-ce,obproxy-ce --oceanbase-ce.version=4.3.2.0Deploy components with the specified package hash
obd demo -c oceanbase-ce,obproxy-ce --oceanbase-ce.package_hash=f38723204d49057d3e062ffad778edc1552a7c114622bf2a86fea769fbd202ea
Specify the configurations of components
This section describes how to specify the installation path and port number of a component. For more information about the parameters in the configuration file, see the Parameters section in Configuration files.
Notice
This command supports only level-1 configurations under global that are specified by using options.
Specify an installation path for all components to be deployed
Deploy
oceanbase-ceandobproxy-cein the/data/demodirectory and create corresponding working directories for them.obd demo -c oceanbase-ce,obproxy-ce --home_path=/data/demoSpecify an installation path for a specific component to be deployed
Deploy
oceanbase-cein the home directory and create a working directory for it, and deployobproxy-cein the/data/demo/obproxy-cedirectory.obd demo -c oceanbase-ce,obproxy-ce --obproxy-ce.home_path=/data/demo/Specify a port number for a component to be deployed
obd demo --oceanbase-ce.mysql_port=3881