Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge explorer #1167

Merged
merged 1 commit into from
Nov 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs-2.0/nebula-explorer/deploy-connect/ex-ug-connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
- 如果已启用身份验证,但是未创建账号信息,用户只能以 GOD 角色登录,必须填写 `root` 及对应的密码 `nebula`。
- 如果已启用身份验证,同时又创建了不同的用户并分配了角色,不同角色的用户使用自己的账号和密码登录。

![Nebula Graph Explorer 的登录页面](../figs/ex-ug-002.png)
![Nebula Graph Explorer 的登录页面](../figs/ex-ug-002-1.png)

2. 完成设置后,点击 **登录** 按钮。
如果能看到如下图所示的界面,表示已经成功连接到 Nebula Graph 数据库。
Expand Down
130 changes: 82 additions & 48 deletions docs-2.0/nebula-explorer/deploy-connect/ex-ug-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

本文介绍如何在本地通过 RPM 和 tar 包部署 Explorer。

## Nebula Graph 版本支持

!!! Note

Explorer 的版本单独发布,不与 Nebula Graph 内核同步,其命名方式也不遵守命名规则,两者兼容对应关系如下表。

| Nebula Graph 版本 | Explorer 版本 |
| --- | --- |
| 2.5.x | 2.0.0 |
| 2.6.x | 2.1.0 |

## RPM 部署

### 前提条件
Expand All @@ -11,17 +22,16 @@
- Nebula Graph 服务已经部署并启动。详细信息参考[Nebula Graph安装部署](../../4.deployment-and-installation/1.resource-preparations.md "点击前往 Nebula Graph 安装部署")。

- 以下端口未被使用。

| 端口号 | 说明 |
| ---- | ---- |
| 7002 | Explorer 提供的 web 服务 |
| 8070 | Nebula-http-gateway 的 HTTP 服务 |

- 使用的 Linux 发行版为 CentOS ,安装有版本为 v10.16.0 + 以上的 Node.js,安装有版本为1.13及以上的Go。

!!! caution

