Apache Cassandra Lunch #33: Cassandra Deployment – Ansible and Terraform with Cassandra

In case you missed it, this blog post is a recap of Cassandra Lunch #33, covering automation for Cassandra deployment. We discuss using Terraform and Ansible to set up the infrastructure for and handle the provisioning of a new Cassandra cluster. The live recording of Cassandra Lunch, which includes a more in-depth discussion, is also 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!

Overview

The purpose of using Terraform and Ansible in Cassandra deployment is to reap the benefits of automation. Automated deployment is more repeatable, and takes less time than manual deployment. The procedure for automated Cassandra deployment is split into several different tasks. These tasks then split up and given to separate tools. Tasks suited for Terraform go to Terraform. Others go to Ansible or OpsCenter Lifecycle Manager. All of these tools we have mentioned previously in Apache Cassandra Lunch #22 on Cassandra Deployment and Administration Tools. OpsCenter LCM only works for DSE clusters. So, when working with open source Cassandra, the tasks associated with it are distributed out to other tools.

Terraform is useful for infrastructure automation. It handles the creation of systems on cloud platforms and manages network access between them. Ansible handles the installation and management of operating systems on those machines, as well as connections to other cloud technologies, like Amazon S3 for backups. In the past, we used Opscenter to handle the installation of DSE on those systems, as well as things like upgrades and restarts. Ansible can handle those tasks when working with open source Cassandra. 

The necessary deployment tasks fit neatly into 4 categories: Infrastructure, Installation, Configuration, and Maintenance. Different tools are useful for different parts of this procedure, even if they can do multiple tasks. Terraform is most useful for working on the infrastructure level, sitting on top of cloud platforms like AWS and GCP setting up the foundations of our system. Ansible is potentially useful for infrastructure as well but works better for the Installation and Configuration tiers. 

Resources

The current state of Anant’s deployment playbook is based on publicly available resources found previously. Working with these resources helped us develop our own set of tools to use Terraform and Ansible for Cassandra deployment.

Cassandra.Link

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!


Join Anant's Newsletter

Subscribe to our monthly newsletter below and never miss the latest Cassandra and data engineering news!