Update csi-dev.md

This commit is contained in:
Andy Zhang 2019-11-30 19:18:34 +08:00 committed by GitHub
parent 43bf03900f
commit a4a730ed39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 6 deletions

View File

@ -24,22 +24,30 @@ make azurefile-container
make push-latest
```
### Start CSI driver
### Test locally using csc tool
Install `csc` tool according to https://github.com/rexray/gocsi/tree/master/csc:
```
$ ./_output/azurefileplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5
$ mkdir -p $GOPATH/src/github.com
$ cd $GOPATH/src/github.com
$ git clone https://github.com/rexray/gocsi.git
$ cd rexray/gocsi/csc
$ make build
```
#### Start CSI driver locally
```
$ cd $GOPATH/src/sigs.k8s.io/azurefile-csi-driver
$ ./_output/azurefileplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5 &
```
> 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:
```
export set AZURE_CREDENTIAL_FILE=/etc/kubernetes/azure.json
```
### Test using csc
Get ```csc``` tool from https://github.com/rexray/gocsi/tree/master/csc
#### 1. Get plugin info
```
$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000
"csi-azurefile" "v0.5.0-alpha"
"file.csi.azure.com" "v0.4.0"
```
#### 2. Create an azure file volume