Cassandra.Tools

A Curated List of Apache Cassandra Dev Tools

About

Cass Config Builder

datastax/cass-config-builder (3)
Languages:Clojure, Shell
Templates:Cassandra
License:Apache 2.0

Testing

./gradlew test

This task, without additional parameters, will test the cass-config-definitions submodule. However, this can be inconvenient if you want to make changes in your own fork of the cass-config-definitions repo. The following -P option allows you to point to a different directory for the definition files to test with:

./gradlew test -Pdefinitions.location=~/cass-config-definitions/resources

Build all artifacts

./gradlew assemble

Push the jar artifact to your local Maven repository

./gradlew publishToMavenLocal

Publish the jar artifact to your remote Maven repository

./gradlew publish

This task uses the following gradle settings:

Setting Description
mavenRepositoryUrl Maven repository to publish to
mavenRepositoryUsername Username for publishing
mavenRepositoryPassword Password for publishing

Build the Docker image

./gradlew dockerImage

Publish the Docker image to a remote docker repository

./gradlew pushDockerImage

This task uses the following gradle settings:

Setting Description
dockerRegistry Docker registry to publish to
dockerRegistryUsername Username for publishing
dockerRegistryPassword Password for publishing

Using the cass-config-builder docker image

The cass-config-builder receives input via the following environment variables:

Variable Description
CONFIGFILEDATA See below for explanation
CONFIGOUTPUTDIRECTORY Filesystem location to place rendered files. Defaults to /config
DEFINITION_LOCATION Filesystem location of the Definition Files. Defaults to /definitions
POD_IP The IP of the Kubernetes Pod
HOST_IP The IP of the Kubernetes worker hosting the Pod
PRODUCT_NAME Either "cassandra" or "dse"
PRODUCT_VERSION The version number for Cassandra or DSE
RACK_NAME The Cassandra rack name for this Pod

CONFIGFILEDATA

This is a JSON-encoded string representation of a nested dictionary. At the top-level of this data structure there are three special keys and an optional number of additional keys.

The three required top-level keys are "cluster-info", "datacenter-info", and "node-info".

cluster-info key

The value for cluster-info key is a dictionary with two required fields:

Key Description

name:Cluster name seeds:A comma separated list of IP addresses of Cassandra seed nodes

datacenter-info key

The value for datacenter-info key is a dictionary with four required fields:

Key Description

name:Datacenter name graph-enabled:Enable DSE graph workload solr-enabled:Enable DSE Solr workload spark-enabled:Enable DSE Spark workload

Note: Graph, Solr, and Spark workloads are not currently supported in the Cass-Operator.

node-info key

The value for node-info key is a dictionary with eight required fields:

Key Description

name:Node name rack:Rack name listenaddress:IP for listen address nativetransportaddress:IP for nativetransport address nativetransportbroadcastaddress:IP for nativetransport broadcast address initialtoken:The initial token autobootstrap:The autobootstrap value agentversion:The version of Datastax Agent to support

IP Address defaulting

The PODIP will be used as the default value for the listenaddress and nativetransportbroadcast_address if they are not specified.

Cassandra refers to nativetransport address as rpcaddress and nativetransportbroadcastaddress as broadcastrpc_address.

nativetransportaddress will be defaulted to "0.0.0.0".

Additional Top-Level CONFIGFILEDATA keys

The list of supported additional fields is dependent upon the exact version of DSE or Cassandra that is being targetted. Each key is called a "config-file-id" and corresponds to a specific configuration file in that version of DSE or Cassandra. The exact details of the config-file-ids and their supported values are defined in the cass-config-builder Definition Files.

For more details on the Definition Files, see the Github repository:

https://github.com/datastax/cass-config-definitions

© 2020 Anant Corporation, All Rights Reserved. All logos, trademarks and registered trademarks are the property of their respective owners. .

© Netlify 2020