CSI local Volume Release for Cloud Foundry that follows protocol specified by Container Storage Interface, it packages a csi-localdriver, a csi-localcontroller and a csi-broker for consumption by a volman-enabled Cloud Foundry deployment.
- Get cf-deployment, setup cloud-config and upload stemcell.
cd ~/workspace/
git clone https://github.com/cloudfoundry/cf-deployment.git
cd cf-deployment
bosh -e vbox update-cloud-config ./bosh-lite/cloud-config.yml
bosh -e vbox upload-stemcell https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-trusty-go_agent
- Get csi-local-volume-release, create a bosh release and upload it.
cd ~/workspace/
git clone https://github.com/cloudfoundry/csi-local-volume-release.git
cd csi-local-volume-release
./scripts/update
# create csi-local-volume-release and upload
bosh create-release
bosh -e vbox upload-release
- Deploy csi-local-volume-release with cf
cd ~/workspace/cf-deployment
bosh -e vbox -d cf deploy ./cf-deployment.yml \
--vars-store ./deployment-vars.yml \
-o ./operations/bosh-lite.yml \
-o ./operations/use-latest-stemcell.yml \
-o ../csi-local-volume-release/operations/enable-csi-local-plugin-bosh-lite.yml \
-v system_domain=bosh-lite.com
cd ~/workspace/cf-deployment
cf_password=`cat deployment-vars.yml |grep cf_admin_password|awk '{print $2}'`
broker_password=`cat deployment-vars.yml |grep csi-localbroker-password|awk '{print $2}'`
# login with cf
cf api api.bosh-lite.com --skip-ssl-validation
cf auth admin ${cf_password}
# optionaly delete previous broker:
cf delete-service-broker csilocalfs-broker
# create-service-broker and enable access
cf create-service-broker csilocalfs-broker csi-localbroker ${broker_password} http://csi-localbroker.bosh-lite.com
cf enable-service-access csilocalfs -p free
cd ~/workspace/csi-local-volume-release
pushd ./src/code.cloudfoundry.org/persi-acceptance-tests/
# create a service
cf create-org test_org
cf target -o test_org
cf create-space test_space
cf target -s test_space
cf create-service csilocalfs free pora-volume-instance \
-c '{"name":"csi-local-storage","volume_capabilities":[{"mount":{}}]}'
# push pora and bind service
cf push pora -f ./assets/pora/manifest.yml -p ./assets/pora/ --no-start
cf bind-service pora pora-volume-instance
cf start pora
popd
####Bind Parameters####
- mount: By default, volumes are mounted into the application container in an arbitrarily named folder under /var/vcap/data. If you prefer to mount your directory to some specific path where your application expects it, you can control the container mount path by specifying the
mount
option. The resulting bind command would look something likecf bind-service pora pora-volume-instance -c '{"mount":"/my/path"}'
If you have trouble getting this release to operate properly, try consulting the Volume Services Troubleshooting Page