No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This is a service broker written in Go Language for Cloud Foundry. This service broker supports creating Distributed File Systems provided by a Ceph cluster.

Getting Started

Get Latest Executable: cephbroker

Assuming you have a valid Golang 1.6 or later installed for your system, you can quickly build and get the latest go_service_broker executable by running the following go command:

$ go get

This will build and place the cephbroker executable built for your operating system in your $GOPATH/bin directory.

Working with a specific Ceph Cluster

Running against a cephfs cluster requires a keyring file to allow fuse-mounts to the remote cluster. If you are deploying the ceph broker as a bosh job, then the keyring file is generated by the job's install scripts, and you will need to provide your keyring in a stub file before manifest generation. If you plan to start the broker manually, you will need to create a keyring file to pass as an argument. Keyring file contents should look something like this:

           key = REDACTED
           key = REDACTED
           key = REDACTED
           key = REDACTED
           auid = 0
           caps mds = "allow"
           caps mon = "allow *"
           caps osd = "allow *"

Running Broker

The broker can be ran in one of two modes: locally or as a bosh job


Run the executable to start the service broker.

$ cephbroker -listenAddr= -mds= -keyringFile=/etc/path/blah.keyring [-serviceName=cephfs] [-serviceId=cephfs-service-guid] [-planName=free] [-planId=free-plan-guid] [-planDesc="free ceph filesystem"] [-baseMountPath=/tmp/share] [-baseRemoteMountPath=/]


  • listenAddr: host:port to serve cephfs service broker API
  • mds: host:port for ceph mds server
  • keyringFile: keyring file for ceph authentication
  • configPath: config directory to store book-keeping info
  • serviceName: name of the service to register with cloud controller
  • serviceId: ID of the service to register with cloud controller
  • planName: name of the service plan to register with cloud controller
  • planId: ID of the service plan to register with cloud controller
  • planDesc: description of the service plan to register with cloud controller
  • baseMountPath: local directory to mount within on the service broker host
  • baseRemoteMountPath: directory to mount on ceph file system server

As a Bosh Job

To deploy the ceph filesystem and the cephfs broker using bosh, you will need to git clone the cephfs-bosh-release repository.

Follow the installation instructions for that bosh release, which also includes this broker.

Using Broker

Prerequisites: In order to use this service broker you must have a running cloudfoundry instance deployed with Diego and volume services enabled. You must also have a cephfs file system installed, and a cephdriver bosh job colocated on the diego cell. The easiest way to accomplish these prerequisites is to follow the installation instructions for cephfs-bosh-release

Assuming that the file system and driver are properly installed, you can create a service instance and bind it to your application just as you would with any other cloudfoundry service:

cf create-service-broker <your broker name> <username> <password> <url of your running service broker>
cf enable-service-access cephfs -o <your cf org name>
cf create-service <your broker name> <your service plan name> <your volume name>
cf bind-service <your application name> <your volume name> -c {"path": "<container path>"}
cf restage <your application name>

This will mount your volume to <container path> for your application to use.


The ceph broker allows multiple service instances to be created for a single broker/filesystem pair. We do this by allocating a GUID for each service instance, and creating a subdirectory of the baseRemoteMountPoint to store content for each instance. The driver then uses that subdirectory as the remote mount point when it mounts the volume into the cell.

We persist state information for the services using the volume in a file on the configPath.


cephbroker is licensed under the Apache 2.0 OSS license.