oatcli is a CLI tool that is used to manage resources on OceanBase Admin Toolkit (OAT). The following code shows the syntax of oatcli:
$ oatcli [OPTIONS] COMMAND [ARGS]...
Options
--install-completion: enables the command completion feature for the current shell. This option is temporarily unavailable.--show-completion: displays the command completion script for the current shell. You can copy the script or configure custom installation settings.--help: shows the help message and exits.
Commands
config: specifies the IP address of the OAT API server and the username.create: creates resources in OAT.dagrun: performs operations on a DagRun and tasks in the DagRun.delete: deletes resources from OAT.describe: queries the details of resources in OAT.get: queries information about the resources in OAT.
oatcli config
Displays the IP address of the OAT API server, username, and password.
Syntax
$ oatcli config [OPTIONS] COMMAND [ARGS]...
Options
--help: shows the help message and exits.
Commands
get: queries the settings of the requested OAT API.set: specifies the IP address of the OAT API server, username, and password.
oatcli config get
Queries the settings of the requested OAT API.
Syntax
$ oatcli config get [OPTIONS]
Options
--help: shows the help message and exits.
oatcli config set
Specifies the IP address of the OAT API server, username, and password.
Syntax
$ oatcli config set [OPTIONS]
Options
-s, --api-server TEXT: specifies the IP address of the API server. Example: 127.0.0.1:7000.-u, --username TEXT: specifies the username.-p, --password TEXT: specifies 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.
Commands
component: creates a component by using a 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 service. You can scan a local image or manually specify the image information.product: creates a service 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]: specifies the component type. Set the value tometadb. This option is required.-f, --file PATH: specifies the path of the configuration file used to create the component.--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}
Arguments
NAME: the name of the credential. This argument is required.AUTH_TYPE:{password|pubkey|external}: the type of the credential. This argument is required.
Options
-u, --username TEXT: specifies the username. Default value: root.-p, --password TEXT: specifies the password.-k, --key-file PATH: specifies the path of 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
Arguments
NAME: the name of the IDC. This argument is required.REGION: the region in which the IDC resides. This argument is required.
Options
--help: shows the help message and exits.
oatcli create image
Adds the image of a component or service. You can scan a local image or manually specify the image information.
Syntax
$ oatcli create image [OPTIONS]
Options
-n, --name TEXT: specifies the name of the remote image.-r, --repo-tag TEXT: specifies the repo:tag information of the remote image.-a, --arch [x86_64|aarch64]: specifies the architecture of the remote image.--scan / --no-scan: specifies whether to scan the local image. Default value: no-scan.--help: shows the help message and exits.
oatcli create product
Creates a service by using a configuration file.
Syntax
$ oatcli create product [OPTIONS]
Options
-t, --type [ocp]: specifies the type of the service. Set the value to ocp. This option is required.-f, --file PATH: specifies the path of the configuration file used to create the service.--quick / --no-quick: specifies whether to perform quick installation of the service and the MetaDB component. This option is supported only for OceanBase Cloud Platform (OCP). 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}
Arguments
IPS...: the IP address of the server. This argument is required.INIT_TAG:{observer|obproduct|both}: the purpose of the server. This argument is required.
Options
-i, --idc TEXT: the name of the IDC:region. Only an existing IDC is supported. This option is required.-c, --credential-name TEXT: the name of the credential. Only an existing credential is supported. This option is required.--add-only / --no-add-only: specifies whether to add the server without configuring the operating system. Default value: no-add-only.--ssh-port INTEGER: specifies the SSH port. Default value: 22.--docker-root-dir TEXT: specifies the Docker root directory. Default value: /docker.--ob-user-name TEXT: specifies the OceanBase operating system user. Default value: admin.--ob-user-uid-gid TEXT: specifies the user ID (UID) and group ID (GID) of the operating system user. Default value: 500:500.--ob-user-password TEXT: specifies the password of the user.--help: shows the help message and exits.
oatcli dagrun
Performs operations on a DagRun and tasks in the DagRun.
Syntax
$ oatcli dagrun [OPTIONS] COMMAND [ARGS]...
Options
--help: shows the help message and exits.
Commands
retry: retries failed tasks in a DagRun.rollback: stops and rolls back a DagRun.skip: skips failed tasks in a DagRun.
oatcli dagrun retry
Retries failed tasks in a DagRun.
Syntax
$ oatcli dagrun retry [OPTIONS] DAGRUN_ID [TASK_ID]
Arguments
DAGRUN_ID: the ID of the DagRun. This argument is required.[TASK_ID]: the ID of the task to be retried. If the argument is left empty, all failed tasks are retried.
Options
--help: shows the help message and exits.
oatcli dagrun rollback
Stops and rolls back a DagRun.
Syntax
$ oatcli dagrun rollback [OPTIONS] DAGRUN_ID
Arguments
DAGRUN_ID: the ID of the DagRun. This argument is required.
Options
--help: shows the help message and exits.
oatcli dagrun skip
Skips failed tasks in a DagRun.
Syntax
$ oatcli dagrun skip [OPTIONS] DAGRUN_ID TASK_ID
Arguments
DAGRUN_ID: the ID of the DagRun. This argument is required.TASK_ID: the ID of the task to be skipped. This argument is required.
Options
--help: shows the help message and exits.
oatcli delete
Deletes resources from OAT.
Syntax
$ oatcli delete [OPTIONS] COMMAND [ARGS]...
Options
--help: shows the help message and exits.
Commands
component: deletes a component.credential: deletes a credential.image: deletes an image.product: deletes a service.server: deletes a server.
oatcli delete component
Deletes a component.
Syntax
$ oatcli delete component [OPTIONS] NAME
Arguments
NAME: the name of the component to be deleted. This argument is required.
Options
--help: shows the help message and exits.
oatcli delete credential
Syntax
$ oatcli delete credential [OPTIONS] NAME
Arguments
NAME: the name of the credential. This argument is required.
Options
--help: shows the help message and exits.
oatcli delete image
Deletes an image.
Syntax
$ oatcli delete image [OPTIONS] NAME
Arguments
NAME: the name of the image to be deleted. This argument is required.
Options
--help: shows the help message and exits.
oatcli delete product
Deletes a service.
Syntax
$ oatcli delete product [OPTIONS] NAME
Arguments
NAME: the name of the service to be deleted. This argument is required.
Options
--help: shows the help message and exits.
oatcli delete server
Deletes a server.
Syntax
$ oatcli delete server [OPTIONS] IP
Arguments
IP: the IP address of the server to be deleted. This argument 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.
Commands
component: queries the details of a component and the related DagRun.product: queries the details of a service and the related DagRun.server: queries the details of a server and the related DagRun.
oatcli describe component
Queries the details of a component and the related DagRun.
Syntax
$ oatcli describe component [OPTIONS] NAME
Arguments
NAME: The name of the component. This argument is required.
Options
--help: shows the help message and exits.
oatcli describe product
Queries the details of a service and the related DagRun.
Syntax
$ oatcli describe product [OPTIONS] NAME
Arguments
NAME: the name of the service. This argument is required.
Options
--help: shows the help message and exits.
oatcli describe server
Queries the details of a server and the related DagRun.
Syntax
$ oatcli describe server [OPTIONS] IP
Arguments
IP: The IP address of the server. This argument is required.
Options
--help: shows the help message and exits.
oatcli get
Queries information about the resources in OAT.
Syntax
$ oatcli get [OPTIONS] COMMAND [ARGS]...
Options
--help: shows the help message and exits.
Commands
component: queries information about a component.credential: queries information about a credential.idc: queries information about an IDC.image: queries information about an image.product: queries information about a service.server: queries information about a server.
oatcli get component
Queries information about a component.
Syntax
$ oatcli get component [OPTIONS] [NAME]
Arguments
[NAME]: the name of the component.
Options
-q, --query-params TEXT: specifies the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get credential
Queries information about a credential.
Syntax
$ oatcli get credential [OPTIONS] [NAME]
Arguments
[NAME]: the name of the credential.
Options
-q, --query-params TEXT: specifies the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get idc
Queries information about an IDC.
Syntax
$ oatcli get idc [OPTIONS] [NAME]
Arguments
[NAME]: the name of the IDC.
Options
-q, --query-params TEXT: specifies the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get image
Queries information about an image.
Syntax
$ oatcli get image [OPTIONS] [NAME]
Arguments
[NAME]: the name of the image.
Options
-q, --query-params TEXT: specifies the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get product
Queries information about a service.
Syntax
$ oatcli get product [OPTIONS] [NAME]
Arguments
[NAME]: the name of the service.
Options
-q, --query-params TEXT: specifies the general query parameters in the JSON format.--help: shows the help message and exits.
oatcli get server
Queries information about a server.
Syntax
$ oatcli get server [OPTIONS] [IP]
Arguments
[IP]: the IP address of the server.
Options
-q, --query-params TEXT: specifies the general query parameters in the JSON format.--help: shows the help message and exits.