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

doc(hubble): enhance hubble usage doc/command #333

Merged
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
23 changes: 2 additions & 21 deletions content/cn/docs/quickstart/hugegraph-hubble.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,7 @@ starting HugeGraphHubble ..............timed out with http status 502

#### 2.3 源码编译

**注意:** 编译 hubble 需要用户本地环境有安装 `Nodejs V16.x` 与 `yarn` 环境

```bash
apt install curl build-essential
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
source ~/.bashrc
nvm install 16
```

然后确认安装版本是否为 `16.x` (请注意过高的 Node 版本会产生冲突)

```bash
node -v
```

使用下列命令安装 `yarn`

```bash
npm install -g yarn
```
**注意:** 目前已在 `hugegraph-hubble/hubble-be/pom.xml` 中引入插件 `frontend-maven-plugin`,编译 hubble 时不需要用户本地环境提前安装 `Nodejs V16.x` 与 `yarn` 环境,可直接按下述步骤执行

下载 toolchain 源码包

Expand All @@ -135,7 +116,7 @@ git clone https://github.com/apache/hugegraph-toolchain.git
编译`hubble`, 它依赖 loader 和 client, 编译时需提前构建这些依赖 (后续可跳)

```shell
cd incubator-hugegraph-toolchain
cd hugegraph-toolchain
sudo pip install -r hugegraph-hubble/hubble-dist/assembly/travis/requirements.txt
mvn install -pl hugegraph-client,hugegraph-loader -am -Dmaven.javadoc.skip=true -DskipTests -ntp
cd hugegraph-hubble
Expand Down
23 changes: 2 additions & 21 deletions content/en/docs/quickstart/hugegraph-hubble.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,7 @@ Then use a web browser to access `ip:8088` and you can see the `Hubble` page. Yo

#### 2.3 Source code compilation

**Note**: Compiling Hubble requires the user's local environment to have Node.js V16.x and yarn installed.

```bash
apt install curl build-essential
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
source ~/.bashrc
nvm install 16
```

Then, verify that the installed Node.js version is 16.x (please note that higher Node version may cause conflicts).

```bash
node -v
```

install `yarn` by the command below:

```bash
npm install -g yarn
```
**Note**: The plugin `frontend-maven-plugin` has been added to `hugegraph-hubble/hubble-be/pom.xml`. To compile hubble, you do not need to install `Nodejs V16.x` and `yarn` environment in your local environment in advance. You can directly execute the following steps.

Download the toolchain source code.

Expand All @@ -135,7 +116,7 @@ git clone https://github.com/apache/hugegraph-toolchain.git
Compile `hubble`. It depends on the loader and client, so you need to build these dependencies in advance during the compilation process (you can skip this step later).

```shell
cd incubator-hugegraph-toolchain
cd hugegraph-toolchain
sudo pip install -r hugegraph-hubble/hubble-dist/assembly/travis/requirements.txt
mvn install -pl hugegraph-client,hugegraph-loader -am -Dmaven.javadoc.skip=true -DskipTests -ntp
cd hugegraph-hubble
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the useless & confused cmd

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roger that. Now I will start to test this change

fix the useless & confused cmd

image

Roger that. Now I will start to test this change🫡

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This optimization has been done as follows:
mvn -e package -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp

It will take advantage of Maven's lifecycle mechanisms and may start directly from the build phase (if the project has already been compiled and the source code has not changed) and skip the build phase.

Expand Down
Loading