DataStax Enterprise 2.0 Documentation

Quick Start with DataStax Enterprise

This document corresponds to an earlier product version. Make sure you are using the version that corresponds to your version.

Latest DSE documentation | Earlier DSE documentation

The best way to get up and running quickly with DataStax Enterprise (DSE) is to install the DataStax Enterprise tarball distributions and start a single-node analytics instance. DataStax Enterprise is intended to be run on multiple nodes. However, installing a single-node cluster is a great way to get started.

Note

The instructions in this section are intended for an introduction to DataStax Enterprise, not for production installations. See Installing DataStax Enterprise Packaged Releases or Tarball Distribution and Configuring and Initializing a DataStax Enterprise Cluster for DataStax Enterprise cluster installation.

Getting up and running is simple:

  1. Register with DataStax. DataStax Enterprise is available to DataStax registered users and support customers. To download DataStax Enterprise, you will need the username and password provided in your DataStax registration confirmation email. If you are a DataStax support customer and are not sure of your login credentials, contact DataStax Customer Support.

    Note

    By downloading DataStax Enterprise software from DataStax you agree to the terms of the DataStax Enterprise EULA (End User License Agreement) posted on the DataStax web site.

  2. Make sure Java is installed.

  3. Install DataStax Enterprise in a way that suits your needs:

Checking for a Java Installation

DataStax Enterprise is a Java program and requires that a Java Virtual Machine (JVM) is installed before starting the server. Production deployments require that the Java Runtime Environment (JRE) 1.6.0_19 or later from Oracle is installed. However, if you are just trying the DataStax Enterprise, any JVM is fine.

To check for Java, run the following command in a terminal window:

# java -version

If you do not have Oracle Java installed on your Linux system, see Installing the JRE on RHEL or CentOS Systems or Installing the JRE on Debian or Ubuntu Systems for instructions. (Mac OS X includes Java JRE.)

Installing and Starting the DataStax Enterprise Binaries With sudo

The quickest way to get going on a single node with DataStax Enterprise is to install the binary tarball packages using root permissions (or sudo). This installation also creates files and directories outside of the install location. If you need to install everything in a single location, such as your home directory, and without root permissions, see Installing and Starting the DataStax Enterprise Binaries Without sudo.

To install and start DataStax Enterprise:

  1. If you haven't already, register with DataStax to download the DataStax Enterprise software.

  2. Download the DataStax Enterprise package (required) and the OpsCenter package (optional) to your home directory. Substitute <username>:<password> with your login credentials.

    $ cd ~/
    $ curl -OL  http://<username>:<password>@downloads.datastax.com/enterprise/dse.tar.gz
    $ curl -OL  http://<username>:<password>@downloads.datastax.com/enterprise/opscenter.tar.gz
    
  3. Unpack the distributions:

    $ tar -xzvf dse.tar.gz
    $ tar -xzvf opscenter.tar.gz
    $ rm *.tar.gz
    
  4. Go to the install directory. For example:

    cd dse-2.0-1
    
  5. Start DataStax Enterprise (as an Analytics node).

    $ sudo bin/dse cassandra -t
    

    where cassandra starts the Cassandra process plus CassandraFS and the -t option starts the Hadoop JobTracker and TaskTracker processes.

    Use this type of node for the Portfolio Manager Demo.

    Note

    When Cassandra loads, you may notice a message that MX4J will not load and that mx4j-tools.jar is not in the classpath. You can ignore this message. MX4j provides an HTML and HTTP interface to JMX and is not necessary to run Cassandra. DataStax recommends using OpsCenter It has more monitoring capabilities than MX4J.

  6. Check that your DataStax Enterprise ring is up and running (from the install directory):

    $ bin/nodetool ring -h localhost
    

    When running on a single node, the Cassandra seed node and DataStax Enterprise job tracker node are automatically set to localhost. Because there is no Hadoop NameNode with CassandraFS, no additional configuration is needed for running MapReduce jobs in single mode. However, additional configuration is needed for distributed mode. When running on a single node, the Cassandra seed node and DataStax Enterprise job tracker node are automatically set to localhost.

Next Steps

Installing and Starting the DataStax Enterprise Binaries Without sudo

This section provides instructions for installing and setting up a self-contained, single-node instance of DataStax Enterprise in your home directory that does not require root permissions. It consists of two parts:

Downloading and Installing the Binary Tarball

In this section, you download and install the DataStax Enterprise binary tarball.

