|
7 | 7 | $ make
|
8 | 8 | ```
|
9 | 9 |
|
| 10 | +### Set endpoint |
| 11 | +``` |
| 12 | +$ endpoint=unix:///tmp/csi.sock # unix (default) |
| 13 | +$ #endpoint=tcp://127.0.0.1:10000 # tcp |
| 14 | +``` |
| 15 | + |
10 | 16 | ### Start Hostpath driver
|
11 | 17 | ```
|
12 |
| -$ sudo ./bin/hostpathplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5 |
| 18 | +$ sudo ./bin/hostpathplugin --endpoint $endpoint --nodeid CSINode -v=5 |
13 | 19 | ```
|
14 | 20 |
|
15 | 21 | ### Test using csc
|
16 | 22 | Get ```csc``` tool from https://github.com/rexray/gocsi/tree/master/csc
|
17 | 23 |
|
18 | 24 | #### Get plugin info
|
19 | 25 | ```
|
20 |
| -$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000 |
21 |
| -"csi-hostpath" "0.1.0" |
| 26 | +$ csc identity plugin-info --endpoint $endpoint |
| 27 | +"hostpath.csi.k8s.io" "v1.x.x-xx-xxx" |
22 | 28 | ```
|
23 | 29 |
|
24 | 30 | #### Create a volume
|
25 | 31 | ```
|
26 |
| -$ csc controller new --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeName |
| 32 | +$ csc controller new --endpoint $endpoint --cap 1,block CSIVolumeName |
27 | 33 | CSIVolumeID
|
28 | 34 | ```
|
29 | 35 |
|
30 | 36 | #### Delete a volume
|
31 | 37 | ```
|
32 |
| -$ csc controller del --endpoint tcp://127.0.0.1:10000 CSIVolumeID |
| 38 | +$ csc controller del --endpoint $endpoint CSIVolumeID |
33 | 39 | CSIVolumeID
|
34 | 40 | ```
|
35 | 41 |
|
36 | 42 | #### Validate volume capabilities
|
37 | 43 | ```
|
38 |
| -$ csc controller validate-volume-capabilities --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeID |
| 44 | +$ csc controller validate-volume-capabilities --endpoint $endpoint --cap 1,block CSIVolumeID |
39 | 45 | CSIVolumeID true
|
40 | 46 | ```
|
41 | 47 |
|
42 | 48 | #### NodePublish a volume
|
43 | 49 | ```
|
44 |
| -$ csc node publish --endpoint tcp://127.0.0.1:10000 --cap 1,block --target-path /mnt/hostpath CSIVolumeID |
| 50 | +$ csc node publish --endpoint $endpoint --cap 1,block --target-path /mnt/hostpath CSIVolumeID |
45 | 51 | CSIVolumeID
|
46 | 52 | ```
|
47 | 53 |
|
48 | 54 | #### NodeUnpublish a volume
|
49 | 55 | ```
|
50 |
| -$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/hostpath CSIVolumeID |
| 56 | +$ csc node unpublish --endpoint $endpoint --target-path /mnt/hostpath CSIVolumeID |
51 | 57 | CSIVolumeID
|
52 | 58 | ```
|
53 | 59 |
|
54 | 60 | #### Get NodeInfo
|
55 | 61 | ```
|
56 |
| -$ csc node get-info --endpoint tcp://127.0.0.1:10000 |
| 62 | +$ csc node get-info --endpoint $endpoint |
57 | 63 | CSINode
|
58 | 64 | ```
|
0 commit comments