Last active
December 4, 2017 23:05
-
-
Save clintkitson/6c942284237064f0f7f349f32d95d87c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#updated 12/4 | |
# centos pre-req for git | |
yum install -y git | |
download go 1.9.2 | |
tar -zxvf | |
mv go /usr/local/go | |
export PATH=$PATH:/usr/local/go/bin:/go/bin | |
mkdir -p /go/src/github.com/kubernetes-csi | |
export GOPATH=/go | |
go install github.com/coreos/etcd | |
mkdir -p /go/src/github.com/kubernetes | |
cd /go/src/github.com/kubernetes | |
git clone https://github.com/kubernetes/kubernetes | |
# make sure to fetch and reset to head | |
FEATURE_GATES=CSIPersistentVolume=true RUNTIME_CONFIG="storage.k8s.io/v1alpha1=true" LOG_LEVEL=5 hack/local-up-cluster.sh | |
kubectl annotate node 127.0.0.1 'csi.volume.kubernetes.io/nodeid={"com.thecodeteam.vfs":"com.thecodeteam.vfs"}' --overwrite=true | |
## fire up csi-vfs plugin | |
## this should run on kubelets and controller | |
mkdir -p /var/lib/kubelet/plugins/com.thecodeteam.vfs/ | |
cd /go/src/github.com/thecodeteam | |
git clone https://github.com/thecodeteam/csi-vfs | |
cd csi-vfs | |
go build . | |
CSI_ENDPOINT=/var/lib/kubelet/plugins/com.thecodeteam.vfs/csi.sock ./csi-vfs | |
mkdir -p /go/src/github.com/kubernetes-csi | |
## fire up provisioner - my branch has updated examples | |
## this should run on controller | |
## own branch due to some custom examples | |
cd /go/src/github.com/kubernetes-csi/ | |
git clone https://github.com/clintkitson/external-provisioner | |
cd external-provisioner | |
git checkout csi | |
make provisioner | |
_output/csi-provisioner -kubeconfig /var/run/kubernetes/admin.kubeconfig -alsologtostderr -provisioner csi-vfs -csi-address /var/lib/kubelet/plugins/com.thecodeteam.vfs/csi.sock | |
## fire up attacher - bug in k8s right now causes need to hardcode to driver name as provided by plugin (com.thecodeteam.vfs) inside of code | |
cd /go/src/github.com/kubernetes-csi | |
git clone https://github.com/kubernetes-csi/external-attacher/ | |
cd external-attacher | |
make csi-attacher | |
./csi-attacher -kubeconfig /var/run/kubernetes/admin.kubeconfig -v 5 -csi-address /var/lib/kubelet/plugins/com.thecodeteam.vfs/csi.sock | |
cd /go/src/github.com/kubernetes-csi/external-provisioner/examples | |
kubectl create -f sc.yaml | |
#make sure you are doing a single ReadWriteOnce with this driver | |
kubectl create -f pvc2.yaml | |
kubectl create -f pod.yaml | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment