Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Cassandra Support for Cloudfoundry
branch: master
Failed to load latest commit information.
bin Use a mixture of host and hostname as it seems CF requires this!
config Added support for limiting the number of instances per host
lib/cassandra_service Updated logging
resources Listen_address as <%=host%> as I believe having its value as localhos…
spec Cleaned up the host and hostname confusion. Using the 2 interchangabl…
.gitignore Intial commit of the Cassandra CF support
Gemfile.lock Added newly generated lock
LICENSE Added Apache 2 licence Updated configuration
Rakefile Intial commit of the Cassandra CF support
travis.yml Added travis config.

CloudFoundry Cassandra Service

This code represent the adapter layer between Cassandra and CloudFoundry.

Adding a service.

We have stuck as closely as possible to the Cloud Foundry conventions of adding a service. Currently we support the addition of Cassandra support through BOSH and dev_setup.


The steps for adding Cassandra as a service using Chef as briefly described below, for the official documentation on adding services to Cloud Foundry See Adding a System Service to OSS Cloud Foundry. Chef.

  1. Add 'cassandra_node' and 'cassandra_gateway' to the components hash located in the file $CF_HOME/cloudfoundry/.deployments/devbox/config/vcap_components.json

  2. Add the Cassandra service token to the builtin_services hash found in the file $CF_HOME/cloudfoundry/.deployments/devbox/config/cloud_controller.yml. The cassandra token by default is 'cassandra_token'. The Cassandra built in service should look like:

                     token: changeredistoken
                     token: changemongodbtoken
                     token: changemysqltoken
                     token: cassandratoken
  3. On the Service host add the line File.expand_path("../../cassandra/config/cassandra_gateway.yml", __FILE__) to the default_configs hash found in the file $CF_HOME/cloudfoundry/vcap/services/tools/misc/bin/nuke_service.rb

  4. Clone vcap_cassandra into $CF_HOME/cloudfoundry/vcap/services/

  5. Download and install a Cassandra distribution. We have tested vcap_cassandra against Datastax distribution versions 1.1.6 and 1.1.7 which are available to download from the Datastax community page. We recommend that one of these versions is used for Cloud Foundry. Where Cassandra is installed is not too important as by default when provisioning a new service the cassandra_node will look for the cassandra executable on the sytem path ($PATH). This value is configurable via the runtime_path property in vcap_cassandra/config/cassandra_node.yml. The property value can either remain as is in which case you must add the Cassandra distributiion bin directory to the $PATH or it can configured to be an absolute path pointing to the cassandra executable of your installation.

  6. Clone, build and deploy the Cassandra security module.

    1. Clone and build the Cassandra Cloud Foundry security module. You can find the code and instructions on how to build the module at [cassandra_chastity] [8]
    2. Copy the jar artifact to $CASSANDRA_INSTALL_LOCATION/lib
    3. Set authenticator and authority properties in $CASSANDRA_DEPLOYMENT/conf/cassandra.yaml to the below values:
      • authenticator: com.cloudcredo.cassandra.auth.CloudFoundryAuthenticator
      • authority: org.apache.cassandra.auth.AllowAllAuthority
  7. On the service host add Cassandra to the gateway and node loops in the file $CF_HOME/cloudfoundry/vcap/dev_setup/lib/vcap_components.rb

  8. Bundle the necessary dependencies for the Cassandra node and gateway by executing the command source $HOME/.cloudfoundry_deployment_profile && bundle package from the $CF_HOME/cloudfoundry/vcap/services/cassandra directory

  9. Restart the cloud controller using the command $CF_HOME/cloudfoundry/vcap/dev_setup/bin/vcap_dev restart. A Cassandra node and gateway should now appear in the list of running components. Running the command vmc services from a client targeted at the newly configured Cloud Foundry instance should reveal Cassandra as a new services.

  10. Code to test your deployment can be found at cassandra-test-jvm-client along with instructions on how to build and deploy to your CloudFoundry instance.


A Bosh installation has also been created that allows Cassandra to be seamlessly deployed in to a bosh deployed CloudFoundry For more information on our Bosh deployment please email

Copyright 2013 - CloudCredo Ltd.

Something went wrong with that request. Please try again.