Quick start - odiszapc/stem GitHub Wiki

This document describes how to build and start single-node configuration of STEM cluster.

To build and start STEM cluster from sources you'll need:

  • Linux/Windows
  • Oracle JVM HotSpot 7+
  • Cassandra 2.0+
  • Zookeeper
  • Maven

First, install the latest JDK7 and Maven package manager.

Installing Cassandra and Zookeeper

Download Cassandra and extract it to /opt/apache-cassandra-2.0.9. No custom configuration here.

Start Cassandra node: /opt/apache-cassandra-2.0.9/bin/cassandra

Download Zookeeer and extract it into /opt/zookeeper-3.4.6

Create configuration file: cp /opt/zookeeper-3.4.6/conf/zoo_sample.cfg /opt/zookeeper-3.4.6/conf/zoo.cfg

Start Zookeeper instance: /opt/zookeeper-3.4.6/bin/zkServer.sh start

Building STEM

Prepare directories: mkdir -p /opt/stem/clustermanager; mkdir /opt/stem/storagenode

Download sources: mkdir -p /opt/stem/src; cd /opt/stem/src; git clone https://github.com/odiszapc/stem.git

Build: cd /opt/stem/src/stem; mvn package -DskipTests

Cluster manager and Storage node packages are located in /opt/stem/src/release directory as tar.gz archives, extract them into /opt/stem/clustermanager and /opt/stem/storagenode directories respectively

Starting STEM Cluster Manager

Ensure Zookeeper and Cassandra have been started

Review /opt/stem/clustermanager/conf/cluster.yaml configuration file, it's self explained:

zookeeper_endpoint: localhost:2181   # Where the Zookeeper lives
web_listen_address: 0.0.0.0:9997     # REST API and Web UI

Start Cluster Manager instance: /opt/stem/clustermanager/bin/cluster-manager.sh

Initialize cluster talking REST to cluster manager instance: curl http://localhost:9997/api/cluster/init -X POST -H "Content-Type: application/json" -d @/opt/stem/clustermanager/conf/init_cluster.sample.json

Feel free to see what's inside the json. Cluster will be initialized to use CRUSH as a partitioner with 100k of buckets, replication factor of 1 and local Cassandra meta store cluster. Also, new nodes will be added to topology automatically with autoApproval flag.

If manager responds you with {"message":"Cluster successfully created"} you're on the right way. If not, welcome to our JIRA: http://tracker.stemstorage.org

Starting STEM Storage Node

Open /opt/stem/storagenode/conf/stem.yaml. We interested in the two parameters:

cluster_manager_endpoint: http://localhost:9997    # Cluster manager REST API endpoint
max_space_allocation_in_mb:                        # By default node uses entire disk for blob containers, for dev purposes we can set "1024" here to use maximum 1GB of space

Start storage node: /opt/stem/storagenode/bin/storage-node.sh. Node will automatically be added to topology.

Now cluster is ready.