未验证 提交 7cbe7a44 编写于 作者: 张素娟 提交者: GitHub

Document Optimization (#75)

* Update Q&A.md

* Update Q&A.md

* Update cluster-commands.md

* Update cluster-commands.md

* Update install-obd.md

* Update install-obd.md

* Update Q&A.md
上级 d30677f6
......@@ -33,3 +33,23 @@ A:您可以修改 `~/.obd/plugins/oceanbase-ce/` 下的启动相关插件。
## Q:如何升级 OBD?
A:您可以使用 `obd update` 命令升级 OBD。当您升级完成后可以使用命令 `obd --version` 查看版本,确认是否升级成功。
## Q:如何使用 OBD 升级 OceanBase 数据库?
A:您可使用 `obd cluster upgrade` 命令升级 OceanBase 数据库。
例如,若您想要从 OceanBase V3.1.1 升级到 V3.1.2,命令如下:
```shell
export LANG=en_US.UTF-8
obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce
```
### 报错处理
您可能会遇到 `Too many match` 的报错,这时只需在 `Candidates` 上选择一个 `hash` 即可。比如:
```shell
export LANG=en_US.UTF-8
obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce --usable 7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed
```
......@@ -37,3 +37,7 @@ pip install -r requirements3.txt
sh build.sh
source /etc/profile.d/obd.sh
```
> **注意:** 为了与 release 版本区分开,源码安装产生的版本号为 4 位版本号,即在 rpm 包的版本号基础上加上安装时间,比如 1.2.0.1641267289。
另外您可通过在安装前设置环境变量 `export OBD_DUBUG=1` 安装开启 DEBUG 模式的 OBD,该模式下每一条命令结束后都会输出对应的 trace id 以方便问题定位。
......@@ -74,7 +74,7 @@ obd cluster start <deploy name> [flags]
选项名 | 是否必选 | 数据类型 | 默认值 | 说明
--- | --- | --- |--- |---
-s/--servers | 否 | string | 空 | 机器列表,用 `,` 间隔。用于指定启动的机器。如果组件下的机器没有全部启动,则 start 不会执行 bootstrap。
-s/--servers | 否 | string | 空 | 机器列表,后跟 `yaml` 文件中 `servers` 对应的 `name` 值,`,` 间隔。用于指定启动的机器。如果组件下的机器没有全部启动,则 start 不会执行 bootstrap。
-c/--components | 否 | string | 空 | 组件列表,用 `,` 间隔。用于指定启动的组件。如果配置下的组件没有全部启动,该配置不会进入 running 状态。
--wop/--without-parameter | 否 | bool | false | 无参启动。启动的时候不带参数。节点第一次的启动时,不响应此选项。
-S/--strict-check | 否 | bool | false | 部分组件在启动前会做相关的检查。检查不通过时,OBD 将发出告警,不会强制停止流程。使用该选项可开启检查失败报错直接退出。建议开启,可以避免一些资源不足导致的启动失败。
......@@ -125,7 +125,7 @@ obd cluster restart <deploy name>
选项名 | 是否必选 | 数据类型 | 默认值 | 说明
--- | --- | --- |--- |---
-s/--servers | 否 | string | 空 | 机器列表,用 `,` 间隔。
-s/--servers | 否 | string | 空 | 机器列表,后跟 `yaml` 文件中 `servers` 对应的 `name` 值,`,` 间隔。
-c/--components | 否 | string | 空 | 组件列表,用 `,` 间隔。用于指定启动的组件。如果配置下的组件没有全部启动,该配置不会进入 running 状态。
--wp/--with-parameter | 否 | bool | false | 使用参数重启 OBD。用于在重启时使配置项生效。
......@@ -155,7 +155,7 @@ obd cluster stop <deploy name>
选项名 | 是否必选 | 数据类型 | 默认值 | 说明
--- | --- | --- |--- |---
-s/--servers | 否 | string | 空 | 机器列表,用 `,` 间隔。用于指定停止的机器。
-s/--servers | 否 | string | 空 | 机器列表,后跟 `yaml` 文件中 `servers` 对应的 `name` 值,`,` 间隔。用于指定停止的机器。
-c/--components | 否 | string | 空 | 组件列表,用 `,` 间隔。用于指定停止的组件。如果配置下的组件没有全部停止,该配置不会进入 stopped 状态。
## `obd cluster destroy`
......
......@@ -33,3 +33,23 @@ A: You can modify the startup plug-ins in the `~/.obd/plugins/oceanbase-ce/` dir
## Q:How to update OBD?
A:You can use the `obd update` command to update OBD. When you are done with the update, use the `obd --version` command to confirm the version of OBD.
## Q: How to upgrade OceanBase with OBD?
A: You can use the `Too many match` command to upgrade OceanBase.
For example, if you want to upgrade OceanBase from V3.1.1 to V3.1.2, you can run these commands:
```shell
export LANG=en_US.UTF-8
obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce
```
### error processing
You may encounter a `Too many match` error, just select a `hash` on `Candidates`. For example:
```shell
export LANG=en_US.UTF-8
obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce --usable 7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed
```
......@@ -37,3 +37,7 @@ pip install -r requirements3.txt
sh build.sh
source /etc/profile.d/obd.sh
```
>**Note:** To distinguish from the release version, the version number generated by source code installation is a 4-digit version number, that is, add the installation time to the version number of rpm package, such as 1.2.0.1641267289.
In addition, you can set the environment variable `export OBD_DUBUG=1` to install OBD with DEBUG mode before installation, which will output the corresponding trace id after each command to facilitate problem location.
......@@ -72,7 +72,7 @@ This table describes the corresponding options.
| Option | Required | Data type | Default value | Description |
--- | --- | --- |--- | ---
| -s/--servers | No | string | | A list of machines, separated by `,`. Be used for specifying the start-up machines. If this option is disabled, all machines under the component will start without executing bootstrap. |
| -s/--servers | No | string | | A list of machines, followed by the `name` value corresponding to `servers` in the `yaml` file, separated by `,`. Be used for specifying the start-up machines. If this option is disabled, all machines under the component will start without executing bootstrap. |
| -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. The node does not respond to this option when this node is starting for the first time. |
| -S/--strict-check | No | bool | false | Some components will do relevant checks before starting. OBD will throw an error when the check fails, but OBD will not force the process to stop. Using this option can return an error and directly exit the process when the component pre-check fails. We recommend that you enable this option to avoid startup failures due to insufficient resources. |
......@@ -123,7 +123,7 @@ This table describes the corresponding options.
| Option | Required | Data type | Default value | Description |
--- | --- | --- |--- | ---
| -s/--servers | No | string | | A list of machines, separated by `,`. |
| -s/--servers | No | string | | A list of machines, followed by the `name` value corresponding to `servers` in the `yaml` file, 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. |
| --wp/--with-parameter | No | bool | false | Restarts OBD with parameters. This option makes the parameters valid when you restart OBD. |
......@@ -153,7 +153,7 @@ This table describes the corresponding options.
| Option | Required | Data type | Default value | Description |
--- | --- | --- |--- | ---
| -s/--servers | No | string | | A list of machines, separated by `,`. Be used for specifying the start-up machines. |
| -s/--servers | No | string | | A list of machines, followed by the `name` value corresponding to `servers` in the `yaml` file, separated by `,`. Be used for specifying the start-up machines. |
| -c/--components | No | string | | A list of components, separated by `,`. Be used for specifying the start-up components. If not all components under the configuration start, this configuration will not enter the stopped state. |
## `obd cluster destroy`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册