未验证 提交 5cd4f049 编写于 作者: A Amber Zhang 提交者: GitHub

doc 1.2.0 (#69)

上级 c731a344
# OceanBase Deployer
<!--
#
# OceanBase Deploy.
# Copyright (C) 2021 OceanBase
#
# This file is part of OceanBase Deploy.
#
# OceanBase Deploy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OceanBase Deploy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OceanBase Deploy. If not, see <https://www.gnu.org/licenses/>.
#
-->
<!-- TODO: some badges here -->
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
```
......
# OceanBase Deployer
<!--
#
# OceanBase Deploy.
# Copyright (C) 2021 OceanBase
#
# This file is part of OceanBase Deploy.
#
# OceanBase Deploy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OceanBase Deploy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OceanBase Deploy. If not, see <https://www.gnu.org/licenses/>.
#
-->
<!-- TODO: some badges here -->
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
```
......
......@@ -111,7 +111,7 @@ obd cluster reload <deploy name>
## `obd cluster restart`
重启一个运行中集群。当您使用 edit-config 修改一个运行的集群的配置信息后,可以通过 `restart` 命令应用修改。
重启一个运行中集群。重启默认是无参数重启。当您使用 edit-config 修改一个运行的集群的配置信息后,可以通过 `restart` 命令应用修改。
> **注意:** 并非所有的配置项都可以通过 `restart` 来应用。有些配置项需要重部署集群才能生效。请根据 `edit-config` 后返回的信息进行操作。
......@@ -127,7 +127,7 @@ obd cluster restart <deploy name>
--- | --- | --- |--- |---
-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 <deploy name> [-f]
选项 `-f``--force-kill`。检查到工作目录下有运行中的进程时,强制停止。销毁前会做检查是有还有进程在运行中。这些运行中的进程可能是 **start** 失败留下的,也可能是因为配置与其他集群重叠,进程是其他集群的。但无论是哪个原因导致工作目录下有进程未退出,**destroy** 都会直接停止。使用该选项会强制停止这些运行中的进程,强制执行 **destroy**。非必填项。数据类型为 `bool`。默认不开启。
## `obd cluster upgrade`
升级一个已经启动的组件。
```shell
obd cluster upgrade <deploy_name> -c <component_name> -V <version> [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 数据库有效。该命令会自动创建资源单元和资源池,用户不需要手动创建。
......
......@@ -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>
```
参数 `mirror repo name` 为镜像仓库名。如果指定 `remote`,则会禁用所有远程镜像仓库。
## `obd mirror enable`
启用远程镜像仓库。
```shell
obd mirror enable <mirror repo name>
```
参数 `mirror repo name` 为镜像仓库名。如果指定 `remote`,则会启用所有远程镜像仓库。
......@@ -109,7 +109,7 @@ obd cluster reload <deploy name>
## `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 <deploy name> [-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 <deploy_name> -c <component_name> -V <version> [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.
......
......@@ -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 <mirror_repo_name>
```
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 <mirror repo name>
```
Parameter `mirror repo name` specifies the mirror repository name. When you specify `remote`, all the remote mirror repositories are enabled.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册