目前 Nebula Explorer 提供的包仅在 Linux 环境中使用,如果用户使用 mac 或其他环境,需要克隆 [http-gateway repo](https://github.com/vesoft-inc/nebula-http-gateway),并修改 `nebula-http-gateway/conf/app.conf` 文件中的 `httpport = 8070` 后使用 `make` 命令编译启动。
Explorer 默认使用的端口号为7002,用户可以在安装目录下的 `conf/app.conf` 文件中修改 `httpport`,并重启服务。

- 使用的 Linux 发行版为 CentOS。
- 安装有版本为1.13及以上的Go。

### 安装

Expand All @@ -33,36 +43,61 @@

2. 使用`sudo rpm -i <rpm>`命令安装RPM包。

例如,安装 Explorer 需要运行以下命令:
例如,安装 Explorer 需要运行以下命令,默认安装路径为`/usr/local/nebula-explorer`

```bash
$ sudo rpm -i nebula-graph-explorer-<version>.x86_64.rpm
$ sudo rpm -i nebula-explorer-<version>.x86_64.rpm
```

### 卸载
也可以使用以下命令安装到指定路径:
```bash
$ sudo rpm -i nebula-explorer-xxx.rpm --prefix=<path>
```

使用以下的命令卸载 Explorer
3. 拷贝 License 至安装路径下

```bash
$ sudo rpm -e nebula-graph-explorer-<version>.x86_64
```
```bash
$ cp -r <license> <explorer_path>
```

例如:
```bash
$ cp -r nebula.license /usr/local/nebula-explorer
```

!!! enterpriseonly

### 异常处理
License 仅在企业版提供,请发送邮件至inquiry@vesoft.com。

如果在安装过程中自动启动失败或是需要手动启动或停止服务,请使用以下命令.
4. 添加 License 后需要使用以下命令停止并重启服务。

- 手动启动服务

```bash
$ sudo sh ./scripts/start.sh
$ systemctl stop nebula-explorer #停止服务
$ systemctl start nebula-explorer #启动服务
```

- 手动停止服务
### 启停服务

```bash
$ sudo sh ./scripts/stop.sh
```
支持使用systemctl 服务控制项目启停。默认 rpm 安装后以 systemctl 启动,可使用以下命令:
```bash
$ systemctl status nebula-explorer #查看服务状态
$ systemctl stop nebula-explorer #停止服务
$ systemctl start nebula-explorer #启动服务
```
也可以在安装目录下使用以下命令,手动启动或停止服务:
```bash
$ cd ./scripts/rpm
$ bash ./start.sh #启动服务
$ bash ./stop.sh #停止服务
```

### 卸载

使用以下的命令卸载 Explorer 。

```bash
$ sudo rpm -e nebula-explorer-<version>.x86_64
```
## tar 包部署

### 前提条件
Expand All @@ -71,20 +106,19 @@ $ sudo rpm -e nebula-graph-explorer-<version>.x86_64

- Nebula Graph 服务已经部署并启动。详细信息参考[Nebula Graph安装部署](../../4.deployment-and-installation/1.resource-preparations.md "点击前往 Nebula Graph 安装部署")。

- 使用的 Linux 发行版为 CentOS ,安装有版本为 v10.16.0 + 以上的 Node.js,安装有版本为1.13及以上的Go。

!!! caution

目前 Nebula Explorer 提供的包仅在 Linux 环境中使用,如果用户使用 mac 或其他环境,需要克隆[http-gateway repo](https://github.com/vesoft-inc/nebula-http-gateway),并修改 `nebula-http-gateway/conf/app.conf` 文件中的`httpport = 8070` 后使用 `make` 命令编译启动。

- 以下端口未被使用。

| 端口号 | 说明 |
| ---- | ---- |
| 7002 | Explorer 提供的 web 服务 |
| 8070 | Nebula-http-gateway 的 HTTP 服务 |

### 安装
!!! caution

Explorer 默认使用的端口号为7002,用户可以在安装目录下的 `conf/app.conf` 文件中修改 `httpport`,并重启服务。

- 使用的 Linux 发行版为 CentOS。
- 安装有版本为1.13及以上的Go。

### 安装及部署

1. 根据需要下载 tar 包,建议选择最新版本。

Expand All @@ -95,37 +129,37 @@ $ sudo rpm -e nebula-graph-explorer-<version>.x86_64
2. 使用 `tar -xvf` 解压 tar 包。

```bash
tar -xvf nebula-graph-explorer-<version>.tar.gz
$ tar -xvf nebula-graph-explorer-<version>.tar.gz
```

### 部署

!!! Note

根目录 nebula-graph-explorer 下一共有两个安装包:nebula-graph-explorer 和 nebula-http-gateway。用户需要在同一台机器上分别部署并启动服务,才能完成 Explorer 的部署。

1. 部署 nebula-http-gateway 并启动。
3. 拷贝 License 至`nebula-explorer`目录下。

```bash
$ cd nebula-http-gateway
$ nohup ./nebula-httpd &
$ cp -r <license> <explorer_path>
```

2. 部署 nebula-graph-explorer

例如:
```bash
$ cd nebula-graph-explorer
$ npm run start
$ cp -r nebula.license /usr/local/nebula-explorer
```

!!! enterpriseonly

License 仅在企业版提供,请发送邮件至inquiry@vesoft.com。

4. 进入`nebula-explorer`文件夹,启动explorer。

```bash
$ cd nebula-explorer
$ ./nebula-httpd &
```

### 停止服务

用户可以采用`kill pid`的方式来关停服务:

```bash
$ kill $(lsof -t -i :8070) # 停止 nebula-http-gateway
$ cd nebula-graph-explorer
$ npm run stop # 停止 nebula-graph-explorer
$ kill $(lsof -t -i :7002)
```

## 后续操作
Expand All @@ -134,6 +168,6 @@ $ npm run stop # 停止 nebula-graph-explorer

在浏览器窗口中看到以下登录界面表示已经成功部署并启动了 Explorer。

![Nebula Explorer 登录页面](../figs/ex-ug-002.png)
![Nebula Explorer 登录页面](../figs/ex-ug-002-1.png)

进入 Explorer 登录界面后,用户需要连接 Nebula Graph。详细信息,参考[连接数据库](../deploy-connect/ex-ug-connect.md)。
Binary file modified docs-2.0/nebula-explorer/figs/ex-ug-002-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.