Skip to content

Commit

Permalink
upgrade docs of install and upgrade (fluid-cloudnative#328)
Browse files Browse the repository at this point in the history
Co-authored-by: 仇伶玮 <[email protected]>
  • Loading branch information
yangyuliufeng and 仇伶玮 authored Nov 4, 2020
1 parent 905afd3 commit 2aa2a9d
Show file tree
Hide file tree
Showing 11 changed files with 119 additions and 72 deletions.
43 changes: 18 additions & 25 deletions docs/en/dev/how_to_develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,28 @@ $ git clone https://github.com/fluid-cloudnative/fluid.git

You can simply get a binary by running:
```shell
# build controller manager
$ make manager

# build fluid CSI plugin
$ make csi
# build dataset-controller, alluxioruntime-controller and csi Binary
$ make build
```
By default, the binary would be put under `<fluid-path>/bin`.

### Build Images
1. Set tags for images

```shell
# image name for controller manager
$ export IMG=<registry>/<namespace>/<img-repo>
# image name for CSI plugin
$ export CSI_IMG=<registry>/<namespace>/<csi-img-repo>
# set name for image of dataset-controller
$ export DATASET_CONTROLLER_IMG=<your-registry>/<your-namespace>/<img-name>
# set name for image of alluxioruntime-controller
$ export ALLUXIORUNTIME_CONTROLLER_IMG=<your-registry>/<your-namespace>/<img-name>
# set name for image of CSI
$ export CSI_IMG=<your-registry>/<your-namespace>/<csi-img-name>
# set name for image of init-user
$ export INIT_USERS_IMG=<your-registry>/<your-namespace>/<csi-img-name>

# build all images
$ make docker-build-all
```
Image tag will be automatically injected with SHA1 value of current git revision.
Before running Fluid, you need to push the built image to an accessible image registry.

2. Login to a image registry

Expand All @@ -60,21 +64,10 @@ By default, the binary would be put under `<fluid-path>/bin`.
$ sudo docker login <docker-registry>
```

3. Build your image and push:
```shell
# build and push image for controller manager
$ make docker-push
# build and push image for CSI plugin
$ make docker-push-csi
```

Alternatively, it makes no difference that you build your images first and then manually push them:
```shell
$ make docker-build
$ make docker-build-csi
$ docker push <IMG>:<IMG_TAG>
3. push your images:

```shell
$ make docker-push-all
```

### Run Your Fluid on Kubernetes Cluster
Expand Down
7 changes: 4 additions & 3 deletions docs/en/samples/accelerate_data_accessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Before everything we are going to do, please refer to [Installation Guide](../us
```shell
$ kubectl get pod -n fluid-system
NAME READY STATUS RESTARTS AGE
controller-manager-7fd6457ccf-jnkvn 1/1 Running 0 60s
csi-nodeplugin-fluid-6rhpt 2/2 Running 0 60s
csi-nodeplugin-fluid-6zwgl 2/2 Running 0 60s
alluxioruntime-controller-5b64fdbbb-84pc6 1/1 Running 0 8h
csi-nodeplugin-fluid-fwgjh 2/2 Running 0 8h
csi-nodeplugin-fluid-ll8bq 2/2 Running 0 8h
dataset-controller-5b7848dbbb-n44dj 1/1 Running 0 8h
```

Normally, you shall see a Pod named "controller-manager" and several Pods named "csi-nodeplugin".
Expand Down
7 changes: 4 additions & 3 deletions docs/en/samples/accelerate_data_accessing_by_hdfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
```shell
$ kubectl get pod -n fluid-system
NAME READY STATUS RESTARTS AGE
controller-manager-7fd6457ccf-jnkvn 1/1 Running 0 60s
csi-nodeplugin-fluid-6rhpt 2/2 Running 0 60s
csi-nodeplugin-fluid-6zwgl 2/2 Running 0 60s
alluxioruntime-controller-5b64fdbbb-84pc6 1/1 Running 0 8h
csi-nodeplugin-fluid-fwgjh 2/2 Running 0 8h
csi-nodeplugin-fluid-ll8bq 2/2 Running 0 8h
dataset-controller-5b7848dbbb-n44dj 1/1 Running 0 8h
```

## 新建工作环境
Expand Down
9 changes: 5 additions & 4 deletions docs/en/samples/data_co_locality.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Before everything we are going to do, please refer to [Installation Guide](../us
```shell
$ kubectl get pod -n fluid-system
NAME READY STATUS RESTARTS AGE
controller-manager-7fd6457ccf-jnkvn 1/1 Running 0 60s
csi-nodeplugin-fluid-6rhpt 2/2 Running 0 60s
csi-nodeplugin-fluid-6zwgl 2/2 Running 0 60s
alluxioruntime-controller-5b64fdbbb-84pc6 1/1 Running 0 8h
csi-nodeplugin-fluid-fwgjh 2/2 Running 0 8h
csi-nodeplugin-fluid-ll8bq 2/2 Running 0 8h
dataset-controller-5b7848dbbb-n44dj 1/1 Running 0 8h
```

Normally, you shall see a Pod named "controller-manager" and several Pods named "csi-nodeplugin".
Normally, you shall see a Pod named "dataset-controller", a Pod named "alluxioruntime-controller" and several Pods named "csi-nodeplugin".
The num of "csi-nodeplugin" Pods depends on how many nodes your Kubernetes cluster have(e.g. 2 in this demo), so please make sure all "csi-nodeplugin" Pods are working properly.

## Set Up Workspace
Expand Down
28 changes: 28 additions & 0 deletions docs/en/userguide/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,34 @@ TEST SUITE: None

> The general format of the `helm install` command is like: `helm install <RELEASE_NAME> <SOURCE>`. In the above command, the first `fluid` means the release name, and the second `fluid` specified the path to the helm chart, i.e. the directory just unpacked.

### Upgrade Fluid with Helm

Before updating, it is recommended to ensure that all components in the AlluxioRuntime resource object have been started completely, which is similar to the following state:

```shell
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
hbase-fuse-chscz 1/1 Running 0 9h
hbase-fuse-fmhr5 1/1 Running 0 9h
hbase-master-0 2/2 Running 0 9h
hbase-worker-bdbjg 2/2 Running 0 9h
hbase-worker-rznd5 2/2 Running 0 9h
```
If you have installed an older version of Fluid before, you can use Helm to update it.

```shell
$ helm upgrade fluid fluid-0.4.0.tgz
Release "fluid" has been upgraded. Happy Helming!
NAME: fluid
LAST DEPLOYED: Wed Nov 4 09:19:58 2020
NAMESPACE: default
STATUS: deployed
REVISION: 2
TEST SUITE: None
```
> We have only tried to update from v0.3 to v0.4. If you upgrade directly to v0.4 from an older version, unknown types of errors may occur.
### Check Status of Component

**Check CRD used by Fluid:**
Expand Down
25 changes: 12 additions & 13 deletions docs/zh/dev/how_to_develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ $ git clone https://github.com/fluid-cloudnative/fluid.git
### 编译
Fluid项目根目录下的`Makefile`文件已经包含了项目开发中的编译、构建、部署等基本逻辑
```shell
# 构建Controller Manager Binary
$ make manager

# 构建CSI Binary
$ make csi
# 构建dataset-controller, alluxioruntime-controller和csi Binary
$ make build
```
构建得到的Binary程序位于`./bin`目录下。

### 镜像构建

1. 设置镜像名称
```shell
# 为manager镜像命名
$ export IMG=<your-registry>/<your-namespace>/<img-name>
# 为dataset-controller镜像命名
$ export DATASET_CONTROLLER_IMG=<your-registry>/<your-namespace>/<img-name>
# 为alluxioruntime-controller镜像命名
$ export ALLUXIORUNTIME_CONTROLLER_IMG=<your-registry>/<your-namespace>/<img-name>
# 为CSI插件镜像命名
$ export CSI_IMG=<your-registry>/<your-namespace>/<csi-img-name>
# 构建manager镜像
$ make docker-build
# 构建CSI插件镜像
$ make docker-build-csi
# 为init-user镜像命名
$ export INIT_USERS_IMG=<your-registry>/<your-namespace>/<csi-img-name>

# 构建所有镜像
$ make docker-build-all
```

在运行Fluid之前,需要将构建的镜像推送到可以访问的镜像仓库中
Expand All @@ -65,8 +65,7 @@ $ make csi

3. 推送镜像:
```shell
$ make docker-push
$ make docker-push-csi
$ make docker-push-all
```

### 运行
Expand Down
7 changes: 4 additions & 3 deletions docs/zh/samples/accelerate_data_accessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
```shell
$ kubectl get pod -n fluid-system
NAME READY STATUS RESTARTS AGE
controller-manager-7fd6457ccf-jnkvn 1/1 Running 0 60s
csi-nodeplugin-fluid-6rhpt 2/2 Running 0 60s
csi-nodeplugin-fluid-6zwgl 2/2 Running 0 60s
alluxioruntime-controller-5b64fdbbb-84pc6 1/1 Running 0 8h
csi-nodeplugin-fluid-fwgjh 2/2 Running 0 8h
csi-nodeplugin-fluid-ll8bq 2/2 Running 0 8h
dataset-controller-5b7848dbbb-n44dj 1/1 Running 0 8h
```
通常来说,你会看到一个名为`controller-manager`的Pod和多个名为`csi-nodeplugin`的Pod正在运行。其中,`csi-nodeplugin`这些Pod的数量取决于你的Kubernetes集群中结点的数量。

Expand Down
7 changes: 4 additions & 3 deletions docs/zh/samples/accelerate_data_accessing_by_hdfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
```shell
$ kubectl get pod -n fluid-system
NAME READY STATUS RESTARTS AGE
controller-manager-7fd6457ccf-jnkvn 1/1 Running 0 60s
csi-nodeplugin-fluid-6rhpt 2/2 Running 0 60s
csi-nodeplugin-fluid-6zwgl 2/2 Running 0 60s
alluxioruntime-controller-5b64fdbbb-84pc6 1/1 Running 0 8h
csi-nodeplugin-fluid-fwgjh 2/2 Running 0 8h
csi-nodeplugin-fluid-ll8bq 2/2 Running 0 8h
dataset-controller-5b7848dbbb-n44dj 1/1 Running 0 8h
```

## 新建工作环境
Expand Down
10 changes: 5 additions & 5 deletions docs/zh/samples/data_co_locality.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
在运行该示例之前,请参考[安装文档](../userguide/install.md)完成安装,并检查Fluid各组件正常运行:
```shell
$ kubectl get pod -n fluid-system
NAME READY STATUS RESTARTS AGE
controller-manager-7fd6457ccf-jnkvn 1/1 Running 0 60s
csi-nodeplugin-fluid-6rhpt 2/2 Running 0 60s
csi-nodeplugin-fluid-6zwgl 2/2 Running 0 60s
alluxioruntime-controller-5b64fdbbb-84pc6 1/1 Running 0 8h
csi-nodeplugin-fluid-fwgjh 2/2 Running 0 8h
csi-nodeplugin-fluid-ll8bq 2/2 Running 0 8h
dataset-controller-5b7848dbbb-n44dj 1/1 Running 0 8h
```

通常来说,你会看到一个名为controller-manager”的Pod和多个名为csi-nodeplugin的Pod正在运行。其中,csi-nodeplugin这些Pod的数量取决于你的Kubernetes集群中结点的数量。
通常来说,你会看到一个名为`dataset-controller`的Pod、一个名为`alluxioruntime-controller`的Pod和多个名为`csi-nodeplugin`的Pod正在运行。其中,`csi-nodeplugin`这些Pod的数量取决于你的Kubernetes集群中结点的数量。

## 新建工作环境
```shell
Expand Down
12 changes: 6 additions & 6 deletions docs/zh/samples/multi_dataset_same_node_accessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
```shell
$ kubectl get pod -n fluid-system
NAME READY STATUS RESTARTS AGE
controller-manager-74d4f88b55-x99r8 1/1 Running 0 17h
csi-nodeplugin-fluid-brxph 2/2 Running 0 17h
csi-nodeplugin-fluid-gfcxm 2/2 Running 0 17h
alluxioruntime-controller-5b64fdbbb-84pc6 1/1 Running 0 8h
csi-nodeplugin-fluid-fwgjh 2/2 Running 0 8h
csi-nodeplugin-fluid-ll8bq 2/2 Running 0 8h
dataset-controller-5b7848dbbb-n44dj 1/1 Running 0 8h
```
通常来说,你会看到一个名为`controller-manager`的Pod和多个名为`csi-nodeplugin`的Pod正在运行。其中,`csi-nodeplugin`这些Pod的数量取决于你的Kubernetes集群中结点的数量。
通常来说,你会看到一个名为`dataset-controller`的Pod、一个名为`alluxioruntime-controller`的Pod和多个名为`csi-nodeplugin`的Pod正在运行。其中,`csi-nodeplugin`这些Pod的数量取决于你的Kubernetes集群中结点的数量。

## 运行示例

Expand Down Expand Up @@ -176,8 +177,7 @@ spark Ready Ready Ready 58s
等待一段时间,让AlluxioRuntime资源对象中的各个组件得以顺利启动,你会看到类似以下状态:
```shell
$ kubectl get pod -o wide
AME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
hNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
hbase-fuse-7jqz6 1/1 Running 0 113s 192.168.1.174 cn-beijing.192.168.1.174 <none> <none>
hbase-master-0 2/2 Running 0 2m24s 192.168.1.175 cn-beijing.192.168.1.175 <none> <none>
hbase-worker-w89fq 2/2 Running 0 113s 192.168.1.174 cn-beijing.192.168.1.174 <none> <none>
Expand Down
36 changes: 29 additions & 7 deletions docs/zh/userguide/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@

您可以从[Fluid Releases](https://github.com/fluid-cloudnative/fluid/releases)下载最新的Fluid安装包。

解压刚才下载的Fluid安装包:

```shell
$ tar -zxf fluid.tgz
```

### 使用Helm安装Fluid

Expand All @@ -36,7 +31,7 @@ $ kubectl create ns fluid-system
安装Fluid:

```shell
$ helm install fluid fluid
$ helm install fluid fluid.tgz
NAME: fluid
LAST DEPLOYED: Fri Jul 24 16:10:18 2020
NAMESPACE: default
Expand All @@ -45,7 +40,34 @@ REVISION: 1
TEST SUITE: None
```

> `helm install`命令的一般格式是`helm install <RELEASE_NAME> <SOURCE>`,在上面的命令中,第一个`fluid`指定了安装的release名字,这可以自行更改,第二个`fluid`指定了helm chart所在路径,即在上一步中压缩包解压后的路径。
> `helm install`命令的一般格式是`helm install <RELEASE_NAME> <SOURCE>`,在上面的命令中,第一个`fluid`指定了安装的release名字,这可以自行更改,第二个`fluid.tgz`指定了helm chart所在路径。
### 使用Helm更新Fluid

更新前,建议确保AlluxioRuntime资源对象中的各个组件得以顺利启动,也就是类似以下状态:

```shell
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
hbase-fuse-chscz 1/1 Running 0 9h
hbase-fuse-fmhr5 1/1 Running 0 9h
hbase-master-0 2/2 Running 0 9h
hbase-worker-bdbjg 2/2 Running 0 9h
hbase-worker-rznd5 2/2 Running 0 9h
```
如果您此前已经安装过旧版本的Fluid,可以使用Helm进行更新。

```shell
$ helm upgrade fluid fluid-0.4.0.tgz
Release "fluid" has been upgraded. Happy Helming!
NAME: fluid
LAST DEPLOYED: Wed Nov 4 09:19:58 2020
NAMESPACE: default
STATUS: deployed
REVISION: 2
TEST SUITE: None
```
> 我们目前只尝试过从v0.3更新到v0.4,如果您从更旧的版本直接升级到v0.4,可能会出现未知类型的错误。
### 检查各组件状态

Expand Down

0 comments on commit 2aa2a9d

Please sign in to comment.