Skip to content

Commit

Permalink
update studio (#1069)
Browse files Browse the repository at this point in the history
* [WIP]update studio

* Update st-ug-deploy.md

* Create st-ug-deploy-by-helm.md

* Update st-ug-deploy-by-helm.md

* Update st-ug-deploy-by-helm.md

* Update st-ug-release-note.md

* Update st-ug-deploy-by-helm.md

* Update mkdocs.yml

* update

* update
  • Loading branch information
foesa-yang committed Nov 1, 2021
1 parent e847c6d commit e6f9c73
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 68 deletions.
2 changes: 1 addition & 1 deletion docs-2.0/nebula-studio/about-studio/st-ug-check-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Studio 处于持续开发状态中。用户可以通过 [Studio 发布版本更

成功连接 Studio 后,用户可以在页面右上角点击版本号,再点击 **新发布**,前往查看 Studio 的版本更新记录。

![在页面右上角点击版本号,并在弹出菜单里点击“新发布”](../figs/st-ug-014-2.png "查看 Studio 版本更新记录")
![在页面右上角点击版本号,并在弹出菜单里点击“新发布”](../figs/st-ug-014.png "查看 Studio 版本更新记录")

1 change: 1 addition & 0 deletions docs-2.0/nebula-studio/about-studio/st-ug-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
| 1.x | 1.x|
| 2.0 & 2.0.1 | 2.x |
| 2.5.0 & 2.5.1 | 3.0.0 |
| 2.6.0 | 3.1.0 |

## 系统架构

Expand Down
22 changes: 20 additions & 2 deletions docs-2.0/nebula-studio/about-studio/st-ug-release-note.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
# Studio版本更新说明

## v3.1.0(2021.10.29)

- 功能增强:
- 适配 Nebula 2.6.0。
- 新增在 Kubernetes 集群里使用 Helm 部署并启动 Studio。
- 新增 GEO 数据类型。
- 图探索
- 新增配置节点图标功能。

- 修复:
- Schema
- 修复以关键字命名的 Tag/Edge 或其下属性时会报错的问题。
- 修复数据类型不完善的问题,补充 date/time/datetime/int32/int16/int8 等类型枚举。

- 兼容:
- 去除 Studio 对 nebula-importer 的依赖,用 http-gateway 兼容相关功能。

## v3.0.0(2021.08.13)

- 功能增强:

- 适配 Nebula 2.5.0
- 配置 Schema 中支持给 Space、Tag、Edge Type、Index 添加 COMMENT
- 适配 Nebula 2.5.0
- 配置 Schema 中支持给 Space、Tag、Edge Type、Index 添加 COMMENT
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ Nebula Graph Studio(简称 Studio)是一款可以通过 Web 访问的图数

## 发行版本

Studio 目前有三个发行版本
可以使用以下四种方式安装部署 Studio

- Docker 版本:用户可以使用 Docker 服务部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [Docker 部署 Studio](../deploy-connect/st-ug-deploy.md)
- RPM 版本:用户可以使用 RPM 服务部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [RPM 部署 Studio](../deploy-connect/st-ug-deploy.md)
- tar 包安装部署:用户可以使用 tar 包安装并部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [tar 包部署 Studio](../deploy-connect/st-ug-deploy.md)
- 使用 Helm 安装部署:在 Kubernetes 集群里使用 Helm 安装并部署 Studio,并连接到 Nebula Graph 数据库。详细信息参考 [使用 Helm 部署 Nebula Graph Studio](../deploy-connect/st-ug-deploy-by-helm.md)

<!--
- 云服务版本:用户可以在 Nebula Graph Cloud Service 上创建 Nebula Graph 数据库实例,并一键直连云服务版 Studio。详细信息参考 [Nebula Graph Cloud Service 用户手册](https://cloud-docs.nebula-graph.com.cn/cn/posts/manage-instances/dbaas-ug-connect-nebulastudio/ "点击前往 Nebula Graph Cloud Service 用户手册")。
Expand Down
65 changes: 65 additions & 0 deletions docs-2.0/nebula-studio/deploy-connect/st-ug-deploy-by-helm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 使用 Helm 部署 Studio

本文介绍如何在通过 Kubernetes 集群里用 Helm 来部署并启动 Studio。

## 前提条件

安装 Studio 前,用户需要安装以下软件并确保安装版本的正确性:
| 软件 | 版本要求 |
| ------------------------------------------------------------ | --------- |
| [Kubernetes](https://kubernetes.io) | \>= 1.14 |
| [Helm](https://helm.sh) | \>= 3.2.0 |

## 安装

1. 克隆 Studio 的源代码到主机。

```bash
$ git clone https://github.com/vesoft-inc/nebula-studio.git
```

2. 进入`nebula-studio`目录。

```bash
$ cd nebula-studio
```

3. 安装 Studio 到 Helm Chart,命名为 `my-studio`

```bash
$ helm upgrade --install my-studio --set service.type=NodePort --set service.port=30070 deployment/helm
```

4. 启动成功后,在浏览器地址栏输入 `http://address-of-node:30070/`
如果在浏览器窗口中能看到以下登录界面,表示已经成功部署并启动 Studio。

![Nebula Graph Studio 登录界面](../figs/st-ug-001-1.png "Nebula Graph Studio 登录界面")

## 卸载

```bash
$ helm uninstall my-studio
```

## 后续操作

进入 Studio 登录界面后,用户需要连接 Nebula Graph。详细信息,参考[连接数据库](st-ug-connect.md)

## Nebula Graph Studio Chart配置参数说明

| 参数 | 默认值 | 描述 |
|:---|:---|:---|
| replicaCount | 0 | Deployment的副本数。 |
| image.httpGateway.name | vesoft/nebula-http-gateway | nebula-http-gateway 镜像的仓库地址。 |
| image.nebulaStudio.name | vesoft/nebula-graph-studio | nebula-graph-studio 镜像的仓库地址。 |
| image.nginx.name | nginx | nginx 镜像的仓库地址。 |
| image.httpGateway.version | v2.1.1 | nebula-http-gateway 的版本。 |
| image.nebulaStudio.version | v3.1.0 | nebula-graph-studio 的版本。 |
| image.nginx.version | alpine | nginx 的版本。 |
| service.type | ClusterIP | 服务类型,必须为`NodePort``ClusterIP``LoadBalancer`其中之一。 |
| service.port | 7001 | nebula-graph-studio 中 web 服务的端口。 |
| resources.httpGateway | {} | nebula-http-gateway 的资源限制/请求。 |
| resources.nebulaStudio | {} | nebula-studio的资源限制/请求。 |
| resources.nginx | {} | nginx 的资源限制/请求。 |
| persistent.storageClassName | "" | storageClass名称,如果不指定就使用默认值。 |
| persistent.size | 5Gi | 存储盘大小。 |
50 changes: 20 additions & 30 deletions docs-2.0/nebula-studio/deploy-connect/st-ug-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,28 @@ Nebula Graph Studio( 以下简称 Studio )支持云端或本地部署。云
| ---- | ---- |
| 7001 | Studio提供web服务使用。 |
| 8080 | Nebula HTTP Gateway Client进行HTTP通信使用。 |
| 5699 | Nebula Importer导入数据导入使用。 |

### 安装

1. 根据需要选择并下载RPM包,建议选择最新版本。常用下载链接如下:

| 安装包 | 检验和 | Nebula版本 |
| ----- | ----- | ----- |
| [nebula-graph-studio-{{studio.release}}-1.x86_64.rpm](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/{{studio.release}}/nebula-graph-studio-{{studio.release}}-1.x86_64.rpm) | [nebula-graph-studio-{{studio.release}}-1.x86_64.rpm.sha256](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/{{studio.release}}/nebula-graph-studio-{{studio.release}}-1.x86_64.rpm.sha256) | {{ nebula.release }} |
| [nebula-graph-studio-{{studio.release}}.x86_64.rpm](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/{{studio.release}}/nebula-graph-studio-{{studio.release}}.x86_64.rpm) | [nebula-graph-studio-{{studio.release}}.x86_64.rpm.sha256](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/{{studio.release}}/nebula-graph-studio-{{studio.release}}.x86_64.rpm.sha256) | {{ nebula.release }} |

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

例如,安装Studio {{studio.release}} 版本需要运行以下命令:

```bash
$ sudo rpm -i nebula-graph-studio-{{studio.release}}-1.x86_64.rpm
$ sudo rpm -i nebula-graph-studio-{{studio.release}}.x86_64.rpm
```

当屏幕返回以下信息时,表示 PRM 版 Studio 已经成功启动。

```bash
egg started on http://0.0.0.0:7001
nohup: 把输出追加到"nohup.out"
--- START OF NEBULA IMPORTER ---
[INFO] httpserver.go:80: Starting http server on 5699
```


Expand All @@ -74,7 +71,7 @@ Nebula Graph Studio( 以下简称 Studio )支持云端或本地部署。云
用户可以使用以下的命令卸载 Studio。

```bash
$ sudo rpm -e nebula-graph-studio-{{studio.release}}-1.x86_64
$ sudo rpm -e nebula-graph-studio-{{studio.release}}.x86_64
```

### 异常处理
Expand All @@ -83,12 +80,12 @@ $ sudo rpm -e nebula-graph-studio-{{studio.release}}-1.x86_64

- 手动启动服务
```bash
$ bash /usr/local/nebula-graph-studio/scripts/start.sh
$ bash /usr/local/nebula-graph-studio/scripts/rpm/start.sh
```

- 手动停止服务
```bash
$ bash /usr/local/nebula-graph-studio/scripts/stop.sh
$ bash /usr/local/nebula-graph-studio/scripts/rpm/stop.sh
```

如果启动服务时遇到报错报错 ERROR: bind EADDRINUSE 0.0.0.0:7001,用户可以通过以下命令查看端口7001是否被占用。
Expand Down Expand Up @@ -131,50 +128,46 @@ $ npm run start
| ---- | ---- |
| 7001 | Studio提供的web服务 |
| 8080 | Nebula-http-gateway,Client的HTTP服务 |
| 5699 | Nebula importer文件导入工具,数据导入服务 |

### 安装

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

| 安装包 | Studio 版本 |
| --- | --- |
| [nebula-graph-studio-{{studio.release}}-1.x86_64.tar.gz](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/{{studio.release}}/nebula-graph-studio-{{studio.release}}-1.x86_64.tar.gz) | {{studio.release}} |
| [nebula-graph-studio-{{studio.release}}.x86_64.tar.gz](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/{{studio.release}}/nebula-graph-studio-{{studio.release}}.x86_64.tar.gz) | {{studio.release}} |

2. 使用 `tar -xvf` 解压 tar 包。

```bash
tar -xvf nebula-graph-studio-{{studio.release}}-1.x86_64.tar.gz
tar -xvf nebula-graph-studio-{{studio.release}}.x86_64.tar.gz
```

### 部署

!!! Note

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

1. 部署 nebula-importer 并启动。

```bash
$ cd nebula-importer
$ ./nebula-importer --port 5699 --callback "http://0.0.0.0:7001/api/import/finish" &
```

2. 部署 nebula-http-gateway 并启动。
1. 部署 nebula-http-gateway 并启动。

```bash
$ cd nebula-http-gateway
$ nohup ./nebula-httpd &
```

3. 部署 nebula-graph-studio 并启动。
2. 部署 nebula-graph-studio 并启动。

```bash
$ cd nebula-graph-studio
$ npm run start
```

4.启动成功后,在浏览器地址栏输入 `http://ip address:7001`
!!! caution

Studio {{studio.release}} 版本不需要依赖于 nebula-importer,故安装部署方式与 Studio v3.0.0 不同。

3. 启动成功后,在浏览器地址栏输入 `http://ip address:7001`

如果在浏览器窗口中能看到以下登录界面,表示已经成功部署并启动 Studio。

Expand All @@ -185,7 +178,6 @@ $ npm run start

用户可以采用 `kill pid` 的方式来关停服务:
```bash
$ kill $(lsof -t -i :5699) # stop nebula-importer
$ kill $(lsof -t -i :8080) # stop nebula-http-gateway
$ cd nebula-graph-studio
$ npm run stop # stop nebula-graph-studio
Expand All @@ -205,7 +197,6 @@ $ npm run stop # stop nebula-graph-studio
| ---- | ---- |
| 7001 | Studio提供的web服务 |
| 8080 | Nebula-http-gateway,Client的HTTP服务 |
| 5699 | Nebula importer文件导入工具,数据导入服务 |

- (可选)在中国大陆从 Docker Hub 拉取 Docker 镜像的速度可能比较慢,用户可以使用 `registry-mirrors` 参数配置加速镜像。例如,如果要使用 Docker 中国区官方镜像、网易镜像和中国科技大学的镜像,则按以下格式配置 `registry-mirrors` 参数:

Expand All @@ -229,18 +220,18 @@ $ npm run stop # stop nebula-graph-studio

| 安装包 | Nebula Graph版本 |
| ----- | ----- |
| [nebula-graph-studio-v3.tar.gz](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/nebula-graph-studio-v3.tar.gz) | {{nebula.release}} |
| [nebula-graph-studio-v{{studio.release}}.tar.gz](https://oss-cdn.nebula-graph.com.cn/nebula-graph-studio/nebula-graph-studio-v{{studio.release}}.tar.gz) | {{nebula.release}} |

2. 创建`nebula-graph-studio-v3`目录,并将安装包解压至目录中。
2. 创建`nebula-graph-studio-v{{studio.release}}`目录,并将安装包解压至目录中。

```bash
mkdir nebula-graph-studio-v3 && tar -zxvf nebula-graph-studio-v3.tar.gz -C nebula-graph-studio-v3
mkdir nebula-graph-studio-v{{studio.release}} && tar -zxvf nebula-graph-studio-v{{studio.release}}.tar.gz -C nebula-graph-studio-v{{studio.release}}
```

3. 解压后进入 `nebula-graph-studio-v3` 目录。
3. 解压后进入 `nebula-graph-studio-v{{studio.release}}` 目录。

```bash
cd nebula-graph-studio-v3
cd nebula-graph-studio-v{{studio.release}}
```

4. 拉取 Studio 的 Docker 镜像。
Expand All @@ -258,7 +249,6 @@ $ npm run stop # stop nebula-graph-studio
当屏幕返回以下信息时,表示 Docker 版 Studio 已经成功启动。

```bash
Creating docker_importer_1 ... done
Creating docker_client_1 ... done
Creating docker_web_1 ... done
Creating docker_nginx_1 ... done
Expand Down
Binary file modified docs-2.0/nebula-studio/figs/st-ug-014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs-2.0/nebula-studio/figs/st-ug-046.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ Studio v{{ studio.release }} 及以后版本。请更新版本,详细操作参

- **清除插入**:清除画图板上原来的数据后,再插入新的数据。

数据插入成功后,用户可以看到查询结果的可视化表现。
数据插入成功后,用户可以看到查询结果的可视化表现。并支持在页面中,完成点的拓展、移动画布、修改点的颜色及icon、显示点边属性等操作。

![在画布上显示返回的路径结果](../figs/st-ug-046-1.png "路径结果的可视化表现")
![在画布上显示返回的路径结果](../figs/st-ug-046.png "路径结果的可视化表现")

## 后续操作

Expand Down
Loading

0 comments on commit e6f9c73

Please sign in to comment.