The fastest way to get up and running quickly with DataStax Enterprise (DSE) is to install the DSE tarball distributions and start a single-node analytics instance. DSE is intended to be run on multiple nodes, however installing a single-node cluster is a great way to get started.
Getting up and running takes just four simple steps:
DSE is a Java program and requires a Java Virtual Machine (JVM) to be installed before you can start the server. For production deployments, you will need the Sun Java Runtime Environment 1.6.0_19 or later, but if you are just kicking the tires, any JVM should do.
To check for Java, run the following command:
# java -version
The quickest way to get going on a single node with DataStax Enterprise (DSE) is to install the DSE binary tarball packages. This allows you to install everything in a single location (such as your home directory), and does not require root permissions.
DataStax Enterprise is comprised of two components - The DSE server (Cassandra and CassandraFS-enabled Hadoop plus a sample demo application) and DataStax OpsCenter (a web-based monitoring application for Cassandra and DSE Analytics).
These instructions will walk you through setting up a self-contained, single-node instance of DataStax Enterprise in your home directory (does not require root permissions).
The instructions in this section are not intended for production installations, just for a quick start. See Installing DataStax Enterprise Packaged Releases or Tarball Distribution and init-dse for DSE cluster installation best practices.
By downloading DSE software from DataStax you agree to the terms of the DataStax Enterprise EULA (end user license agreement) posted on the DataStax web site.
In your home directory, create a directory called datastax. In that directory download the DSE package (required), plus the OpsCenter package (optional). Substitute <username>:<password> with your correct DataStax login credentials.
$ cd $HOME $ mkdir datastax $ cd datastax $ wget http://<username>:<password>@downloads.datastax.com/enterprise/dse-1.0.1-bin.tar.gz $ wget http://<username>:<password>@downloads.datastax.com/enterprise/opscenter.tar.gz
Unpack the distributions:
$ tar -xzvf dse-1.0.1-bin.tar.gz $ tar -xzvf opscenter-1.4.tar.gz $ rm *.tar.gz
For convenience, set the following environment variables in your user environment. For example, to configure your environment in your $HOME/.bashrc file:
Open your .bashrc file in a text editor (such as vi):
Add the following lines to bottom of the file:
export DSE_HOME=$HOME/datastax/dse-1.0.1 export CASSANDRA_HOME=$DSE_HOME/resources/cassandra export OPSC_HOME=$HOME/datastax/opscenter-1.4 export PATH="$PATH:$DSE_HOME/bin:$CASSANDRA_HOME/bin:$OPSC_HOME/bin"
Save and close the file.
Source the file.
Create the data and logging directories needed by DSE.
$ mkdir $HOME/datastax/dse-data
DSE is intended to be run on multiple nodes, however a single node cluster is great for evaluation purposes. To configure and start a single DSE analytics node:
Set the configuration properties needed to start your cluster in the $DSE_HOME/resources/cassandra/conf/cassandra.yaml file. This will configure DSE to run a single-node cluster on the localhost and store all of its data files in your home directory.
$ sed -i -e "s,initial_token:,initial_token: 0," \ $DSE_HOME/resources/cassandra/conf/cassandra.yaml $ sed -i -e "s,listen_address:,listen_address: 127.0.0.1," \ $DSE_HOME/resources/cassandra/conf/cassandra.yaml $ sed -i -e "s,- /var/lib/cassandra/data,- $HOME/datastax/dse-data," \ $DSE_HOME/resources/cassandra/conf/cassandra.yaml $ sed -i -e "s,saved_caches_directory: /var/lib/cassandra/saved_caches, \ saved_caches_directory: $HOME/datastax/dse-data/saved_caches," \ $DSE_HOME/resources/cassandra/conf/cassandra.yaml $ sed -i -e "s,commitlog_directory: /var/lib/cassandra/commitlog,commitlog_directory: \ $HOME/datastax/dse-data/commitlog," $DSE_HOME/resources/cassandra/conf/cassandra.yaml
Set the DSE server log location in the $DSE_HOME/resources/cassandra/conf/log4j-server.properties file to the log directory you created earlier:
$ sed -i -e "s,log4j.appender.R.File=/var/log/cassandra/system.log, \ log4j.appender.R.File=$HOME/datastax/dse-data/system.log," \ $DSE_HOME/resources/cassandra/conf/log4j-server.properties
Configure the DataStax demo application to point to the correct Cassandra installation location:
$ sed -i -e "s,/usr/share/cassandra,$HOME/datastax/dse-1.0.1/resources/cassandra," \ $DSE_HOME/demos/portfolio_manager/bin/pricer
Start DSE (as an analytics node). The -t option starts Cassandra plus CassandraFS and the Hadoop JobTracker and TaskTracker processes. Because there is no Hadoop NameNode with CassandraFS, there is no additional configuration to run MapReduce jobs in single mode versus distributed mode when using DataStax Enterprise.
$ dse cassandra -t
When running on a single node, the Cassandra seed node and DSE job tracker node are automatically set to localhost.
Check that your DSE ring is up and running:
$ nodetool ring -h localhost
For the next hands-on steps, run the Portfolio Demo example application.
DataStax OpsCenter is a graphical web application that can be used to manage and monitor a DataStax Enterprise cluster.
The machines on which you install OpsCenter must have:
To check for these prerequisites:
$ java -version $ python -V $ which openssl
This instructions assume that you have previosusly unpacked opscenter.tar.gz as described above.
For instructions about installing OpsCenter on various platforms, see OpsCenter Installation Guide.
For convenience, set the following environment variables in your user environment (such as in your $HOME/.bashrc file):
export OPSC_HOME=<install_location>/opscenter-1.4 export PATH="$PATH:$OPSC_HOME/bin"
Set the required configuration properties for your environment in the opscenterd.conf file located in $OPSC_HOME/conf/opscenterd.conf. See OpsCenter Configuration Properties
From the OpsCenter home directory, run the bin/setup.py script. This sets up SSL for OpsCenter and creates a agent.tar.gz file for installing the agents (may take a couple of minutes to return). On Linux, for example:
$ cd $OPSC_HOME $ ./bin/setup.py
By default OpsCenter starts in the background. To start OpsCenter in the foreground, use the -f option.
$ opscenter -f
Use the agent.tar.gz file that gets created to manually install the OpsCenter agents on the nodes in your Cassandra or DSE cluster. See Manually Installing Agents - Packaged Installations.
The tar installation does not support automatic agent installs.
This will open the OpsCenter Dashboard. If you select Cluster > Ring View, you should see your single DSE Analytics node running on the localhost.