In Apache Cassandra Lunch #34: Liquibase and Cassandra, we discuss how to use Liquibase with Cassandra and DataStax Astra. The live recording of Cassandra Lunch, which includes a more in-depth discussion and a demo, is embedded below in case you were not able to attend live. If you would like to attend Apache Cassandra Lunch live, it is hosted every Wednesday at 12 PM EST. Register here now!
In Apache Cassandra Lunch #34: Liquibase and Cassandra, we discuss how to use Liquibase with Cassandra and DataStax Astra. We introduce Liquibase; as well as, some basic and advanced concepts to help you get started with Liquibase and Cassandra. In the live recording of Cassandra Lunch #34, we have a live demo where we show you how to use local Liquibase with local DataStax Enterprise. At the time of recording, we were running into some issues trying to demo Liquibase and DataStax Astra on our local machine; however, shortly after the time of recording, the Liquibase team was able to figure out the issue causing the timeouts when trying to run Liquibase with DataStax Astra on our local machine. We will discuss this further below.
If you are not familiar with what Liquibase is and what it can do, it is a database schema change management solution that enables you to manage revisions of your database changes easily. Liquibase provides 3 tiers of a paid version: Pro, Business, and Enterprise, but they also have a community edition, which is the version we used for Cassandra Lunch #34.
Some key basic concepts to know about Liquibase include changelogs, changesets, the DATABASECHANGELOG table, and the DATABASECHANGELOGLOCK table. More on those can be found here. More information about key advanced concepts can also be found here. In the live recording of Cassandra Lunch #34, we discuss the key concepts more in-depth, so be sure to check out the embedded video below!
To get started with Liquibase and Cassandra, you can check out this GitHub repository. In this repository, we cover how you can demo Liquibase with DataStax Astra on Gitpod without having to download and install any software. If you want to install and connect local Liquibase to local Apache Cassandra or DataStax Astra, then we have instructions for those as well.
We recommend first trying out the Liquibase and DataStax Astra on Gitpod method because we have given you the commands that you need to go through the demo without any OS compatibility issues. All you need to do is to hit the “Open in Gitpod” button and go through the setup instructions. The setup instructions for Gitpod and DataStax Astra contain commands to download and extract liquibase, set it to path, change the Java version to 1.8, and download the prerequisite Simba JDBC and Liquibase-Cassandra JARs and place them into the /liquibase/lib
directory. The reason we are changing the Java version to 1.8 is due to the timeout issue as discussed above. If you run into timeout errors using Liquibase, the Liquibase team recommends changing your Java version to version 1.8, which I was able to confirm. We do this for you on the Gitpod environment; however, if you are using Liquibase locally and you run into timeout issues, then you will need to change the Java version to 1.8 on your local machine yourself. Hence, why we recommend first trying it out on Gitpod so you do not have to worry about that.
But again, if you want to setup Liquibase locally and do this demo locally, then there are instructions for it in the repository. Liquibase does provide an installer where it can set Liquibase in PATH, so you do not have to do it manually.
We will wrap it up with a huge thank you to the Liquibase team for being extremely responsive and helping debug the issues that we were running into! Stay up-to-date with the Liquibase team by following their Twitter account!
If you want a more in-depth discussion about Liquibase and how we can use it with Cassandra, the live recording of Apache Cassandra Lunch #34 is embedded below. Don’t forget to like and subscribe while you are there! If you missed last week’s Apache Cassandra Lunch #33: Cassandra Deployment – Ansible and Terraform with Cassandra, don’t forget to check it out as well! If you want to attend Cassandra Lunch live every Wednesday at 12 PM EST, then you can register here now! Additionally, the playlist with all the previously recorded Cassandra Lunches is available here.
Additional Docs
Cassandra.Link is a knowledge base that we created for all things Apache Cassandra. Our goal with Cassandra.Link was to not only fill the gap of Planet Cassandra, but to bring the Cassandra community together. Feel free to reach out if you wish to collaborate with us on this project in any capacity.
We are a technology company that specializes in building business platforms. If you have any questions about the tools discussed in this post or about any of our services, feel free to send us an email!