oat-cli is a command-line tool for managing resources on OceanBase Admin Toolkit (OAT). Here is the syntax:
$ oatcli [OPTIONS] COMMAND [ARGS]...
Options:
--install-completion: sets the command completion feature for the current shell. This option is unavailable at present.--show-completion: displays the command completion script for the current shell, so that you can copy the script or specify custom installation settings.--help: shows the help message and exits.
Parameters:
config: sets the IP address and the username of the API server.create: creates resources in OAT.dagrun: manipulates dagrun and task status in OAT.delete: deletes resources of OAT.describe: obtains the details of resources in OAT.get: obtains the information of resources in OAT.
oatcli config
Sets the IP address and the username and password of the API server.
Syntax:
$ oatcli config [OPTIONS] COMMAND [ARGS]...
Options:
--help: shows the help message and exits.
Parameters:
get: obtains the settings of the requested API of OAT.set: sets the IP address and the username and password of the API server.
oatcli config get
Queries the settings of the requested API of OAT.
Syntax:
$ oatcli config get [OPTIONS]
Options:
--help: shows the help message and exits.
oatcli config set
Sets the IP address and the username and password of the API server.
Syntax:
$ oatcli config set [OPTIONS]
Options:
-s, --api-server TEXT: the IP address of the API server, such as 127.0.0.1:7000.-u, --username TEXT: the username.-p, --password TEXT: the password.--help: shows the help message and exits.
oatcli create
Creates resources in OAT.
Syntax:
$ oatcli create [OPTIONS] COMMAND [ARGS]...
Options:
--help: shows the help message and exits.
Parameters:
component: creates a component by using the configuration file.credential: adds an SSH credential for a server connection.idc: specifies the IDC information for the server.image: adds the image of a component or product. You can scan a local image or manually specify the image information.product: creates a product by using a configuration file.server: adds and initializes a server.
oatcli create component
Creates a component by using the configuration file.
Syntax:
$ oatcli create component [OPTIONS]
Options:
-t, --type [metadb]: the component type. The valid value ismetadb. This option is required.-f, --file PATH: creates a component by using the configuration file.--help: shows the help message and exits.
oatcli create credential
Adds an SSH credential for a server connection.
Syntax:
$ oatcli create credential [OPTIONS] NAME AUTH_TYPE:{password|pubkey|external}
Parameters:
NAME: the name of the credential. This parameter is required.AUTH_TYPE:{password|pubkey|external}: This parameter is required.
Options:
-u, --username TEXT: the username. [The default value is root].-p, --password TEXT: the password.-k, --key-file PATH: the SSH private key file.--help: shows the help message and exits.
oatcli create idc
Specifies the IDC information for the server.
Syntax:
$ oatcli create idc [OPTIONS] NAME REGION
Parameters:
NAME: the IDC name. This parameter is required.REGION: the region where the IDC is located. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli create image
Adds the image of a component or product. You can scan a local image or manually specify the image information.
Syntax:
$ oatcli create image [OPTIONS]
Options:
-n, --name TEXT: The name of the remote image.-r, --repo-tag TEXT: remote the repo:tag information of the remote image.-a, --arch [x86_64|aarch64]: the architecture of the remote image.--scan / --no-scan: specifies whether to scan the local image. The default value isno-scan.--help: shows the help message and exits.
oatcli create product
Creates a product by using a configuration file.
Syntax:
$ oatcli create product [OPTIONS]
Options:
-t, --type [ocp]: the product type. The valid value isocp. This option is required.-f, --file PATH: creates a product by using the configuration file.--quick / --no-quick: specifies whether to perform quick installation of both the products and their dependent MetaDB components. The valid value isocp. This option is required.--help: shows the help message and exits.
oatcli create server
Adds and initializes a server.
Syntax:
$ oatcli create server [OPTIONS] IPS... INIT_TAG:{observer|obproduct|both}
Parameters:
IPS...: the IP addresses of servers. This parameter is required.INIT_TAG:{observer|obproduct|both}: the purpose of the server. This parameter is required.
Options:
-i, --idc TEXT: the IDC name and region. The IDC must already exist. [This option is required.]-c, --credential-name TEXT: the name of the credential. The credential must already exist. [This option is required. ]--add-only / --no-add-only: specifies whether to add only the server without configuring the operating system. [The default value isno-add-only.]--ssh-port INTEGER: the SSH port. [The default value is 22.]--docker-root-dir TEXT: the docker root directory. [Default path: /docker].--ob-user-name TEXT: the OceanBase OS user. [The default value isadmin.]--ob-user-uid-gid TEXT: the UID and GID of the OS user. [The default value is500:500.]--ob-user-password TEXT: the password of the OS user.--help: shows the help message and exits.
oatcli dagrun
Manipulates dagrun and task status in OAT.
Syntax:
$ oatcli dagrun [OPTIONS] COMMAND [ARGS]...
Options:
--help: shows the help message and exits.
Parameters:
retry: retries failed tasks in dagrun.rollback: aborts and rolls back dagrun.skip: skips failed tasks in dagrun.
oatcli dagrun retry
Retries failed tasks in dagrun.
Syntax:
$ oatcli dagrun retry [OPTIONS] DAGRUN_ID [TASK_ID]
Parameters:
DAGRUN_ID: the dagrun ID. This parameter is required.[TASK_ID]: the task ID. If the value is empty, all failed tasks are retried.
Options:
--help: shows the help message and exits.
oatcli dagrun rollback
Aborts and rolls back dagrun.
Syntax:
$ oatcli dagrun rollback [OPTIONS] DAGRUN_ID
Parameters:
DAGRUN_ID: the dagrun ID. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli dagrun skip
Skips failed tasks in dagrun.
Syntax:
$ oatcli dagrun skip [OPTIONS] DAGRUN_ID TASK_ID
Parameters:
DAGRUN_ID: the dagrun ID. This parameter is required.TASK_ID: The task ID. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli delete
Deletes resources of OAT.
Syntax:
$ oatcli delete [OPTIONS] COMMAND [ARGS]...
Options:
--help: shows the help message and exits.
Parameters:
component: deletes a component.credential: deletes a credential.image: deletes an image.product: deletes a product.server: deletes the server.
oatcli delete component
Deletes a component.
Syntax:
$ oatcli delete component [OPTIONS] NAME
Parameters:
NAME: the name of the component to be deleted. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli delete credential
Syntax:
$ oatcli delete credential [OPTIONS] NAME
Parameters:
NAME: the name of the credential. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli delete image
Deletes an image.
Syntax:
$ oatcli delete image [OPTIONS] NAME
Parameters:
NAME: the name of the image to be deleted. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli delete product
Deletes a product.
Syntax:
$ oatcli delete product [OPTIONS] NAME
Parameters:
NAME: the name of the product to be deleted. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli delete server
Deletes a server.
Syntax:
$ oatcli delete server [OPTIONS] IP
Parameters:
IP: the IP address of the server to be deleted. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli describe
Queries the details of resources in OAT.
Syntax:
$ oatcli describe [OPTIONS] COMMAND [ARGS]...
Options:
--help: shows the help message and exits.
Parameters:
component: obtains component details and related dagrun information.product: obtains product details and related dagrun information.server: obtains server details and related dagrun information.
oatcli describe component
Queries component details and related dagrun information.
Syntax:
$ oatcli describe component [OPTIONS] NAME
Parameters:
NAME: The name of the component. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli describe product
Queries product details and related dagrun information.
Syntax:
$ oatcli describe product [OPTIONS] NAME
Parameters:
NAME: The name of the product. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli describe server
Queries server details and related dagrun information.
Syntax:
$ oatcli describe server [OPTIONS] IP
Parameters:
IP: The IP address of the server. This parameter is required.
Options:
--help: shows the help message and exits.
oatcli get
Obtain resource information in OAT.
Syntax:
$ oatcli get [OPTIONS] COMMAND [ARGS]...
Options:
--help: shows the help message and exits.
Parameters:
component: queries the component information.credential: queries the credential information.idc: queries the IDC information.image: queries the image information.product: queries the product information.server: queries the OBServer node information.
oatcli get component
Queries the component information.
Syntax:
$ oatcli get component [OPTIONS] [NAME]
Parameters:
NAME: the name of the component.
Options:
-q, --query-params TEXT: the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get credential
Queries the credential information.
Syntax:
$ oatcli get credential [OPTIONS] [NAME]
Parameters:
[NAME]: the name of the credential.
Options:
-q, --query-params TEXT: the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get idc
Queries the IDC information.
Syntax:
$ oatcli get idc [OPTIONS] [NAME]
Parameters:
[NAME]: the name of the IDC.
Options:
-q, --query-params TEXT: the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get image
Queries the image information.
Syntax:
$ oatcli get image [OPTIONS] [NAME]
Parameters:
[NAME]: the name of the image.
Options:
-q, --query-params TEXT: the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get product
Queries the product information.
Syntax:
$ oatcli get product [OPTIONS] [NAME]
Parameters:
NAME: the name of the product.
Options:
-q, --query-params TEXT: the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get server
Queries the server information.
Syntax:
$ oatcli get server [OPTIONS] [IP]
Parameters:
IP: the IP address of the server.
Options:
-q, --query-params TEXT: the general query parameters in the JSON format.--help: shows the help message and exits.