There are a number of ways to install Elassandra: from the tarball, with the deb or rpm package, with a docker image, or even from source <source>
.
Elassandra is based on Cassandra and ElasticSearch, thus it will be easier if you're already familiar with one on these technologies.
Elassandra requires at least Java 8. Oracle JDK is the recommended version, but OpenJDK should work as well. You can check which version is installed on your computer:
$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
Once java is correctly installed, download the Elassandra tarball:
wget
Then extract its content:
tar -xzf elassandra-.tar.gz
Go to the extracted directory:
cd elassandra-
Configure conf/cassandra.yaml
if necessary, then run:
bin/cassandra -e
This has started cassandra with elasticsearch enabled (according to the -e
option).
Get the node status:
bin/nodetool status
Now connect to the node with cqlsh:
bin/cqlsh
You're now able to type CQL commands. See the CQL reference.
Check the elasticsearch API:
curl -X GET http://localhost:9200/
You should get something like:
{ "name" : "127.0.0.1", "cluster_name" : "Test Cluster", "cluster_uuid" : "7cb65cea-09c1-4d6a-a17a-24efb9eb7d2b", "version" : { "number" : "", "build_hash" : "b0b4cb025cb8aa74538124a30a00b137419983a3", "build_timestamp" : "2017-04-19T13:11:11Z", "build_snapshot" : true, "lucene_version" : "5.5.2" }, "tagline" : "You Know, for Search" }
You're done !
On a production environment, it's better to modify some system settings like disabling swap. This guide shows you how to. On linux, consider installing jemalloc.
- Requirements:
- Oracle JDK 1.8 or OpenJDK 8
- gradle >= 3.5
Clone Elassandra repository and Cassandra sub-module:
git clone --recursive git@github.com:strapdata/elassandra.git
cd elassandra
Elassandra 5.5+ uses Gradle for its build system. Simply run:
gradle assemble
or to build only the tgz tarball for a release version :
gradle assemble distribution:tar:assemble -Dbuild.snapshot=false
It's gonna take a while, you might go for a cup of tea. If everything succeed, tarballs will be built in:
distribution/(tarrpm|deb)/build/distributions/
Then follow the instructions for tarball installation.