Update csi-dev.md

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

View File

@ -1,22 +1,37 @@
# Azure file CSI driver development guide # Azure file CSI driver development guide
- Clone repo
```
$ mkdir -p $GOPATH/src/sigs.k8s.io/
$ git clone https://github.com/kubernetes-sigs/azurefile-csi-driver $GOPATH/src/sigs.k8s.io/azurefile-csi-driver
```
- Build azure file plugin - Build azure file plugin
``` ```
$ cd $GOPATH/src/sigs.k8s.io/azurefile-csi-driver
$ make azurefile $ make azurefile
``` ```
> 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:
- Run unit test
``` ```
export set AZURE_CREDENTIAL_FILE=/etc/kubernetes/azure.json $ make unit-test
``` ```
- Run test
- Build continer image and push to dockerhub
``` ```
$ make test export REGISTRY=<dockerhub-alias>
make azurefile-container
make push-latest
``` ```
### Start CSI driver ### Start CSI driver
``` ```
$ ./_output/azurefileplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5 $ ./_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 ### Test using csc
Get ```csc``` tool from https://github.com/rexray/gocsi/tree/master/csc Get ```csc``` tool from https://github.com/rexray/gocsi/tree/master/csc