4 * Version information
\r
7 root@proxy:~# cat /etc/issue
\r
8 Ubuntu 16.04.2 LTS \n \l
\r
12 * Version information
\r
15 root@proxy:~# docker version
\r
21 Built: Tue Jan 31 23:35:14 2017
\r
22 OS/Arch: linux/amd64
\r
29 Built: Tue Jan 31 23:35:14 2017
\r
30 OS/Arch: linux/amd64
\r
33 ### [kubernetes](https://github.com/kubernetes/kubernetes) local cluster
\r
34 * You can startup the lastest k8s local cluster by executing commands blow:
\r
38 git clone https://github.com/kubernetes/kubernetes.git
\r
41 echo alias kubectl='$HOME/kubernetes/cluster/kubectl.sh' >> /etc/profile
\r
42 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
45 ### [opensds](https://github.com/opensds/opensds) local cluster
\r
46 * For testing purposes you can deploy OpenSDS referring the [OpenSDS Cluster Installation through Ansible](https://github.com/opensds/opensds/wiki/OpenSDS-Cluster-Installation-through-Ansible) wiki. Besides, you need to deploy opensds csi plugin refering to ```nbp-ansible/README.md```.
\r
50 * Change the workplace
\r
53 cd /opt/opensds-k8s-v0.1.0-linux-amd64
\r
56 * Configure opensds endpoint IP
\r
59 vim csi/deploy/kubernetes/csi-configmap-opensdsplugin.yaml
\r
62 The IP (127.0.0.1) should be replaced with the opensds actual endpoint IP.
\r
67 name: csi-configmap-opensdsplugin
\r
69 opensdsendpoint: http://127.0.0.1:50040
\r
72 * Create opensds CSI pods.
\r
75 kubectl create -f csi/deploy/kubernetes
\r
78 After this three pods can be found by ```kubectl get pods``` like below:
\r
80 - csi-provisioner-opensdsplugin
\r
81 - csi-attacher-opensdsplugin
\r
82 - csi-nodeplugin-opensdsplugin
\r
84 You can find more design details from
\r
85 [CSI Volume Plugins in Kubernetes Design Doc](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/container-storage-interface.md)
\r
87 * Create example nginx application
\r
90 kubectl create -f csi/examples/kubernetes/nginx.yaml
\r
93 This example will mount a opensds volume into ```/var/lib/www/html```.
\r
95 You can use the following command to inspect into nginx container to verify it.
\r
98 docker exec -it <nginx container id> /bin/bash
\r
101 ## Clean up steps ##
\r
103 Clean up example nginx application and opensds CSI pods by the following commands.
\r
106 kubectl delete -f csi/examples/kubernetes/nginx.yaml
\r
107 kubectl delete -f csi/deploy/kubernetes
\r