Docker image
The repository now carries the Elassandra image build sources directly under distribution/docker.
The Docker build reuses the assembled Linux distribution from this repository and overlays the Cassandra
startup scripts and configuration needed to start org.apache.cassandra.service.ElassandraDaemon.
Build the image locally
From the repository root:
./gradlew :distribution:docker:buildDockerImage
The local tag produced by the Gradle task is:
elassandra:test
Start a single node
Run a local Elassandra container:
docker run --name node0 \
-p 9042:9042 \
-p 9200:9200 \
-e MAX_HEAP_SIZE=1200m \
-e HEAP_NEWSIZE=300m \
-e JVM_OPTS=-Dcassandra.custom_query_handler_class=org.elassandra.index.ElasticQueryHandler \
elassandra:test
Then inspect the node:
docker exec -it node0 nodetool status
docker exec -it node0 cqlsh
docker exec -it node0 curl localhost:9200
Supported environment variables
The image configures conf/cassandra.yaml and conf/cassandra-rackdc.properties from environment
variables at container start. The first-pass runtime contract is intentionally small and matches the
Helm chart values:
Variable |
Description |
|---|---|
|
Cassandra listen address. Defaults to the container IP. |
|
Gossip and broadcast address. Defaults to the listen address. |
|
CQL bind address. Defaults to |
|
CQL address advertised to clients. |
|
Comma-separated seed hosts for gossip bootstrap. |
|
Cluster name written to |
|
Number of virtual nodes assigned to the container. |
|
Datacenter for |
|
Rack for |
|
Snitch implementation, usually |
|
JVM heap upper bound for Cassandra and Elassandra. |
|
Young-generation heap size. |
|
Additional JVM options. The image adds the Elassandra query handler if it is not already present. |
|
Switch the packaged |
Filesystem layout
The image uses an installation rooted at /usr/share/elassandra:
/usr/share/elassandra/bin: Cassandra and Elassandra startup scripts/usr/share/elassandra/conf: Cassandra and OpenSearch configuration/usr/share/elassandra/data: data, commitlog, hints, CDC, and saved caches/usr/share/elassandra/logs: log files
Exposed ports
7000: intra-node communication7001: TLS intra-node communication7199: JMX9042: CQL9160: thrift9200: OpenSearch HTTP9300: OpenSearch transport
Local cluster example
For a small local multi-node test environment, use ci/docker-compose.yml after building the image:
docker-compose -f ci/docker-compose.yml up -d --scale node=0
docker-compose -f ci/docker-compose.yml up -d --scale node=1
For long-lived containerized deployments, prefer the maintained Helm chart in
incloudsio/helm-charts under
charts/elassandra.