Applifier / cassandra-consul-seed-provider

Cassandra Seed Provider which works with Consul. Supports seeding from service discovery service or static K/V storage.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Status

Build Status Code Climate Test Coverage Codacy Badge Coverage Status

Build

Before building, make sure that the Cassandra dependency version matches your version :

compile 'org.apache.cassandra:cassandra-all:3.7'

Then build:

gradle shadowJar
gradle jar

Configuration

Generic

Specify seed provider class in cassandra.yaml config file:

seed_provider:
  - class_name: lt.nkts.cassandra.ConsulSeedProvider

Specify rest of parameters on command line as standart java properties.

If KV is enabled, provider will look for entries with kv_prefix prefix/namespace otherwise it will try to locate seed nodes from Consul service catalog.

KV

-Dconsul.kv.enabled=true -Dconsul.kv.prefix=cassandra/seeds

ACL

If an acl token is required e.g. via EnvVar:

-Dconsul.acl.token=$CONSUL_ACL_TOKEN

Service

-Dconsul.url=http://localhost:8500/ -Dconsul.service.tags=tag1 -Dconsul.service.name=cassandra ..

Seeding KV storage

curl -XPUT localhost:8500/v1/kv/cassandra/seeds/192.168.15.15

About

Cassandra Seed Provider which works with Consul. Supports seeding from service discovery service or static K/V storage.

License:MIT License


Languages

Language:Java 100.0%