Skip to content

Latest commit

 

History

History
63 lines (48 loc) · 2.69 KB

README.md

File metadata and controls

63 lines (48 loc) · 2.69 KB

cassandra.bin

Overview

Provides example bash scripts to simpify cassandra and DataStax Enterprise clusters.

This repo contains some basic script templates for using Cassandra and DSE (DataStax Enterprise). The contents are provided using the Apache 2.0 license with allows distribution without liabilities to either party.

Script templates here assist with migrattion, operation, and other aspects of using Cassandra and DSE. It is not a complete list, but it is provided to explain how to get important information out of cassandra, DSE, and the local OS.

I test it first on the Mac OSx. Then as required, the script templates are tested on various versions of Linux.

The scripts are simple and but usefull. All complexity is implemented in response to actual problems.

Rich Rein

Installing

1. Download the git repo with:

	> cd
    > git clone https://github.com/richrein/cassandra.bin.git


2. Add the following line near the end of your ~/.bashrc file:

    if [ -d `pwd`/cassandra.bin ] ; then (echo export PATH=\"\$PATH:`pwd`/cassandra.bin\" >> ~/.bashrc); else echo Error: Not in parent folder; fi


3. Source .bashrc

    > source ~/.bashrc

Script Types

Scripts names prefixes group the scripts by subject:

  • cassandra - Cassandra operations and queries
  • ccm - CCM operations
  • datastaxagent_backup - OpsCenter backup scripts
  • dse_node - DSE node configuration and queries
  • aws - Amazon Web Service queries (ie availablilty zone)
  • azure - Azure queries (IE Zones, instance ids)
  • dse - DSE configuration and queries (IE status for DSE's ports')

  • ip_address - IP address queries
  • network_benchmark - Quick and dirty benchmarks
  • opscenter - Operations on OpsCenter deployments
  • process - Process operations and queries
  • solr - Solr operations


Script Highlights

  • dse_node_install - installs dse on aws and azure nodes. Requires vm and storage to have been set up first. Change opscenter ip and seed ip. Install command is: dse_node_install . other IPs are figured out.

  • datastaxagent_backup_local_disk - OpsCenter Post Snapshot script to rsync entire data folder to 1 or more disks that are rotated daily.
  • aws_availability_zone - gets AZ
  • azure_instance_fault_domain - gets Fault Domain
  • azure_instance_id
  • azure_instance_update_domain
  • dse_ip_port_status - shows DSE related port status

  • ip_address_private - gets private IP address
  • ip_address_public - gets public IP address

  • network_benchmark_to_ssh_host - ssh benchmark (quick and dirty)

  • storage_benchmark_read - dd benchmark (quick and dirty)
  • storage_benchmark_write - dd benchmark (quick and dirty)