cloudfoundry/local-volume-release

Name: local-volume-release

Owner: Cloud Foundry

Description: null

Created: 2016-06-14 17:33:16.0

Updated: 2018-05-07 23:27:19.0

Pushed: 2018-05-07 23:27:18.0

Homepage: null

Size: 189

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

local volume release

This is a bosh release that packages a localdriver and a localbroker for consumption by a Cloud Foundry deployment.

local-volume-release is a “dummy” volume release that exposes ephemeral storage on the diego cell as a volume in cloud-foundry. As such it is really only suitable for experimenting with apps that require volumes. The easiest way to consume local-volume-release is to install PCFDev which comes with local-volume-release already included.

The instructions below will help you should you desire to install local-volume-release into your own Cloud Foundry deployment.

Deploying local-volume-release with Cloud Foundry

Pre-requisites
  1. Install Cloud Foundry, or start from an existing CF deployment. If you are starting from scratch, the article Overview of Deploying Cloud Foundry provides detailed instructions.

  2. Install GO:

    r ~/workspace ~/go
    /workspace
     https://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz
     tar -C /usr/local -xzf go1.9.linux-amd64.tar.gz
     'export GOPATH=$HOME/go' >> ~/.bashrc
     'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >> ~/.bashrc
     $SHELL
    
  3. Install direnv:

    r -p $GOPATH/src/github.com/direnv
    clone https://github.com/direnv/direnv.git $GOPATH/src/github.com/direnv/direnv
    d $GOPATH/src/github.com/direnv/direnv
    make
    sudo make install
    
     'eval "$(direnv hook bash)"' >> ~/.bashrc
     $SHELL
    
Create and Upload this Release
  1. Check out local-volume-release (master branch) from git:

    /workspace
    clone https://github.com/cloudfoundry/local-volume-release.git
    /workspace/local-volume-release
    nv allow
    checkout master
    ripts/update
     -n create-release --force 
     -n upload-release
    
Redeploy Cloud Foundry with local-volume-release enabled
  1. You should have it already after deploying Cloud Foundry, but if not clone the cf-deployment repository from git:

     ~/workspace
    t clone https://github.com/cloudfoundry/cf-deployment.git
     ~/workspace/cf-deployment
    
  2. Now redeploy your cf-deployment while including the local-volume-release ops file:

    sh -e my-env -d cf deploy cf.yml \
    eployment-vars.yml \ 
    ./efs-volume-release/operations/enable-local-volume-service.yml
    

Note: the above command is an example, but your deployment command should match the one you used to deploy Cloud Foundry initially, with the addition of a -o ../local-volume-release/operations/enable-local-volume-service.yml option.

Your CF deployment will now have a running service broker and volume drivers, ready to create and mount local “volumes”. Unless you have explicitly defined a variable for your service broker password, BOSH will generate one for you.
If you let BOSH generate the efsbroker password for you, you can find the password for use in broker registration via the bosh interpolate command:

 int deployment-vars.yml --path /local-broker-password
Register local-broker
reate-service-broker localbroker admin <PASSWORD> http://local-broker.YOUR.DOMAIN.com
nable-service-access local-volume
Deploy pora and test volume services
reate-service local-volume free-local-disk local-volume-instance
ush pora -f ./assets/pora/manifest.yml -p ./assets/pora/ --no-start
ind-service pora local-volume-instance
tart pora
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
Test the app to make sure that it can access your volume

Troubleshooting

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


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.