|
1 |
| -# Azure file CSI driver development guide |
| 1 | +# Blobfuse CSI driver development guide |
2 | 2 |
|
3 |
| - - Build blobfuse plugin |
| 3 | + - Clone repo |
4 | 4 | ```
|
5 |
| -$ make blobfuse |
| 5 | +$ mkdir -p $GOPATH/src/github.com/csi-driver |
| 6 | +$ git clone https://github.com/csi-driver/blobfuse-csi-driver $GOPATH/src/github.com/csi-driver |
6 | 7 | ```
|
7 |
| -> Before running CSI driver, create "/etc/kubernetes/azure.json" file under testing server(it's better copy `azure.json` file from a k8s cluster with service principle configured correctly) and set `AZURE_CREDENTIAL_FILE` as following: |
| 8 | + |
| 9 | + - Build blobfuse driver |
8 | 10 | ```
|
9 |
| -export set AZURE_CREDENTIAL_FILE=/etc/kubernetes/azure.json |
| 11 | +$ cd $GOPATH/src/github.com/csi-driver/blobfuse-csi-driver |
| 12 | +$ make blobfuse |
10 | 13 | ```
|
| 14 | + |
11 | 15 | - Run test
|
12 | 16 | ```
|
13 | 17 | $ make test
|
14 | 18 | ```
|
15 | 19 |
|
16 |
| -### Start CSI driver |
| 20 | + - Build continer image and push to dockerhub |
17 | 21 | ```
|
18 |
| -$ ./_output/blobfuseplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5 |
| 22 | +export REGISTRY_NAME=<dockerhub-alias> |
| 23 | +make push-latest |
19 | 24 | ```
|
20 | 25 |
|
21 |
| -### Test using csc |
22 |
| -Get ```csc``` tool from https://github.com/rexray/gocsi/tree/master/csc |
| 26 | +### Test locally using csc tool |
| 27 | +Install `csc` tool according to https://github.com/rexray/gocsi/tree/master/csc: |
| 28 | +``` |
| 29 | +$ mkdir -p $GOPATH/src/github.com |
| 30 | +$ cd $GOPATH/src/github.com |
| 31 | +$ git clone https://github.com/rexray/gocsi.git |
| 32 | +$ cd rexray/gocsi/csc |
| 33 | +$ make build |
| 34 | +``` |
| 35 | + |
| 36 | +#### Start CSI driver locally |
| 37 | +``` |
| 38 | +$ cd $GOPATH/src/github.com/csi-driver/blobfuse-csi-driver |
| 39 | +$ ./_output/blobfuseplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5 & |
| 40 | +``` |
| 41 | +> Before running CSI driver, create "/etc/kubernetes/azure.json" file under testing server(it's better copy `azure.json` file from a k8s cluster with service principle configured correctly) and set `AZURE_CREDENTIAL_FILE` as following: |
| 42 | +``` |
| 43 | +export set AZURE_CREDENTIAL_FILE=/etc/kubernetes/azure.json |
| 44 | +``` |
23 | 45 |
|
24 | 46 | #### 1. Get plugin info
|
25 | 47 | ```
|
26 | 48 | $ csc identity plugin-info --endpoint tcp://127.0.0.1:10000
|
27 |
| -"csi-blobfuse" "v0.5.0-alpha" |
| 49 | +"blobfuse.csi.azure.com" "v0.4.0" |
28 | 50 | ```
|
29 | 51 |
|
30 | 52 | #### 2. Create an blobfuse volume
|
|
0 commit comments