Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

9/9/2019

Reading time:N/A min

rackerlabs/ansible-cassandra

by John Doe

Installs and configures N number of Cassandra nodes in a cluster on Rackspace Public Cloud & (AWS WIP)RequirementsAnsible > v1.8Rackspace Public Cloud accountConfiguration and filesconfig/group_vars/all: contains global variables for cluster settingsprov.sh: Builds the entire stack -->\ ansible-playbook config/db-server.yml -f 20\ ansible-playbook -i scripts/rax.py config/db.yml -f 20\ ansible -vvvv -u root -i scripts/rax.py db -m ping -f 20ping.sh: Pings all nodes with verbose outputdelete.sh: Deletes all nodes in cluster with name defined in "all" group_vars.Gotcha's and bugsif a node fails to build on the initial run, you can rerun the same prov.sh but will need to cleanup the directories and restart cassandra again ansible -vvvv -u root -i scripts/rax.py ds_db -m shell -a "rm -rf /var/lib/cassandra/*" -f 20 ansible -vvvv -u root -i scripts/rax.py ds_db -m shell -a "service cassandra restart" -f 20Installation

Illustration Image

Installs and configures N number of Cassandra nodes in a cluster on Rackspace Public Cloud & (AWS WIP)

Requirements

  1. Ansible > v1.8
  2. Rackspace Public Cloud account

Configuration and files

  1. config/group_vars/all: contains global variables for cluster settings

  2. prov.sh: Builds the entire stack -->
    \ ansible-playbook config/db-server.yml -f 20
    \ ansible-playbook -i scripts/rax.py config/db.yml -f 20
    \ ansible -vvvv -u root -i scripts/rax.py db -m ping -f 20

  3. ping.sh: Pings all nodes with verbose output

  4. delete.sh: Deletes all nodes in cluster with name defined in "all" group_vars.

Gotcha's and bugs

  1. if a node fails to build on the initial run, you can rerun the same prov.sh but will need to cleanup the directories and restart cassandra again
   ansible -vvvv -u root -i scripts/rax.py ds_db -m shell -a "rm -rf /var/lib/cassandra/*" -f 20
   ansible -vvvv -u root -i scripts/rax.py ds_db -m shell -a "service cassandra restart" -f 20

Installation

Related Articles

cassandra
ansible

GitHub - locp/ansible-role-cassandra: Ansible role to install and configure Apache Cassandra

locp

8/25/2022

kubernetes
terraform
cassandra

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

cassandra