CloudFoundry Cassandra Service
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.
Add 'cassandra_node' and 'cassandra_gateway' to the
componentshash located in the file
Add the Cassandra service token to the
builtin_serviceshash 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:
builtin_services: redis: token: changeredistoken mongodb: token: changemongodbtoken mysql: token: changemysqltoken cassandra: token: cassandratoken ```
On the Service host add the line
File.expand_path("../../cassandra/config/cassandra_gateway.yml", __FILE__)to the
default_configshash found in the file
Clone vcap_cassandra into
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
cassandraexecutable on the sytem path ($PATH). This value is configurable via the
runtime_pathproperty in vcap_cassandra/config/cassandra_node.yml. The property value can either remain as is in which case you must add the Cassandra distributiion
bindirectory to the $PATH or it can configured to be an absolute path pointing to the
cassandraexecutable of your installation.
Clone, build and deploy the Cassandra security module.
- 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] 
- Copy the jar artifact to $CASSANDRA_INSTALL_LOCATION/lib
- 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
On the service host add Cassandra to the
nodeloops in the file
Bundle the necessary dependencies for the Cassandra node and gateway by executing the command
source $HOME/.cloudfoundry_deployment_profile && bundle packagefrom the
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 servicesfrom a client targeted at the newly configured Cloud Foundry instance should reveal Cassandra as a new services.
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 firstname.lastname@example.org.
Copyright 2013 - CloudCredo Ltd.