Update stor4nfv install scripts according to opensds aruba release
[stor4nfv.git] / tutorials / csi-plugin.md
1 ## Prerequisite ##\r
2 \r
3 ### ubuntu\r
4 * Version information\r
5 \r
6         ```\r
7         root@proxy:~# cat /etc/issue\r
8         Ubuntu 16.04.2 LTS \n \l\r
9         ```\r
10 \r
11 ### docker\r
12 * Version information\r
13 \r
14         ```\r
15         root@proxy:~# docker version\r
16         Client:\r
17          Version:      1.12.6\r
18          API version:  1.24\r
19          Go version:   go1.6.2\r
20          Git commit:   78d1802\r
21          Built:        Tue Jan 31 23:35:14 2017\r
22          OS/Arch:      linux/amd64\r
23         \r
24         Server:\r
25          Version:      1.12.6\r
26          API version:  1.24\r
27          Go version:   go1.6.2\r
28          Git commit:   78d1802\r
29          Built:        Tue Jan 31 23:35:14 2017\r
30          OS/Arch:      linux/amd64\r
31         ```\r
32 \r
33 ### [kubernetes](https://github.com/kubernetes/kubernetes) local cluster\r
34 * You can startup `v1.10.0` k8s local cluster by executing commands blow:\r
35 \r
36         ```\r
37         cd $HOME\r
38         git clone https://github.com/kubernetes/kubernetes.git\r
39         cd $HOME/kubernetes\r
40         git checkout v1.10.0\r
41         make\r
42         echo alias kubectl='$HOME/kubernetes/cluster/kubectl.sh' >> /etc/profile\r
43         ALLOW_PRIVILEGED=true FEATURE_GATES=CSIPersistentVolume=true,MountPropagation=true RUNTIME_CONFIG="storage.k8s.io/v1alpha1=true" LOG_LEVEL=5 hack/local-up-cluster.sh\r
44         ```\r
45 \r
46 ### [opensds](https://github.com/opensds/opensds) local cluster\r
47 * For testing purposes you can deploy OpenSDS refering to [OpenSDS Cluster Installation through Ansible](https://github.com/opensds/opensds/wiki/OpenSDS-Cluster-Installation-through-Ansible).\r
48 \r
49 ## Testing steps ##\r
50 \r
51 * Change the workplace\r
52 \r
53         ```\r
54         cd /opt/opensds-k8s-linux-amd64\r
55         ```\r
56 \r
57 * Create example nginx application\r
58 \r
59         ```\r
60         kubectl create -f csi/examples/kubernetes/nginx.yaml\r
61         ```\r
62 \r
63         This example will mount a opensds volume into ```/var/lib/www/html```.\r
64 \r
65         You can use the following command to inspect into nginx container to verify it.\r
66 \r
67         ```\r
68         docker exec -it <nginx container id> /bin/bash\r
69         ```\r
70 \r
71 ## Clean up steps ##\r
72 \r
73 Clean up example nginx application and opensds CSI pods by the following commands.\r
74 \r
75 ```\r
76 kubectl delete -f csi/examples/kubernetes/nginx.yaml\r
77 kubectl delete -f csi/deploy/kubernetes\r
78 ```\r