cd clepsydra-storage
If you are unsure which options to choose you may create the keyspace with one of the following system specific commands:
Linux users:
echo 'CREATE KEYSPACE YOUR_KEYSPACE_NAME WITH strategy_class = SimpleStrategy AND strategy_options:replication_factor = 1'|cqlsh -2
Windows users:
echo CREATE KEYSPACE YOUR_KEYSPACE_NAME WITH strategy_class = SimpleStrategy AND strategy_options:replication_factor = 1; | python "%CASSANDRA_HOME%/bin/cqlsh" -2
Linux users:
$CASSANDRA_HOME/bin/cqlsh -2 -k YOUR_KEYSPACE_NAME -f db/create_cf.cql
Windows users:
python "%CASSANDRA_HOME%/bin/cqlsh" -2 -k YOUR_KEYSPACE_NAME -f db/create_cf.cql
NOTICE: if you are not using the default cluster name ("Test Cluster") please change the CASSANDRA_CLUSTER property in clepsydra.conf.
Create new Glassfish server domain using create-clepsydra-domain.sh script. Please check if all properties in clepsydra.conf are filled and consistent with your databases configuration. Run the script:
sh create-clepsydra-domain.sh $GLASSFISH_HOME clepsydra.conf
NOTICE for Windows users: to run this script on Windows system please use Cygwin with "zip" and "wget" packages installed. Please make sure that there are no spaces in your $GLASSFISH_HOME path.
Deploy clepsydra-storage.war on Glassfish server using, for example, command:
$GLASSFISH_HOME/bin/asadmin deploy cassandra-storage.war
Open any browser and get content of url http://localhost:8080/clepsydra-storage/rest/records. If an application has been successfully installed, you should get response from the server with empty record list. It should look similar to the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <recordQueryResult> <expirationDate>2013-03-01T10:10:13.199+01:00</expirationDate> <token>8f3cfe32-f668-4efc-93fd-8c26c5c9d895</token> <records/> </recordQueryResult>