DISCLAIMER This is a very early version of Cassandra-on-Mesos framework. This document, code behavior, and anything else may change without notice and/or break older installations.

Setting Up And Running Cassandra-Mesos

To set up Cassandra-Mesos locally for development purposes skip ahead to the Local Setup section.

Deploying Cassandra-Mesos to a DCOS Cluster

Note that Cassandra-Mesos is not ready to be used for production workloads. Please do not use it for business critical applications just yet.


  • Mesosphere DCOS cluster.
  • Mesosphere DCOS CLI installed.


  1. Update your local cache of the package repository:

      dcos package update
  2. Install the Cassandra datacenter service:

      dcos package install cassandra
  3. Verify that the service was successfully installed:

      dcos package list-installed

For more information about the DCOS, see the Mesosphere docs.

Local Setup

Cassandra-on-Mesos setup is simple on a Linux machine or Mac. Windows is not currently supported.


Note for Mac users

To run multiple slaves by using local IP addresses like or, you must first make them available:

sudo ifconfig lo0 alias up
sudo ifconfig lo0 alias up
sudo ifconfig lo0 alias up

Configuring and starting

This document assumes that you have created a directory mkdir ~/cassandra-on-mesos and your working directory is cd ~/cassandra-on-mesos.


  1. Create a new directory zookeeper and cd into it.
  2. Unpack ZooKeeper tarball in the zookeeper directory.
  3. Create a new directory named data.
  4. Verify that the directory structure now looks like this:
   ~/cassandra-on-mesos/zookeeper$ ls -1
  1. Create a file that is named zoo.cfg in zookeeper-3.4.6/conf with the following content:

Replace the dataDir value to point to your installation directory. 1. Start ZooKeeper

   ~/cassandra-on-mesos/zookeeper$ cd zookeeper-3.4.6
   ~/cassandra-on-mesos/zookeeper/zookeeper-3.4.6$ bin/zkServer.sh start


  1. Create a directory mesosand cd into it.
  2. If you've built Mesos from source, go into the build directory.
  3. Define a base working directory for the master and the slaves - for example /tmp/mesos (use /private/tmp/mesos on Mac).
  4. Now start a bunch of processes - one Mesos master and minimally one Mesos slave.
   ./bin/mesos-master.sh --ip=${MY_IP} --work_dir=${BASEDIR}/master --zk=zk://$MY_IP:2181/mesos --quorum=1 &
   ./bin/mesos-slave.sh --master=${MY_IP}:5050 --ip=${MY_IP} --work_dir=${BASEDIR}/slave1 --resources='ports:[31000-32000,7000-7001,7199-7199,9042-9042,9160-9160]' &
   ./bin/mesos-slave.sh --master=${MY_IP}:5050 --ip=${MY_IP_2} --work_dir=${BASEDIR}/slave2 --resources='ports:[31000-32000,7000-7001,7199-7199,9042-9042,9160-9160]' &
   ./bin/mesos-slave.sh --master=${MY_IP}:5050 --ip=${MY_IP_3} --work_dir=${BASEDIR}/slave3 --resources='ports:[31000-32000,7000-7001,7199-7199,9042-9042,9160-9160]' &
  1. Verify that Mesos is running by opening in your browser.


Cassandra-on-Mesos from a shell prompt
  1. Open the file dev-run.bash and update the variables as necessary.
  2. Execute dev-run.bash.
Cassandra-on-Mesos from an IDE
  1. Run git clone https://github.com/mesosphere/cassandra-mesos.git.
  2. Open your IDE, create a project and import it using the Maven model.
  3. Define environment variables in the run configuration of your IDE for io.mesosphere.mesos.frameworks.cassandra.Main:
   # Number of Cassandra nodes to start
   # Number of seed nodes
   # (Optional) Change the default value of 60 seconds to 10 seconds on development systems
   # (Optional) Change the default value of 120 seconds to 0 for local test and development systems
   # The port on which the REST API is available
   # Absolute path of libmesos 
   # Absolute path where of the Cassandra-on-Mesos executor
   # Absolute path to the JRE you downloaded
   # Absolute path to the Apache Cassandra you downloaded

Start from scratch

  1. Kill all Java processes (make sure you don't accidentally kill your IDE's processes).
  2. Kill all Mesos processes, scrub the base working directory.
  3. Stop ZooKeeper, scrub the data directory.
  4. Start ZooKeeper, Mesos master, Mesos slaves, and Cassandra-on-Mesos framework.