diff --git a/README-CN.md b/README-CN.md index 46671529e97bf59c66b340e1343a976028fe4fae..55e475eeadc9eec7f7f4749f67fa094d3a40cbc8 100644 --- a/README-CN.md +++ b/README-CN.md @@ -1,29 +1,5 @@ # OceanBase Deployer - - - - OceanBase Deployer(简称 OBD)是 OceanBase 开源软件的安装部署工具。OBD 同时也是包管理器,可以用来管理 OceanBase 所有的开源软件。本文介绍如何安装 OBD、使用 OBD 和 OBD 的命令。 ## 安装 OBD @@ -53,16 +29,22 @@ source /etc/profile.d/obd.sh Python2.7 使用以下命令安装: ```shell -pip install -r requirements.txt -sh build.sh +sh rpm/build.sh build source /etc/profile.d/obd.sh ``` Python3.8 使用以下命令安装: +首先在 Python 2.7 环境下执行以下命令: + +```shell +sh rpm/build.sh executer +``` + +然后在 Python3.8 环境执行以下命令: + ```shell -pip install -r requirements3.txt -sh build.sh +rpm/build.sh build_obd source /etc/profile.d/obd.sh ``` diff --git a/README.md b/README.md index b6352841947e14f3154608e128b52de54e94feed..54034cb726b5f595e9c6243f238c0f32217b68ed 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,5 @@ # OceanBase Deployer - - - - OceanBase Deployer (OBD) is an installation and deployment tool for open-source OceanBase software. It is also a package manager for managing all open-source OceanBase software. This topic describes how to install OBD, how to use OBD, and OBD commands. ## Install OBD @@ -53,16 +29,20 @@ Before you install OBD by using the source code, make sure that you have install To install OBD on Python2.7, run these commands: ```shell -pip install -r requirements.txt -sh build.sh +sh rpm/build.sh build source /etc/profile.d/obd.sh ``` -To install OBD on Python3.8, run these commands: +To install OBD on Python3.8, run these commands on Python2.7 first: + +```shell +sh rpm/build.sh executer +``` + +Then run these commands on Python3.8: ```shell -pip install -r requirements3.txt -sh build.sh +sh rpm/build.sh build_obd source /etc/profile.d/obd.sh ``` diff --git a/docs/docs-cn/obd-commands/cluster-commands.md b/docs/docs-cn/obd-commands/cluster-commands.md index 7225f3718eb02b28d84c3a1cb78505499c123f6f..9eaaf3f65e9bcccdeeacc1adbb0ee0ccabcac115 100644 --- a/docs/docs-cn/obd-commands/cluster-commands.md +++ b/docs/docs-cn/obd-commands/cluster-commands.md @@ -111,7 +111,7 @@ obd cluster reload ## `obd cluster restart` -重启一个运行中集群。当您使用 edit-config 修改一个运行的集群的配置信息后,可以通过 `restart` 命令应用修改。 +重启一个运行中集群。重启默认是无参数重启。当您使用 edit-config 修改一个运行的集群的配置信息后,可以通过 `restart` 命令应用修改。 > **注意:** 并非所有的配置项都可以通过 `restart` 来应用。有些配置项需要重部署集群才能生效。请根据 `edit-config` 后返回的信息进行操作。 @@ -127,7 +127,7 @@ obd cluster restart --- | --- | --- |--- |--- -s/--servers | 否 | string | 空 | 机器列表,用 `,` 间隔。 -c/--components | 否 | string | 空 | 组件列表,用 `,` 间隔。用于指定启动的组件。如果配置下的组件没有全部启动,该配置不会进入 running 状态。 ---wop/--without-parameter | 否 | bool | false | 无参启动。启动的时候不带参数。节点第一次的启动时,不响应此选项。 +--wp/--with-parameter | 否 | bool | false | 使用参数重启 OBD。用于在重启时使配置项生效。 ## `obd cluster redeploy` @@ -170,6 +170,25 @@ obd cluster destroy [-f] 选项 `-f` 为 `--force-kill`。检查到工作目录下有运行中的进程时,强制停止。销毁前会做检查是有还有进程在运行中。这些运行中的进程可能是 **start** 失败留下的,也可能是因为配置与其他集群重叠,进程是其他集群的。但无论是哪个原因导致工作目录下有进程未退出,**destroy** 都会直接停止。使用该选项会强制停止这些运行中的进程,强制执行 **destroy**。非必填项。数据类型为 `bool`。默认不开启。 +## `obd cluster upgrade` + +升级一个已经启动的组件。 + +```shell +obd cluster upgrade -c -V [tags] +``` + +参数 `deploy name` 为部署配置名称,可以理解为配置文件名称。 + +选项名 | 是否必选 | 数据类型 | 默认值 | 说明 +--- | --- | --- |--- |--- +-c/--component | 是 | string | 空 | 要升级的组件名。 +-V/--version | 是 | string | 目标版本号。 +--skip-check | 否 | bool | false | 跳过可以跳过的检查。 +--usable | 否 | string | 空 | 升级中使用到的镜像hash列表,用 `,` 间隔。 +--disable | 否 | string | 空 | 升级中禁用到的镜像hash列表,用 `,` 间隔。 +-e/--executer-path | 否 | string | /usr/obd/lib/executer | 升级脚本使用的解释器所在路径。 + ## `obd cluster tenant create` 创建租户。该命令仅对 OceanBase 数据库有效。该命令会自动创建资源单元和资源池,用户不需要手动创建。 diff --git a/docs/docs-cn/obd-commands/mirror-and-repository-commands.md b/docs/docs-cn/obd-commands/mirror-and-repository-commands.md index 77a758b47bd9d241f589c89f44a83715b281f592..8273f16fb51b0dacd7d1e19ac67e4d1e626fca7c 100644 --- a/docs/docs-cn/obd-commands/mirror-and-repository-commands.md +++ b/docs/docs-cn/obd-commands/mirror-and-repository-commands.md @@ -51,3 +51,23 @@ obd mirror list [mirror repo name] ```shell obd mirror update ``` + +## `obd mirror disable` + +禁用远程镜像仓库。如果需要禁用所有远程镜像仓库,执行 `obd mirror disable remote` 命令。 + +```shell +obd mirror disable +``` + +参数 `mirror repo name` 为镜像仓库名。如果指定 `remote`,则会禁用所有远程镜像仓库。 + +## `obd mirror enable` + +启用远程镜像仓库。 + +```shell +obd mirror enable +``` + +参数 `mirror repo name` 为镜像仓库名。如果指定 `remote`,则会启用所有远程镜像仓库。 diff --git a/docs/docs-en/obd-commands/cluster-commands.md b/docs/docs-en/obd-commands/cluster-commands.md index 59cb10d8d89309326123dbf06534c2ca00056ad3..ad44d9c562f8c096791dc2ed7ac1e7798edb9ad8 100644 --- a/docs/docs-en/obd-commands/cluster-commands.md +++ b/docs/docs-en/obd-commands/cluster-commands.md @@ -109,7 +109,7 @@ obd cluster reload ## `obd cluster restart` -Restarts a running cluster. After you run the edit-config command to modify the configuration information of a running cluster, you can run the `restart` command for the modification to take effect. +Restarts a running cluster. By default, OBD restarts without any parameters. After you run the edit-config command to modify the configuration information of a running cluster, you can run the `restart` command for the modification to take effect. > **NOTE:** Some configuration items may not take effect after you run the `restart` command. You even need to redeploy the cluster for some configuration items to take effect. Perform operations based on the result returned by the edit-config command. @@ -125,7 +125,7 @@ This table describes the corresponding options. --- | --- | --- |--- | --- | -s/--servers | No | string | | A list of machines, separated by `,`. | | -c/--components | No | string | | A list of components, separated by `,`. Be used for specifying the start-up components. If this option is disabled, all machines under the component will start without entering the running state. | -| --wop/--without-parameter | No | bool | false | Start without parameters. It is without parameters when starting. The node does not respond to this option when it is starting for the first time. | +| --wp/--with-parameter | No | bool | false | Restarts OBD with parameters. This option makes the parameters valid when you restart OBD. | ## `obd cluster redeploy` @@ -168,6 +168,25 @@ obd cluster destroy [-f] `-f` is `--force-kill`. This option specifies whether to forcibly stop running processes in the working directory. Before OBD destroys the cluster, it will check for running processes. These processes may result from the failure of the **start** command. They may also belong to other clusters when configurations of this cluster overlap with those of other clusters. If an ongoing process is found in the working directory, OBD will stop the **destroy** command. However, if this option is enabled, OBD will forcibly stop the ongoing processes and run the **destroy** command. `-f` is optional. Its data type is `bool`. This option is disabled by default. +## `obd cluster upgrade` + +Update a running component. + +```shell +obd cluster upgrade -c -V [tags] +``` + +`deploy name` specifies the name of the deployment configuration file. + +| Option | Required | Data type | Default value | Description | +--- | --- | --- |--- |--- +-c/--component | Yes | string | empty | The component name you want to upgrade. +-V/--version | Yes | string | The target upgrade version number. +--skip-check | No | bool | false | Skip check. +--usable | No | string | empty | The hash list for the mirrors that you use during upgrade. Separated with `,`. +--disable | No | string | empty | The hash list for the mirrors that you disable during upgrade. Separated with `,`. +-e/--executer-path | No | string | /usr/obd/lib/executer | The executer path for the upgrade script. + ## `obd cluster tenant create` Creates a tenant. This command applies only to an OceanBase cluster. This command automatically creates resource units and resource pools. diff --git a/docs/docs-en/obd-commands/mirror-and-repository-commands.md b/docs/docs-en/obd-commands/mirror-and-repository-commands.md index 6195d762e6203e5e01dbe7228b6ac04c7bc9eb5b..3dce7c3950841b20d9b82ee7e6b822344b5a8135 100644 --- a/docs/docs-en/obd-commands/mirror-and-repository-commands.md +++ b/docs/docs-en/obd-commands/mirror-and-repository-commands.md @@ -51,3 +51,23 @@ Synchronizes the information of all remote mirror repositories. ```shell obd mirror update ``` + +## `obd mirror disable` + +Disable remote mirror repositories. To disable all the remote mirror repositories, run the `obd mirror disable remote` command. + +```shell +obd mirror disable +``` + +Parameter `mirror repo name` specifies the mirror repository name. When you specify `remote`, all the remote mirror repositories are disabled. + +## `obd mirror enable` + +Enable remote mirror repositories. + +```shell +obd mirror enable +``` + +Parameter `mirror repo name` specifies the mirror repository name. When you specify `remote`, all the remote mirror repositories are enabled.