Skip to content
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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ PREFETCHER_VERSION := v0.1.0
PACKAGE := github.com/fluid-cloudnative/fluid

# Go and build settings
GO_MODULE ?= off
GO_MODULE ?= on
GC_FLAGS ?= -gcflags="all=-N -l"
LOCAL_FLAGS ?= -gcflags="all=-N -l"
CGO_ENABLED ?= 0
Expand Down
12 changes: 2 additions & 10 deletions docs/en/dev/how_to_develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,12 @@ See [Install Docker](https://docs.docker.com/engine/install/) for more informati
### Get Source Code

```shell
$ export GOPATH=$(go env GOPATH)

$ mkdir $GOPATH/src/github.com/fluid-cloudnative

$ cd $GOPATH/src/github.com/fluid-cloudnative

$ git clone https://github.com/fluid-cloudnative/fluid.git

$ cd fluid
```

> **NOTE**: In this document, we build, run and debug under non-module environment.
>
> See [Go Modules](https://github.com/golang/go/wiki/Modules) for more information if some issue occurs to you.
> **NOTE**: Fluid uses Go modules for dependency management. No GOPATH setup is required.

### Build Binary
`Makefile` under project directory provides many tasks you may want to use including Test, Build, Debug, Deploy etc.
Expand Down Expand Up @@ -217,7 +209,7 @@ $ ln -s $(which helm) /usr/local/bin/ddc-helm

2. Create a soft link directory for related Charts locally
```
$ ln -s $GOPATH/src/github.com/fluid-cloudnative/fluid/charts $HOME/charts
$ ln -s $(pwd)/charts $HOME/charts
```

3. Taking the Alluxio Runtime Controller as an example, run the component locally using the following command:
Expand Down
14 changes: 3 additions & 11 deletions docs/zh/dev/how_to_develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,12 @@ Fluid需要使用`make`命令进行项目构建,使用以下命令安装`make`

### 获取项目源码
```
$ export GOPATH=$(go env GOPATH)

$ mkdir $GOPATH/src/github.com/fluid-cloudnative

$ cd $GOPATH/src/github.com/fluid-cloudnative

$ git clone https://github.com/fluid-cloudnative/fluid.git

$ cd fluid
```

> **注意**:本文在非Go Module模式下完成Fluid的编译、运行和调试。
>
> 有关Go module可以参阅 [Golang 官方文档](https://github.com/golang/go/wiki/Modules) 获取更多信息。
> **注意**:Fluid使用Go Module进行依赖管理,无需配置GOPATH。

### 安装`controller-gen`

Expand All @@ -49,7 +41,7 @@ $ make controller-gen
$ controller-gen --version
Version: v0.8.0
```
> **注意**: controller-gen默认将下载到`$GOPATH/bin`路径下,请确保`$GOPATH/bin`已被添加在开发环境的`$PATH`环境变量中
> **注意**: controller-gen默认将下载到`$(go env GOPATH)/bin`路径下,请确保该路径已被添加在开发环境的`$PATH`环境变量中

### 二进制程序编译

Expand Down Expand Up @@ -115,7 +107,7 @@ $ ln -s $(which helm) /usr/local/bin/ddc-helm

2. 在本地创建相关Charts的软链接目录
```
$ ln -s $GOPATH/src/github.com/fluid-cloudnative/fluid/charts $HOME/charts
$ ln -s $(pwd)/charts $HOME/charts
```

3. 以Alluxio Runtime Controller为例,使用以下命令在本地运行该组件:
Expand Down
Loading