Elassandra repository (Management, Rate Limit and Analytics), with the following benefits:
- Distributed gravitee configuration on many datacenters through the Cassandra replication (in active/active mode).
- Elasticsearch reporting for gravitee analytics.
- Scalability by adding Elassandra nodes (without re-indexing) and datacenters (for geo localisation concerns or workload separation)
- Reduce the global complexity and TCO by using the same NoSQL database for both gravitee configuration, reporting and APIs data storage.
This repository uses Datastax Java driver for communication with Cassandra and Elasticsearch query over CQL.
The minimum requirement is :
- Maven3
- Jdk8
In order to use Gravitee snapshot, You need to declare the following repository in you Maven settings :
https://oss.sonatype.org/content/repositories/snapshots
This Elassandra repository use Elassandra-Unit to run gravitee unit tests.
$ git clone https://github.com/strapdata/gravitee-repository-elassandra.git
$ cd gravitee-repository-elassandra
$ mvn clean package
To build the gravitee docker images including this gravitee-repository-elassandra.zip,
build.sh
Strapdata docker images are also available on the Docker Hub:
- Unzip the gravitee-repository-elassandra-[version].zip in the gravitee home directory.
- Copy the gravitee-repository-elassandra-[version].zip in the Gravitee /plugins directory.
Configuration settings, prefixed by scope.elassandra, where scope is management or ratelimit:
Parameter | Description | default |
---|---|---|
localDc | Sets the name of the datacenter that will be considered "local" | |
contactPoint | Allows to connect to Cassandra cluster nodes. It is not necessary to add all contact points because Cassandra driver will use auto-discovery mechanism. | localhost |
endpoint | Defines the Elasticsearch endpoint used to create Elasticsearch indices. | http://localhost:9200 |
port | Defines the CQL native transport port | 9042 |
keyspaceName | Name of the keyspace. Note that the final will be prefixed with the corresponding scope. | gravitee |
username | Permit to connect to Cassandra and Elasticsearch if using access with credentials. | cassandra |
password | Permit to connect to Cassandra and Elasticsearch if using access with credentials. | cassandra |
index.prefix | Index name prefix (to setup elasticsearch template for indices starting with this prefix) | |
connectTimeoutMillis | Defines how long the driver waits to establish a new connection to a Cassandra node before giving up | 5000 |
readTimeoutMillis | Controls how long the driver waits for a response from a given Cassandra node before considering it unresponsive | 12000 |
reconnectDelay | Reconnection retry delay in milliseconds | 5000 |
consistencyLevel | Sets the level of consistency for read & write access, e.g. ONE, QUORUM, ALL (see Datastax documentation for comprehensive list) | LOCAL_QUORUM |
ssl.truststore.path | Truststore file name (JKS or P12) | |
ssl.truststore.password | Truststore password | |
ssl.keystore.path | Keystore file name (JKS or P12) for TLS client authentication | |
ssl.keystore.password | Keystore password |
For analytics, settings are the same as Elasticsearch, see the gravitee documentation (Elassandra is seen as a vanilla Elasticsearch).
Configuration sample:
management:
type: elassandra
elassandra:
clusterName: elassandra
port: 39042
contactPoint: elassandra.default.svc.cluster.local
endpoint: https://elassandra-elasticsearch.default.svc.cluster.local:9200
username: cassandra
password: cassandra
ssl:
truststore:
path: /ca-pub/truststore.p12
password: changeit
ratelimit:
type: elassandra
elassandra:
clusterName: elassandra
port: 39042
contactPoint: elassandra.default.svc.cluster.local
endpoint: https://elassandra-elasticsearch.default.svc.cluster.local:9200
username: cassandra
password: cassandra
ssl:
truststore:
path: /ca-pub/truststore.p12
password: changeit
analytics:
type: elasticsearch
elasticsearch:
endpoints:
- https://elassandra-elasticsearch.default.svc.cluster.local:9200
security:
username: cassandra
password: cassandra
ssl:
truststore:
path: /ca-pub/truststore.p12
password: changeit
index: analytics
cluster: elassandra
...
- Commercial support is available through Strapdata.
- Community support available via elassandra google groups.
- Post feature requests and bugs on gravitee-repository-elassandra.
This software is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE.
- Elasticsearch and Kibana are trademarks of Elasticsearch BV, registered in the U.S. and in other countries.
- Apache Cassandra, Apache Lucene, Apache, Lucene and Cassandra are trademarks of the Apache Software Foundation.
- Gravitee is a trademark of Graviteesource.
- Elassandra is a trademark of Strapdata SAS.