Easy-Cass-Lab Updated With Cassandra 5.0 RC-1 Support

I’m excited to announce that the latest version of easy-cass-lab now supports Cassandra 5.0 RC-1, which was just made available last week! This update marks a significant milestone, providing users with the ability to test and experiment with the newest Cassandra 5.0 features in a simplified manner. This post will walk you through how to set up a cluster, SSH in, and run your first stress test.

For those new to easy-cass-lab, it’s a tool designed to streamline the setup and management of Cassandra clusters in AWS, making it accessible for both new and experienced users. Whether you’re running tests, developing new features, or just exploring Cassandra, easy-cass-lab is your go-to tool.

How to Install

To get started, you can follow the installation guide using Homebrew, or grab a release from the GitHub project page.

Quick Start Guide

Once installed, setting up your test cluster is straightforward. Follow these steps:

  1. Create a Directory for Your Cluster:

You’ll want to initialize the cluster in an empty directory to keep the local files it creates organized, so start by doing the following:

mkdir my-test-cluster 
cd my-test-cluster
  1. Initialize the Cluster:

Initializing cluster with three instances (-c 3) and one stress instance (-s 1)generates local terraform and setup files. Providing --up immediately starts the instances, but not Cassandra. The last argument is used in the cluster_name:

easy-cass-lab init -c 3 -s 1 --up my-test-cluster 
  1. Use Cassandra 5.0 RC-1:

The use command allows you to pick what version you want. The easy-cass-lab AMI includes several Cassandra versions and has tooling to easily switch between them. Pick the 5.0 RC-1 by doing the following:

easy-cass-lab use 5.0-RC1

Pro Tip: You can see all your available versions by running easy-cass-lab list.

  1. Optional: Edit the config files

If you’re looking to use a new feature like BTI storage format or trie memtables, you’ll need to enable them in the config. Look in the working directory for cassandra.patch.yaml and jvm.options. You’ll notice the cassandra.yaml isn’t the full config. Instead, the options you list here will be merged into the original cassandra.yaml, and the IPs will be updated for each node automatically. This makes it easy to see what changes have been made.

Make the config changes you want, then run:

easy-cass-lab update-config

You can skip this step if you want to use the default configs.

  1. Start the Cluster:

You can now start the cluster. This command will safely start one node at a time to avoid token collision:

easy-cass-lab start

Waiting for each node to start is the most time-consuming part of the process!

You now have a cluster running the Cassandra 5.0 RC-1.

  1. SSH to the cluster

easy-cass-lab drops some extra files in your directory to make your life easy. One of the most useful ones is env.sh which contains helpful aliases to perform common operations quickly.

Source the local environment file, which will create aliases in this terminal session:

source env.sh

The new aliases have the format cX. For example, to SSH to the first Cassandra instance, cassandra0, you can do the following:

c0

Look around and get familiar with the environment. Run exit when you’re finished here.

There is also an alias to connect to the stress instance. Run the following to SSH to the stress instance:

s0

In the next step, we’ll run an easy-cass-stress workload from the stress instance.

  1. Run a stress test

Now that you’re on a stress node, you might as well run a stress test! On the stress node, try the following one-hour load test across 10 million partitions at 50K requests / second. It’ll also pre-populate the table with 20 million writes:

easy-cass-stress run KeyValue -d 1h --populate 20m -p 10m --rate 50k 

Notice you don’t need to tell it where the Cassandra hosts are, it knows it automatically because of the integrated environment.

With these commands, you’ll have a fully functional Cassandra 5.0 RC-1 cluster up and running, with a load test, in no time!

  1. Bonus: Check out your dashboards

If you set up your free AxonOps account when you downloaded easy-cass-lab, your cluster will be automatically registered, and you should see your dashboards. Let’s give a big “THANK YOU!!” to the folks at AxonOps for providing this free service to the community.

8Shut it Down

When you’re done, you can shut down the cluster by doing the following:

easy-cass-lab down

It’ll ask you to confirm your decision, type “yes” to shut it down.

Both easy-cass-lab and easy-cass-stress have a lot of options. I’ve developed these tools to support my work, originally as a consultant at The Last Pickle, and now use them daily both as a consultant and in my training program.

You can see all the options by running easy-cass-lab --help. You can change your instances, use EBS, tag your instances, and even take flamegraphs easily. I’ll share more information about how to do that in a follow-up post.

If you want to watch a video where I use easy-cass-lab to test new 5.0 features, check out this video:

Stay tuned for more updates and detailed guides on leveraging the full potential of Cassandra 5.0 RC-1 with easy-cass-lab. Happy testing!

If you found this post helpful, please consider sharing to your network. I'm also available to help you be successful with your distributed systems! Please reach out if you're interested in working with me, and I'll be happy to schedule a free one-hour consultation.