Using Altoros Cassandra for VMware Tanzu

This topic describes how to use Altoros Cassandra for VMware Tanzu after it has been installed.

Use Altoros Cassandra for VMware Tanzu with an App

To use Altoros Cassandra for VMware Tanzu with an app, follow the procedures in this section to create a service instance and bind the service instance to your app. For more information about managing service instances, see Managing Service Instances with the cf CLI.

View the Service

After the tile has been installed, apache-cassandra and its service plans appear in your Marketplace. Run cf marketplace to see the service listing.

$ cf marketplace
Getting services from marketplace in org test / space test as admin...

service            plans   description
apache-cassandra   free    Open source distributed database management system

Create a Service Instance

Use cf create-service to provision a keyspace.

$ cf create-service apache-cassandra free apache-cassandra

Check the creation status using cf services. This displays a list of all your service instances. To check the status of a specific service instance, run cf service NAME-OF-YOUR-SERVICE.

Bind the Service Instance to an App

After you have created your keyspace, run cf bind-service to bind the service to your app.

$ cf bind-service sample-app apache-cassandra

Restage or Restart Your App

To enable your app to access the service instance, run cf restage or cf restart to restage or restart your app.

Obtain Service Instance Access Credentials

After you have bound your service instance to your app, you can find the credentials of your Apache Cassandra user in the environment variables of the app.

Run cf env APP-NAME to display environment variables. The credentials are listed under the VCAP_SERVICES key.

$ cf env sample-app
Getting env variables for app sample-app in org test / space test as admin...

  "apache-cassandra": [
    "credentials": {
     "cql_port": 9042,
     "keyspace": "cf324d37765887be691263",
     "nodes": [
     "password": "dfa55d87b422d3fbc308",
     "thrift_port": 9160,
     "username": "cf-e01038e30d0f68441d41"
    "label": "apache-cassandra",
    "name": "apache-cassandra",
    "plan": "free",
    "provider": null,
    "syslog_drain_url": null,
    "tags": [
    "volume_mounts": []

You can use these parameters to connect to Apache Cassandra.

Delete an Altoros Cassandra for VMware Tanzu Service Instance

WARNING! Before deleting a service instance, you must back up the data stored in your keyspace. This operation cannot be undone, and all the data is lost when the service is deleted.

Follow the instructions below to unbind your service instance from all apps and delete it.

List Available Services

Run cf services to list your available services.

$ cf services

Getting services in org test / space test as admin...

name               service             plan    bound apps   last operation
apache-cassandra   apache-cassandra    free    sample-app   create succeeded

This example shows that apache-cassandra is bound to the sample-app app.

Unbind a Service Instance

Run cf unbind to unbind the service from your app:

$ cf unbind-service sample-app apache-cassandra

Delete a Service Instance

Run cf delete-service to delete the service.

  $ cf delete-service apache-cassandra

Run the cf services command to check the deletion status.