-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
98 changes: 98 additions & 0 deletions
98
docs/manual-CN/3.build-develop-and-administration/2.install/4.cluster-deploy.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# 集群部署 | ||
|
||
在本文档中,我们将指导您使用部署 **Nebula Graph** 集群。同时我们也使用 [Docker](https://github.com/vesoft-inc/nebula-docker-compose/blob/master/README_zh-CN.md) 部署好了集群,以便您可以在几分钟之内试用。 | ||
|
||
## 前提条件 | ||
|
||
在开始部署 **Nebula Graph** 集群前,确保您已在集群的每一台机器上安装最新版本的 **Nebula Graph**。安装方式参考: | ||
|
||
- [包安装](1.install-with-rpm-deb.md) | ||
- [源码编译安装](../1.build/1.build-source-code.md) | ||
|
||
由于 **Nebula Graph** 依赖较多,推荐使用安装包安装。 | ||
|
||
本文档中,我们准备了 3 台装有 CentOS 7.5 系统的机器, IP 如下: | ||
|
||
```text | ||
192.168.8.14 # cluster-14 | ||
192.168.8.15 # cluster-15 | ||
192.168.8.16 # cluster-16 | ||
``` | ||
|
||
## 要部署的 Nebula Graph 服务 | ||
|
||
在本文档中我们将部署以下 **Nebula Graph** 服务: | ||
|
||
- 3 副本 `nebula-metad` 服务 | ||
- 3 副本 `nebula-storaged` 服务 | ||
- 3 副本 `nebula-graphd` 服务 | ||
|
||
```text | ||
- cluster-14: metad/storaged/graphd | ||
- cluster-15: metad/storaged/graphd | ||
- cluster-16: metad/storaged/graphd | ||
``` | ||
|
||
## 修改配置文件 | ||
|
||
**Nebula Graph** 的所有配置文件均位于 `/usr/local/nebula/etc` 目录下,并且提供了三份默认配置。 | ||
|
||
### nebula-metad.conf | ||
|
||
部署集群时,需要根据每个节点上部署的服务修改相应配置文件中的两个参数: `local_ip` 和 `meta_server_addrs`。 `local_ip` 要修改成节点的 IP, `meta_server_addrs` 需要修改成集群上 meta 服务的 ip:port 对。多个 ip:port 对之间需要用逗号隔开。 | ||
|
||
`cluster-14` 上的两项配置示例如下所示: | ||
|
||
```text | ||
# Peers | ||
--meta_server_addrs=192.168.8.14:45500,192.168.8.15:45500,192.168.8.16:45500 | ||
# Local ip | ||
--local_ip=192.168.8.14 | ||
# Meta daemon listening port | ||
--port=45500 | ||
``` | ||
|
||
### nebula-graphd.conf | ||
|
||
部署集群时,需要为 graphd 服务配置 metad 的地址和端口 `meta_server_addrs`。 cluster-14 上的部分配置如下: | ||
|
||
```text | ||
# Meta Server Address | ||
--meta_server_addrs=192.168.8.14:45500,192.168.8.15:45500,192.168.8.16:45500 | ||
``` | ||
|
||
### nebula-storaged.conf | ||
|
||
部署集群时,需要为 storaged 服务配置 metad 的地址和端口 `meta_server_addrs` 以及本机地址 `local_ip`。 cluster-14 上的部分配置如下: | ||
|
||
```text | ||
# Meta server address | ||
--meta_server_addrs=192.168.8.14:45500,192.168.8.15:45500,192.168.8.16:45500 | ||
# Local ip | ||
--local_ip=192.168.8.14 | ||
# Storage daemon listening port | ||
--port=44500 | ||
``` | ||
|
||
## 启动集群 | ||
|
||
集群启动请参考 [启停 Nebula Graph 服务文档](2.start-stop-service.md)。 | ||
|
||
## 测试集群 | ||
|
||
登录集群中的一台机器,执行如下命令: | ||
|
||
```ngql | ||
[(none)]> SHOW HOSTS; | ||
================================================================================================== | ||
| Ip | Port | Status | Leader count | Leader distribution | Partition distribution | | ||
================================================================================================== | ||
| 192.168.8.14 | 44500 | online | 0 | No valid partition | No valid partition | | ||
-------------------------------------------------------------------------------------------------- | ||
| 192.168.8.15 | 44500 | online | 3 | toy: 1, test: 1, NBA: 1 | NBA: 1, toy: 1, test: 1 | | ||
-------------------------------------------------------------------------------------------------- | ||
| 192.168.8.16 | 44500 | online | 0 | No valid partition | No valid partition | | ||
-------------------------------------------------------------------------------------------------- | ||
| Total | | | 3 | NBA: 1, toy: 1, test: 1 | NBA: 1, test: 1, toy: 1 | | ||
-------------------------------------------------------------------------------------------------- | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters