Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

cloudfoundry-attic/csi-local-volume-release

Repository files navigation

csi-local-volume-release

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.

Deploying to Bosh-Lite

Pre-requisites

  1. Install and start BOSH-Lite, following its document.

  2. Install bosh v2 according to this document.

Deploy csi-local-volume-release using cf-deployment

  1. 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
  1. 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
  1. 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

Register local-broker

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

Deploy pora and test volume services

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 like cf bind-service pora pora-volume-instance -c '{"mount":"/my/path"}'

Troubleshooting

If you have trouble getting this release to operate properly, try consulting the Volume Services Troubleshooting Page

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published