To download and install the tarball:

  1. If you haven't already, register with DataStax to download the DataStax Enterprise software.

  2. In your home directory, download the DataStax Enterprise package (required) and the OpsCenter package (optional). Substitute <username>:<password> with correct DataStax login credentials.

    $ cd ~/
    $ curl -OL http://<username>:<password>@downloads.datastax.com/enterprise/dse.tar.gz
    $ curl -OL http://<username>:<password>@downloads.datastax.com/enterprise/opscenter.tar.gz
    
  3. Unpack the distributions:

    $ tar -xzvf dse.tar.gz
    $ tar -xzvf opscenter.tar.gz
    $ rm *.tar.gz
    
  4. Go to the install directory. For example:

    $ cd dse-2.0-1
    
  5. Create the data and logging directories:

    $ mkdir dse-data
    
  6. In dse-data, create the following directories:

    $ cd dse-data
    $ mkdir data
    $ mkdir saved_caches
    $ mkdir commitlog
    

Configuring and Starting the Cluster

In this section, you set the configuration properties needed to run DataStax Enterprise as a single-node cluster on the localhost from your home directory. These properties are specified in the cassandra.yaml and og4j-server.properties files.

To configure and start the cluster:

  1. Go the directory containing the cassandra.yaml file. For example:

    $ cd ~/dse-2.0-1/resources/cassandra/conf
    
  2. Edit the following lines in the cassandra.yaml file. For example:

    initial_token: 0
    data_file_directories: - ~/dse-2.0-1/dse-data/data
    commitlog_directory: ~/dse-2.0-1/dse-data/commitlog
    saved_caches_directory: ~/dse-2.0-1/dse-data/saved_caches
    listen_address: 127.0.0.1
    
  3. In the conf directory, change the log4j-server.properties file:

    log4j.appender.R.File= ~/dse-2.0-1/dse-data/system.log
    
  4. Start DataStax Enterprise (as an Analytics node):

    $ cd ~/dse-2.0-1
    $ bin/dse cassandra -t
    

    where cassandra starts the Cassandra process plus CassandraFS and the -t option starts the Hadoop JobTracker and TaskTracker processes.

    Use this type of node for the Portfolio Manager Demo.

    Note

    When Cassandra loads, you may notice a message that MX4J will not load and that mx4j-tools.jar is not in the classpath. You can ignore this message. MX4j provides an HTML and HTTP interface to JMX and is not necessary to run Cassandra. DataStax recommends using OpsCenter It has more monitoring capabilities than MX4J.

  5. Check that your cluster is up and running:

    $ bin/nodetool ring -h localhost
    

    When running on a single node, the Cassandra seed node and DataStax Enterprise job tracker node are automatically set to localhost. Because there is no Hadoop NameNode with CassandraFS, no additional configuration is needed for running MapReduce jobs in single mode; however, additional configuration is needed for distributed mode. When running on a single node, the Cassandra seed node and DataStax Enterprise job tracker node are automatically set to localhost.

Next Steps

Stopping a Node

To stop a node, find the Cassandra Java process ID (PID) and kill the process using its PID number (using sudo if necessary). For example:

$ ps -ef | grep cassandra
$ kill 1539

Setting up the OpsCenter for a Single Node

The DataStax OpsCenter binary tarball installs OpsCenter in a single directory and does not require root permissions. When installing from the tarball, the OpsCenter agents must be manually installed. When installing from a package, you can use OpsCenter to install the agents on each node.

In this introduction, you install the agent on the same machine as the DataStax Enterprise server and OpsCenter and set it to use localhost. For information about production installations, see Installing OpsCenter.

Prerequisites

You have previously downloaded and extracted the opscenter.tar.gz file and DataStax Enterprise is running.

In addition to the DataStax Enterprise installation requirements, the OpsCenter requires that the following software is installed:

  • Python 2.6+
  • OpenSSL: 0.9.8 for Mac OSX, RHEL 5, CentOS 5, Ubuntu, Debian, and Windows; 1.0.0 for RHEL 6 and CentOS 6.

Note

If your operating system has OpenSSL 1.0.0 installed and you see an error containing exceptions.ImportError: libssl.so.0.9.8:, you must install OpenSSL 0.9.8. For example on Ubuntu, use sudo apt-get install libssl0.9.8.

To check for the software versions:

$ python -V
$ openssl version

Configuring the OpsCenter and OpsCenter Agent

  1. Make sure the prerequisite software is installed.

  2. Start the OpsCenter:

    $ cd ~/opscenter-2.0

    $ bin/opscenter (in the background - default)

    $ bin/opscenter -f (in the foreground)

  3. Set the agent to localhost:

    $ cd ~/opscenter-2.0/agent
    $ bin/setup localhost
    
  4. Start the agent:

    $ bin/opscenter-agent (in the background - default)

    $ bin/opscenter-agent -f (in the foreground)

  5. Launch OpsCenter from a browser using the following URL:

    http://<opscenter_host>:8888

  6. In the Welcome to DataStax OpsCenter dialgo box, enter localhost in the Cluster Hosts/IP field, and then click **Add Cluster.

    The OpsCenter Dashboard is displayed.


    ../_images/qs_opscenter.png